Changeset 1582 in ntrip


Ignore:
Timestamp:
Feb 12, 2009, 1:50:58 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC/RTCM3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/RTCM3coDecoder.cpp

    r1566 r1582  
    6767    _fileNameSkl = path + staID;
    6868  }
    69   _out = 0;
     69  _out      = 0;
     70  _GPSweeks = -1.0;
    7071
    7172  connect(this, SIGNAL(newCorrLine(QString, QString, long)),
     
    130131    if      (irc == GCOBR_SHORTBUFFER ||
    131132             irc == GCOBR_MESSAGEEXCEEDSBUFFER) {
     133      if (retCode != success) {
     134        _GPSweeks = -1.0;
     135      }
    132136      return retCode;
    133137    }
     
    140144
    141145      int    GPSweek;
    142       double GPSweeks;
    143       currentGPSWeeks(GPSweek, GPSweeks);
     146      currentGPSWeeks(GPSweek, _GPSweeks);
    144147      if (_co.NumberOfGPSSat > 0) {
    145         if      (GPSweeks > _co.GPSEpochTime + 86400.0) {
     148        if      (_GPSweeks > _co.GPSEpochTime + 86400.0) {
    146149          GPSweek += 1;
    147150        }
    148         else if (GPSweeks < _co.GPSEpochTime - 86400.0) {
     151        else if (_GPSweeks < _co.GPSEpochTime - 86400.0) {
    149152          GPSweek -= 1;
    150153        }
    151         GPSweeks = _co.GPSEpochTime;
     154        _GPSweeks = _co.GPSEpochTime;
    152155      }
    153156      else {
    154         double GPSdaysec = fmod(GPSweeks, 86400.0);
    155         int    weekDay   = int((GPSweeks - GPSdaysec) / 86400.0);
     157        double GPSdaysec = fmod(_GPSweeks, 86400.0);
     158        int    weekDay   = int((_GPSweeks - GPSdaysec) / 86400.0);
    156159        if      (GPSdaysec > _co.GLONASSEpochTime + 3600.0) {
    157160          weekDay += 1;
     
    168171          }
    169172        }
    170         GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime;
     173        _GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime;
    171174      }
    172175
     
    174177        QString line;
    175178        line.sprintf("%d %.1f G%2.2d   %3d   %8.3f   %8.3f %8.3f %8.3f",
    176                GPSweek, GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD,
     179               GPSweek, _GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD,
    177180               _co.Sat[ii].Clock.DeltaA0,
    178181               _co.Sat[ii].Orbit.DeltaRadial,
    179182               _co.Sat[ii].Orbit.DeltaAlongTrack,
    180183               _co.Sat[ii].Orbit.DeltaCrossTrack);
    181         long coTime = GPSweek * 7*24*3600 + long(floor(GPSweeks+0.5));
     184        long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));
    182185        printLine(line, coTime);
    183186      }
     
    186189        QString line;
    187190        line.sprintf("%d %.1f R%2.2d   %3d   %8.3f   %8.3f %8.3f %8.3f",
    188                GPSweek, GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD,
     191               GPSweek, _GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD,
    189192               _co.Sat[ii].Clock.DeltaA0,
    190193               _co.Sat[ii].Orbit.DeltaRadial,
    191194               _co.Sat[ii].Orbit.DeltaAlongTrack,
    192195               _co.Sat[ii].Orbit.DeltaCrossTrack);
    193         long coTime = GPSweek * 7*24*3600 + long(floor(GPSweeks+0.5));
     196        long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));
    194197        printLine(line, coTime);
    195198      }
  • trunk/BNC/RTCM3/RTCM3coDecoder.h

    r1567 r1582  
    4343  virtual ~RTCM3coDecoder();
    4444  virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg);
    45   virtual int corrGPSEpochTime() const {return _co.GPSEpochTime;}
     45  virtual int corrGPSEpochTime() const {return (int) _GPSweeks;}
    4646
    4747 signals:
     
    6060  ClockOrbit     _co;
    6161  Bias           _bias;
     62  double         _GPSweeks;
    6263};
    6364
Note: See TracChangeset for help on using the changeset viewer.