Changeset 6442 in ntrip
- Timestamp:
- Dec 26, 2014, 12:03:26 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/RTCM2Decoder.cpp
r6441 r6442 291 291 prn = sys + QString("%1").arg(corr->PRN - 200, 2, 10, QChar('0')); 292 292 } 293 294 const t_ephPair* ePair = ephPair(prn);295 293 296 294 double L1 = 0; … … 354 352 355 353 // Select corresponding ephemerides 356 if (ePair) { 357 if (ePair->last && ePair->last->IOD() == IODcorr) { 358 eph = ePair->last; 359 } 360 else if (ePair->prev && ePair->prev->IOD() == IODcorr) { 361 eph = ePair->prev; 362 } 354 if (ephLast(prn) && ephLast(prn)->IOD() == IODcorr) { 355 eph = ephLast(prn); 356 } 357 else if (ephPrev(prn) && ephPrev(prn)->IOD() == IODcorr) { 358 eph = ephPrev(prn); 363 359 } 364 360 -
trunk/BNC/src/bncephuser.h
r6441 r6442 40 40 Q_OBJECT 41 41 42 public slots: 43 void slotNewGPSEph(t_ephGPS); 44 void slotNewGlonassEph(t_ephGlo); 45 void slotNewGalileoEph(t_ephGal); 46 void slotNewSBASEph(t_ephSBAS); 47 42 48 public: 43 49 bncEphUser(bool connectSlots); 44 50 virtual ~bncEphUser(); 51 52 t_irc putNewEph(const t_eph* newEph); 53 54 const t_eph* ephLast(const QString& prn) { 55 if (_eph.contains(prn)) { 56 return _eph[prn]->last; 57 } 58 return 0; 59 } 60 61 const t_eph* ephPrev(const QString& prn) { 62 if (_eph.contains(prn)) { 63 return _eph[prn]->prev; 64 } 65 return 0; 66 } 67 68 protected: 69 virtual void ephBufferChanged() {} 45 70 46 71 class t_ephPair { … … 58 83 }; 59 84 60 const t_ephPair* ephPair(const QString& prn) {61 if (_eph.contains(prn)) {62 return _eph[prn];63 }64 else {65 return 0;66 }67 }68 69 t_irc putNewEph(const t_eph* newEph);70 71 public slots:72 void slotNewGPSEph(t_ephGPS);73 void slotNewGlonassEph(t_ephGlo);74 void slotNewGalileoEph(t_ephGal);75 void slotNewSBASEph(t_ephSBAS);76 77 protected:78 virtual void ephBufferChanged() {}79 85 QMutex _mutex; 80 86 QMap<QString, t_ephPair*> _eph; -
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r6441 r6442 73 73 } 74 74 else { 75 _usedEph = new QMap<QString, t_eph*>;75 _usedEph = new QMap<QString, const t_eph*>; 76 76 } 77 77 … … 348 348 in >> prn; 349 349 350 t_eph* eph = 0;351 const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);352 if (ephPair) {353 354 eph = ephPair->last;350 const t_eph* ephLast = _ephUser->ephLast(prn); 351 const t_eph* ephPrev = _ephUser->ephPrev(prn); 352 const t_eph* eph = ephLast; 353 354 if (eph) { 355 355 356 356 // Use previous ephemeris if the last one is too recent 357 357 // ---------------------------------------------------- 358 358 const int MINAGE = 60; // seconds 359 if (ephP air->prev && eph->receptDateTime().isValid() &&359 if (ephPrev && eph->receptDateTime().isValid() && 360 360 eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) { 361 eph = ephP air->prev;361 eph = ephPrev; 362 362 } 363 363 … … 371 371 eph = 0; 372 372 if (_usedEph->contains(prn)) { 373 t_eph* usedEph = _usedEph->value(prn);374 if (usedEph == eph Pair->last) {375 eph = eph Pair->last;376 } 377 else if (usedEph == ephP air->prev) {378 eph = ephP air->prev;373 const t_eph* usedEph = _usedEph->value(prn); 374 if (usedEph == ephLast) { 375 eph = ephLast; 376 } 377 else if (usedEph == ephPrev) { 378 eph = ephPrev; 379 379 } 380 380 } … … 638 638 // 639 639 //////////////////////////////////////////////////////////////////////////// 640 void bncRtnetUploadCaster::processSatellite( t_eph* eph, int GPSweek,640 void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek, 641 641 double GPSweeks, const QString& prn, 642 642 const ColumnVector& rtnAPC, -
trunk/BNC/src/upload/bncrtnetuploadcaster.h
r5130 r6442 29 29 virtual ~bncRtnetUploadCaster(); 30 30 private: 31 void processSatellite( t_eph* eph, int GPSweek,31 void processSatellite(const t_eph* eph, int GPSweek, 32 32 double GPSweeks, const QString& prn, 33 33 const ColumnVector& rtnAPC, … … 65 65 bncClockRinex* _rnx; 66 66 bncSP3* _sp3; 67 QMap<QString, t_eph*>* _usedEph;67 QMap<QString, const t_eph*>* _usedEph; 68 68 }; 69 69
Note:
See TracChangeset
for help on using the changeset viewer.