- Timestamp:
- Feb 12, 2009, 1:50:58 PM (16 years ago)
- Location:
- trunk/BNC/RTCM3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3coDecoder.cpp
r1566 r1582 67 67 _fileNameSkl = path + staID; 68 68 } 69 _out = 0; 69 _out = 0; 70 _GPSweeks = -1.0; 70 71 71 72 connect(this, SIGNAL(newCorrLine(QString, QString, long)), … … 130 131 if (irc == GCOBR_SHORTBUFFER || 131 132 irc == GCOBR_MESSAGEEXCEEDSBUFFER) { 133 if (retCode != success) { 134 _GPSweeks = -1.0; 135 } 132 136 return retCode; 133 137 } … … 140 144 141 145 int GPSweek; 142 double GPSweeks; 143 currentGPSWeeks(GPSweek, GPSweeks); 146 currentGPSWeeks(GPSweek, _GPSweeks); 144 147 if (_co.NumberOfGPSSat > 0) { 145 if ( GPSweeks > _co.GPSEpochTime + 86400.0) {148 if (_GPSweeks > _co.GPSEpochTime + 86400.0) { 146 149 GPSweek += 1; 147 150 } 148 else if ( GPSweeks < _co.GPSEpochTime - 86400.0) {151 else if (_GPSweeks < _co.GPSEpochTime - 86400.0) { 149 152 GPSweek -= 1; 150 153 } 151 GPSweeks = _co.GPSEpochTime;154 _GPSweeks = _co.GPSEpochTime; 152 155 } 153 156 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); 156 159 if (GPSdaysec > _co.GLONASSEpochTime + 3600.0) { 157 160 weekDay += 1; … … 168 171 } 169 172 } 170 GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime;173 _GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime; 171 174 } 172 175 … … 174 177 QString line; 175 178 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, 177 180 _co.Sat[ii].Clock.DeltaA0, 178 181 _co.Sat[ii].Orbit.DeltaRadial, 179 182 _co.Sat[ii].Orbit.DeltaAlongTrack, 180 183 _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)); 182 185 printLine(line, coTime); 183 186 } … … 186 189 QString line; 187 190 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, 189 192 _co.Sat[ii].Clock.DeltaA0, 190 193 _co.Sat[ii].Orbit.DeltaRadial, 191 194 _co.Sat[ii].Orbit.DeltaAlongTrack, 192 195 _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)); 194 197 printLine(line, coTime); 195 198 } -
trunk/BNC/RTCM3/RTCM3coDecoder.h
r1567 r1582 43 43 virtual ~RTCM3coDecoder(); 44 44 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;} 46 46 47 47 signals: … … 60 60 ClockOrbit _co; 61 61 Bias _bias; 62 double _GPSweeks; 62 63 }; 63 64
Note:
See TracChangeset
for help on using the changeset viewer.