Changeset 4904 in ntrip
- Timestamp:
- Feb 9, 2013, 10:20:20 AM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/ephemeris.cpp
r4891 r4904 375 375 // Set Glonass Ephemeris 376 376 //////////////////////////////////////////////////////////////////////////// 377 void t_ephGlo::set(const glonassephemeris* ee ) {377 void t_ephGlo::set(const glonassephemeris* ee, bool& timeChanged) { 378 378 379 379 _receptDateTime = currentDateAndTimeGPS(); … … 387 387 // Check the day once more 388 388 // ----------------------- 389 timeChanged = false; 389 390 { 390 391 const double secPerDay = 24 * 3600.0; … … 398 399 bncTime hTime(ww, (double) tow); 399 400 400 bool changed = false;401 401 if (hTime - currentTime > secPerDay/2.0) { 402 changed = true;402 timeChanged = true; 403 403 tow -= int(secPerDay); 404 404 if (tow < 0) { … … 408 408 } 409 409 else if (hTime - currentTime < -secPerDay/2.0) { 410 changed = true;410 timeChanged = true; 411 411 tow += int(secPerDay); 412 412 if (tow > secPerWeek) { … … 416 416 } 417 417 418 if ( changed && ((bncApp*) qApp)->mode() == bncApp::batchPostProcessing) {418 if (timeChanged && ((bncApp*) qApp)->mode() == bncApp::batchPostProcessing) { 419 419 bncTime newHTime(ww, (double) tow); 420 420 cout << "GLONASS " << ee->almanac_number << " Time Changed at " -
trunk/BNC/src/RTCM3/ephemeris.h
r4366 r4904 141 141 virtual int RTCM3(unsigned char *); 142 142 143 void set(const glonassephemeris* ee );143 void set(const glonassephemeris* ee, bool& timeChanged); 144 144 145 145 int slotNum() const {return int(_frequency_number);} -
trunk/BNC/src/bncapp.cpp
r4747 r4904 515 515 516 516 t_ephGlo eph; 517 eph.set(ep); 517 bool timeChanged; 518 eph.set(ep, timeChanged); 518 519 519 520 QString strV2 = eph.toString(2.11); -
trunk/BNC/src/bncephuser.cpp
r4784 r4904 111 111 bncTime toc(ww, tow); 112 112 if (eLast->TOC() < toc) { 113 delete static_cast<t_ephGlo*>(_eph.value(prn)->prev); 114 _eph.value(prn)->prev = _eph.value(prn)->last; 115 _eph.value(prn)->last = new t_ephGlo(); 116 static_cast<t_ephGlo*>(_eph.value(prn)->last)->set(&gloeph); 113 t_ephGlo* ephGlo = new t_ephGlo(); 114 bool timeChanged; 115 ephGlo->set(&gloeph, timeChanged); 116 if (timeChanged) { 117 delete ephGlo; 118 } 119 else { 120 delete static_cast<t_ephGlo*>(_eph.value(prn)->prev); 121 _eph.value(prn)->prev = _eph.value(prn)->last; 122 _eph.value(prn)->last = ephGlo; 123 } 117 124 } 118 125 } 119 126 else { 120 127 t_ephGlo* eLast = new t_ephGlo(); 121 eLast->set(&gloeph); 122 _eph.insert(prn, new t_ephPair(eLast)); 128 bool timeChanged; 129 eLast->set(&gloeph, timeChanged); 130 if (timeChanged) { 131 delete eLast; 132 } 133 else { 134 _eph.insert(prn, new t_ephPair(eLast)); 135 } 123 136 } 124 137 ephBufferChanged();
Note:
See TracChangeset
for help on using the changeset viewer.