- Timestamp:
- Dec 18, 2010, 11:45:49 AM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpppclient.cpp
r2787 r2808 99 99 100 100 _staID = staID; 101 _epoData = 0;102 101 _model = new bncModel(staID); 103 102 connect(_model, SIGNAL(newNMEAstr(QByteArray)), … … 109 108 bncPPPclient::~bncPPPclient() { 110 109 delete _model; 111 delete _epoData; 110 while (!_epoData.empty()) { 111 delete _epoData.front(); 112 _epoData.pop(); 113 } 112 114 QMapIterator<QString, t_ephPair*> it(_eph); 113 115 while (it.hasNext()) { … … 143 145 144 146 t_satData* satData = new t_satData(); 147 satData->tt = bncTime(obs.GPSWeek, obs.GPSWeeks); 145 148 146 149 // Satellite Number … … 169 172 } 170 173 171 // Add new Satellite to the epoch 172 // ------------------------------ 173 bncTime tt(obs.GPSWeek, obs.GPSWeeks); 174 175 if (!_epoData) { 176 _epoData = new t_epoData(); 177 _epoData->tt = tt; 178 } 179 else if (tt != _epoData->tt) { 180 processEpoch(); 181 delete _epoData; 182 _epoData = new t_epoData(); 183 _epoData->tt = tt; 174 // Add new epoch, process the older ones 175 // ------------------------------------- 176 if (_epoData.size() == 0) { 177 _epoData.push(new t_epoData()); 178 _epoData.back()->tt = satData->tt; 179 } 180 else if (satData->tt != _epoData.back()->tt) { 181 processEpochs(); 182 _epoData.push(new t_epoData()); 183 _epoData.back()->tt = satData->tt; 184 184 } 185 185 … … 210 210 satData->lambda3 = c1 * t_CST::c / f1 + c2 * t_CST::c / f2; 211 211 212 _epoData ->satDataGPS[satData->prn] = satData;212 _epoData.back()->satDataGPS[satData->prn] = satData; 213 213 } 214 214 else { … … 243 243 satData->lambda3 = c1 * t_CST::c / f1 + c2 * t_CST::c / f2; 244 244 245 _epoData ->satDataGlo[satData->prn] = satData;245 _epoData.back()->satDataGlo[satData->prn] = satData; 246 246 } 247 247 else { … … 266 266 satData->L3 = c1 * satData->L1 + c5 * satData->L5; 267 267 satData->lambda3 = c1 * t_CST::c / f1 + c5 * t_CST::c / f5; 268 _epoData ->satDataGal[satData->prn] = satData;268 _epoData.back()->satDataGal[satData->prn] = satData; 269 269 } 270 270 else { … … 552 552 for (int ii = 1; ii <= 10; ii++) { 553 553 554 bncTime ToT = _epoData->tt - prange / t_CST::c - clkSat;554 bncTime ToT = satData->tt - prange / t_CST::c - clkSat; 555 555 556 556 ColumnVector xc(4); … … 576 576 // 577 577 //////////////////////////////////////////////////////////////////////////// 578 void bncPPPclient::process Epoch() {578 void bncPPPclient::processFrontEpoch() { 579 579 580 580 // Data Pre-Processing 581 581 // ------------------- 582 QMutableMapIterator<QString, t_satData*> iGPS(_epoData ->satDataGPS);582 QMutableMapIterator<QString, t_satData*> iGPS(_epoData.front()->satDataGPS); 583 583 while (iGPS.hasNext()) { 584 584 iGPS.next(); … … 593 593 } 594 594 595 QMutableMapIterator<QString, t_satData*> iGlo(_epoData ->satDataGlo);595 QMutableMapIterator<QString, t_satData*> iGlo(_epoData.front()->satDataGlo); 596 596 while (iGlo.hasNext()) { 597 597 iGlo.next(); … … 606 606 } 607 607 608 QMutableMapIterator<QString, t_satData*> iGal(_epoData ->satDataGal);608 QMutableMapIterator<QString, t_satData*> iGal(_epoData.front()->satDataGal); 609 609 while (iGal.hasNext()) { 610 610 iGal.next(); … … 621 621 // Filter Solution 622 622 // --------------- 623 if (_model->update(_epoData ) == success) {623 if (_model->update(_epoData.front()) == success) { 624 624 emit newPosition(_model->time(), _model->x(), _model->y(), _model->z()); 625 625 } 626 626 } 627 628 // 629 //////////////////////////////////////////////////////////////////////////// 630 void bncPPPclient::processEpochs() { 631 processFrontEpoch(); 632 delete _epoData.front(); 633 _epoData.pop(); 634 } -
trunk/BNC/bncpppclient.h
r2791 r2808 26 26 #define BNCPPPCLIENT_H 27 27 28 #include <queue> 28 29 #include <QtNetwork> 29 30 … … 44 45 } 45 46 ~t_satData() {} 47 bncTime tt; 46 48 QString prn; 47 49 double P1; … … 178 180 t_irc getSatPos(const bncTime& tt, const QString& prn, 179 181 ColumnVector& xc, ColumnVector& vv); 180 void processEpoch(); 182 void processEpochs(); 183 void processFrontEpoch(); 181 184 void applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, 182 185 ColumnVector& vv); … … 188 191 QMap<QString, t_corr*> _corr; 189 192 QMap<QString, t_bias*> _bias; 190 t_epoData*_epoData;193 std::queue<t_epoData*> _epoData; 191 194 bncModel* _model; 192 195 bool _useGlonass;
Note:
See TracChangeset
for help on using the changeset viewer.