Changeset 6556 in ntrip for trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
- Timestamp:
- Jan 19, 2015, 6:57:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r6553 r6556 191 191 if (irc == GCOBR_OK || irc == GCOBR_MESSAGEFOLLOWS ) { 192 192 193 set ReferenceTime(); // sets _lastTime193 setEpochTime(); // sets _lastTime 194 194 195 195 if (_lastTime.valid()) { … … 238 238 t_orbCorr orbCorr; 239 239 orbCorr._prn.set(sysCh, _clkOrb.Sat[ii].ID); 240 orbCorr._staID = _staID.toAscii().data(); 241 orbCorr._iod = _clkOrb.Sat[ii].IOD; 242 orbCorr._time = _lastTime; 243 orbCorr._system = 'R'; 244 orbCorr._xr[0] = _clkOrb.Sat[ii].Orbit.DeltaRadial; 245 orbCorr._xr[1] = _clkOrb.Sat[ii].Orbit.DeltaAlongTrack; 246 orbCorr._xr[2] = _clkOrb.Sat[ii].Orbit.DeltaCrossTrack; 247 orbCorr._dotXr[0] = _clkOrb.Sat[ii].Orbit.DotDeltaRadial; 248 orbCorr._dotXr[1] = _clkOrb.Sat[ii].Orbit.DotDeltaAlongTrack; 249 orbCorr._dotXr[2] = _clkOrb.Sat[ii].Orbit.DotDeltaCrossTrack; 240 orbCorr._staID = _staID.toAscii().data(); 241 orbCorr._iod = _clkOrb.Sat[ii].IOD; 242 orbCorr._time = _lastTime; 243 orbCorr._updateInt = _clkOrb.UpdateInterval; 244 orbCorr._system = 'R'; 245 orbCorr._xr[0] = _clkOrb.Sat[ii].Orbit.DeltaRadial; 246 orbCorr._xr[1] = _clkOrb.Sat[ii].Orbit.DeltaAlongTrack; 247 orbCorr._xr[2] = _clkOrb.Sat[ii].Orbit.DeltaCrossTrack; 248 orbCorr._dotXr[0] = _clkOrb.Sat[ii].Orbit.DotDeltaRadial; 249 orbCorr._dotXr[1] = _clkOrb.Sat[ii].Orbit.DotDeltaAlongTrack; 250 orbCorr._dotXr[2] = _clkOrb.Sat[ii].Orbit.DotDeltaCrossTrack; 250 251 251 252 _orbCorrections[_lastTime].push_back(orbCorr); … … 265 266 clkCorr._staID = _staID.toAscii().data(); 266 267 clkCorr._time = _lastTime; 268 clkCorr._updateInt = _clkOrb.UpdateInterval; 267 269 clkCorr._dClk = _clkOrb.Sat[ii].Clock.DeltaA0 / t_CST::c; 268 270 clkCorr._dotDClk = _clkOrb.Sat[ii].Clock.DeltaA1 / t_CST::c; … … 285 287 if (_lastClkCorrections.contains(prn)) { 286 288 t_clkCorr clkCorr; 287 clkCorr = _lastClkCorrections[prn]; 288 clkCorr._time = _lastTime; 289 clkCorr._dClk +=_clkOrb.Sat[ii].hrclock / t_CST::c; 289 clkCorr = _lastClkCorrections[prn]; 290 clkCorr._time = _lastTime; 291 clkCorr._updateInt = _clkOrb.UpdateInterval; 292 clkCorr._dClk += _clkOrb.Sat[ii].hrclock / t_CST::c; 290 293 if (_IODs.contains(clkCorr._prn)) { 291 294 clkCorr._iod = _IODs[clkCorr._prn]; … … 311 314 t_satCodeBias satCodeBias; 312 315 satCodeBias._prn.set(sysCh, _codeBias.Sat[ii].ID); 313 satCodeBias._staID = _staID.toAscii().data(); 314 satCodeBias._time = _lastTime; 316 satCodeBias._staID = _staID.toAscii().data(); 317 satCodeBias._time = _lastTime; 318 satCodeBias._updateInt = _codeBias.UpdateInterval; 315 319 for (unsigned jj = 0; jj < _codeBias.Sat[ii].NumberOfCodeBiases; jj++) { 316 320 const CodeBias::BiasSat::CodeBiasEntry& biasEntry = _codeBias.Sat[ii].Biases[jj]; … … 342 346 satPhaseBias._staID = _staID.toAscii().data(); 343 347 satPhaseBias._time = _lastTime; 348 satPhaseBias._updateInt = _phaseBias.UpdateInterval; 344 349 satPhaseBias._yawDeg = _phaseBias.Sat[ii].YawAngle * 180.0 / M_PI; 345 350 satPhaseBias._yawDegRate = _phaseBias.Sat[ii].YawRate * 180.0 / M_PI; … … 363 368 if (_vTEC.NumLayers > 0) { 364 369 _vTecMap[_lastTime]._time = _lastTime; 370 _vTecMap[_lastTime]._updateInt = _vTEC.UpdateInterval; 365 371 _vTecMap[_lastTime]._staID = _staID.toAscii().data(); 366 372 for (unsigned ii = 0; ii < _vTEC.NumLayers; ii++) { … … 463 469 // 464 470 //////////////////////////////////////////////////////////////////////////// 465 void RTCM3coDecoder::set ReferenceTime() {471 void RTCM3coDecoder::setEpochTime() { 466 472 467 473 _lastTime.reset(); 468 474 469 const QVector<int> updateInt = QVector<int>() << 1 << 2 << 5 << 10 << 15 << 30470 << 60 << 120 << 240 << 300 << 600471 << 900 << 1800 << 3600 << 7200472 << 10800;473 475 double epoSecGPS = -1.0; 474 476 double epoSecGlo = -1.0; 475 477 if (_clkOrb.NumberOfSat[CLOCKORBIT_SATGPS] > 0) { 476 478 epoSecGPS = _clkOrb.EpochTime[CLOCKORBIT_SATGPS]; // 0 .. 604799 s 477 if (_clkOrb.UpdateInterval) {478 epoSecGPS += 0.5 * updateInt[_clkOrb.UpdateInterval];479 }480 479 } 481 480 else if (_codeBias.NumberOfSat[CLOCKORBIT_SATGPS] > 0) { 482 481 epoSecGPS = _codeBias.EpochTime[CLOCKORBIT_SATGPS]; // 0 .. 604799 s 483 if (_codeBias.UpdateInterval) {484 epoSecGPS += 0.5 * updateInt[_codeBias.UpdateInterval];485 }486 482 } 487 483 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATGPS] > 0) { 488 484 epoSecGPS = _phaseBias.EpochTime[CLOCKORBIT_SATGPS]; // 0 .. 604799 s 489 if (_phaseBias.UpdateInterval) {490 epoSecGPS += 0.5 * updateInt[_phaseBias.UpdateInterval];491 }492 485 } 493 486 else if (_vTEC.NumLayers > 0) { 494 487 epoSecGPS = _vTEC.EpochTime; // 0 .. 604799 s 495 if (_vTEC.UpdateInterval) {496 epoSecGPS += 0.5 * updateInt[_vTEC.UpdateInterval];497 }498 488 } 499 489 else if (_clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) { 500 490 epoSecGlo = _clkOrb.EpochTime[CLOCKORBIT_SATGLONASS]; // 0 .. 86399 s 501 if (_clkOrb.UpdateInterval) {502 epoSecGlo += 0.5 * updateInt[_clkOrb.UpdateInterval];503 }504 491 } 505 492 else if (_codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) { 506 493 epoSecGlo = _codeBias.EpochTime[CLOCKORBIT_SATGLONASS]; // 0 .. 86399 s 507 if (_codeBias.UpdateInterval) {508 epoSecGlo += 0.5 * updateInt[_codeBias.UpdateInterval];509 }510 494 } 511 495 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) { 512 496 epoSecGlo = _phaseBias.EpochTime[CLOCKORBIT_SATGLONASS]; // 0 .. 86399 s 513 if (_phaseBias.UpdateInterval) {514 epoSecGlo += 0.5 * updateInt[_phaseBias.UpdateInterval];515 }516 497 } 517 498
Note:
See TracChangeset
for help on using the changeset viewer.