- Timestamp:
- Apr 18, 2013, 5:15:00 PM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/ephemeris.cpp
r5119 r5133 375 375 // Set Glonass Ephemeris 376 376 //////////////////////////////////////////////////////////////////////////// 377 void t_ephGlo::set(const glonassephemeris* ee , bool& timeChanged) {377 void t_ephGlo::set(const glonassephemeris* ee) { 378 378 379 379 _receptDateTime = currentDateAndTimeGPS(); … … 387 387 // Check the day once more 388 388 // ----------------------- 389 timeChanged = false;389 bool timeChanged = false; 390 390 { 391 391 const double secPerDay = 24 * 3600.0; -
trunk/BNC/src/RTCM3/ephemeris.h
r4904 r5133 141 141 virtual int RTCM3(unsigned char *); 142 142 143 void set(const glonassephemeris* ee , bool& timeChanged);143 void set(const glonassephemeris* ee); 144 144 145 145 int slotNum() const {return int(_frequency_number);} -
trunk/BNC/src/bnccore.cpp
r5129 r5133 518 518 519 519 t_ephGlo eph; 520 bool timeChanged; 521 eph.set(ep, timeChanged); 520 eph.set(ep); 522 521 523 522 QString strV2 = eph.toString(2.11); -
trunk/BNC/src/bncephuser.cpp
r5070 r5133 77 77 QMutexLocker locker(&_mutex); 78 78 79 QString prn = QString("G%1").arg(gpseph.satellite, 2, 10, QChar('0')); 79 t_ephGPS* eNew = new t_ephGPS(); eNew->set(&gpseph); 80 81 const QString& prn = eNew->prn(); 80 82 81 83 if (_eph.contains(prn)) { 82 84 t_ephGPS* eLast = static_cast<t_ephGPS*>(_eph.value(prn)->last); 83 bncTime toc(gpseph.GPSweek, gpseph.TOC); 84 if (eLast->TOC() < toc) { 85 delete static_cast<t_ephGPS*>(_eph.value(prn)->prev); 85 if (eNew->isNewerThan(eLast)) { 86 delete _eph.value(prn)->prev; 86 87 _eph.value(prn)->prev = _eph.value(prn)->last; 87 _eph.value(prn)->last = new t_ephGPS(); 88 static_cast<t_ephGPS*>(_eph.value(prn)->last)->set(&gpseph); 88 _eph.value(prn)->last = eNew; 89 ephBufferChanged(); 90 } 91 else { 92 delete eNew; 89 93 } 90 94 } 91 95 else { 92 t_ephGPS* eLast = new t_ephGPS(); 93 eLast->set(&gpseph); 94 _eph.insert(prn, new t_ephPair(eLast)); 95 } 96 ephBufferChanged(); 96 _eph.insert(prn, new t_ephPair(eNew)); 97 ephBufferChanged(); 98 } 97 99 } 98 100 … … 102 104 QMutexLocker locker(&_mutex); 103 105 104 QString prn = QString("R%1").arg(gloeph.almanac_number, 2, 10, QChar('0')); 106 t_ephGlo* eNew = new t_ephGlo(); eNew->set(&gloeph); 107 108 const QString& prn = eNew->prn(); 105 109 106 110 if (_eph.contains(prn)) { 107 int ww = gloeph.GPSWeek;108 int tow = gloeph.GPSTOW;109 updatetime(&ww, &tow, gloeph.tb*1000, 0); // Moscow -> GPS110 111 t_ephGlo* eLast = static_cast<t_ephGlo*>(_eph.value(prn)->last); 111 bncTime toc(ww, tow); 112 if (eLast->TOC() < toc) { 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 } 112 if (eNew->isNewerThan(eLast)) { 113 delete _eph.value(prn)->prev; 114 _eph.value(prn)->prev = _eph.value(prn)->last; 115 _eph.value(prn)->last = eNew; 116 ephBufferChanged(); 117 } 118 else { 119 delete eNew; 124 120 } 125 121 } 126 122 else { 127 t_ephGlo* eLast = new t_ephGlo(); 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 } 136 } 137 ephBufferChanged(); 123 _eph.insert(prn, new t_ephPair(eNew)); 124 ephBufferChanged(); 125 } 138 126 } 139 127
Note:
See TracChangeset
for help on using the changeset viewer.