Changeset 2905 in ntrip
- Timestamp:
- Jan 27, 2011, 1:57:40 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncephuser.h
r2904 r2905 64 64 void slotNewEphGalileo(galileoephemeris galeph); 65 65 66 pr ivate:66 protected: 67 67 68 68 class t_ephPair { -
trunk/BNC/bncpppclient.cpp
r2812 r2905 86 86 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool))); 87 87 88 connect(((bncApp*)qApp), SIGNAL(newEphGPS(gpsephemeris)),89 this, SLOT(slotNewEphGPS(gpsephemeris)));90 91 connect(((bncApp*)qApp), SIGNAL(newEphGlonass(glonassephemeris)),92 this, SLOT(slotNewEphGlonass(glonassephemeris)));93 94 connect(((bncApp*)qApp), SIGNAL(newEphGalileo(galileoephemeris)),95 this, SLOT(slotNewEphGalileo(galileoephemeris)));96 97 88 connect(((bncApp*)qApp), SIGNAL(newCorrections(QList<QString>)), 98 89 this, SLOT(slotNewCorrections(QList<QString>))); … … 111 102 delete _epoData.front(); 112 103 _epoData.pop(); 113 }114 QMapIterator<QString, t_ephPair*> it(_eph);115 while (it.hasNext()) {116 it.next();117 delete it.value();118 104 } 119 105 QMapIterator<QString, t_corr*> ic(_corr); … … 271 257 delete satData; 272 258 } 273 }274 }275 276 //277 ////////////////////////////////////////////////////////////////////////////278 void bncPPPclient::slotNewEphGPS(gpsephemeris gpseph) {279 QMutexLocker locker(&_mutex);280 281 QString prn = QString("G%1").arg(gpseph.satellite, 2, 10, QChar('0'));282 283 if (_eph.contains(prn)) {284 t_ephGPS* eLast = static_cast<t_ephGPS*>(_eph.value(prn)->last);285 if ( (eLast->GPSweek() < gpseph.GPSweek) ||286 (eLast->GPSweek() == gpseph.GPSweek &&287 eLast->TOC() < gpseph.TOC) ) {288 delete static_cast<t_ephGPS*>(_eph.value(prn)->prev);289 _eph.value(prn)->prev = _eph.value(prn)->last;290 _eph.value(prn)->last = new t_ephGPS();291 static_cast<t_ephGPS*>(_eph.value(prn)->last)->set(&gpseph);292 }293 }294 else {295 t_ephGPS* eLast = new t_ephGPS();296 eLast->set(&gpseph);297 _eph.insert(prn, new t_ephPair());298 _eph[prn]->last = eLast;299 }300 }301 302 //303 ////////////////////////////////////////////////////////////////////////////304 void bncPPPclient::slotNewEphGlonass(glonassephemeris gloeph) {305 QMutexLocker locker(&_mutex);306 307 QString prn = QString("R%1").arg(gloeph.almanac_number, 2, 10, QChar('0'));308 309 if (_eph.contains(prn)) {310 int ww = gloeph.GPSWeek;311 int tow = gloeph.GPSTOW;312 updatetime(&ww, &tow, gloeph.tb*1000, 0); // Moscow -> GPS313 t_ephGlo* eLast = static_cast<t_ephGlo*>(_eph.value(prn)->last);314 if (eLast->GPSweek() < ww ||315 (eLast->GPSweek() == ww && eLast->GPSweeks() < tow)) {316 delete static_cast<t_ephGlo*>(_eph.value(prn)->prev);317 _eph.value(prn)->prev = _eph.value(prn)->last;318 _eph.value(prn)->last = new t_ephGlo();319 static_cast<t_ephGlo*>(_eph.value(prn)->last)->set(&gloeph);320 }321 }322 else {323 t_ephGlo* eLast = new t_ephGlo();324 eLast->set(&gloeph);325 _eph.insert(prn, new t_ephPair());326 _eph[prn]->last = eLast;327 }328 }329 330 //331 ////////////////////////////////////////////////////////////////////////////332 void bncPPPclient::slotNewEphGalileo(galileoephemeris galeph) {333 QMutexLocker locker(&_mutex);334 335 QString prn = QString("E%1").arg(galeph.satellite, 2, 10, QChar('0'));336 337 if (_eph.contains(prn)) {338 t_ephGal* eLast = static_cast<t_ephGal*>(_eph.value(prn)->last);339 if ( (eLast->GPSweek() < galeph.Week) ||340 (eLast->GPSweek() == galeph.Week &&341 eLast->TOC() < galeph.TOC) ) {342 delete static_cast<t_ephGal*>(_eph.value(prn)->prev);343 _eph.value(prn)->prev = _eph.value(prn)->last;344 _eph.value(prn)->last = new t_ephGal();345 static_cast<t_ephGal*>(_eph.value(prn)->last)->set(&galeph);346 }347 }348 else {349 t_ephGal* eLast = new t_ephGal();350 eLast->set(&galeph);351 _eph.insert(prn, new t_ephPair());352 _eph[prn]->last = eLast;353 259 } 354 260 } -
trunk/BNC/bncpppclient.h
r2809 r2905 27 27 28 28 #include <queue> 29 #include <QtNetwork> 30 31 #include <newmat.h> 32 33 #include "bncconst.h" 34 #include "bnctime.h" 29 #include "bncephuser.h" 35 30 #include "RTCM/GPSDecoder.h" 36 #include "RTCM3/ephemeris.h"37 31 38 32 class bncModel; … … 99 93 }; 100 94 101 class t_corr {102 public:103 t_corr() {104 raoSet = false;105 dClkSet = false;106 }107 bool ready() {return raoSet && dClkSet;}108 bncTime tt;109 int iod;110 double dClk;111 double dotDClk;112 double dotDotDClk;113 ColumnVector rao;114 ColumnVector dotRao;115 ColumnVector dotDotRao;116 bool raoSet;117 bool dClkSet;118 };119 120 95 class t_bias { 121 96 public: … … 131 106 }; 132 107 133 class bncPPPclient : public QObject{108 class bncPPPclient : public bncEphUser { 134 109 Q_OBJECT 135 110 … … 140 115 141 116 public slots: 142 void slotNewEphGPS(gpsephemeris gpseph);143 void slotNewEphGlonass(glonassephemeris gloeph);144 void slotNewEphGalileo(galileoephemeris galeph);145 117 void slotNewCorrections(QList<QString> corrList); 146 118 … … 164 136 }; 165 137 166 class t_ephPair {167 public:168 t_ephPair() {169 last = 0;170 prev = 0;171 }172 ~t_ephPair() {173 delete last;174 delete prev;175 }176 t_eph* last;177 t_eph* prev;178 };179 180 138 t_irc getSatPos(const bncTime& tt, const QString& prn, 181 139 ColumnVector& xc, ColumnVector& vv); … … 187 145 188 146 QByteArray _staID; 189 QMutex _mutex;190 QMap<QString, t_ephPair*> _eph;191 147 QMap<QString, t_corr*> _corr; 192 148 bncTime _corr_tt;
Note:
See TracChangeset
for help on using the changeset viewer.