Changeset 6137 in ntrip for trunk/BNC/src/pppRun.cpp
- Timestamp:
- Sep 13, 2014, 12:19:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/pppRun.cpp
r6046 r6137 90 90 } 91 91 92 connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_ obs>)),93 this, SLOT(slotNewObs(QByteArray, QList<t_ obs>)),conType);92 connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_satObs>)), 93 this, SLOT(slotNewObs(QByteArray, QList<t_satObs>)),conType); 94 94 95 95 connect(BNC_CORE, SIGNAL(newEphGPS(gpsephemeris)), … … 186 186 // 187 187 //////////////////////////////////////////////////////////////////////////// 188 void t_pppRun::slotNewObs(QByteArray staID, QList<t_ obs> obsList) {188 void t_pppRun::slotNewObs(QByteArray staID, QList<t_satObs> obsList) { 189 189 QMutexLocker locker(&_mutex); 190 190 … … 195 195 // Loop over all obsevations (possible different epochs) 196 196 // ----------------------------------------------------- 197 QListIterator<t_ obs> it(obsList);197 QListIterator<t_satObs> it(obsList); 198 198 while (it.hasNext()) { 199 const t_obs& oldObs = it.next(); 200 t_satObs* newObs = new t_satObs; 201 202 newObs->_prn.set(oldObs.satSys, oldObs.satNum); 203 newObs->_time.set(oldObs.GPSWeek, oldObs.GPSWeeks); 199 const t_satObs& oldObs = it.next(); 200 t_satObs* newObs = new t_satObs(oldObs); 204 201 205 202 // Find the corresponding data epoch or create a new one … … 221 218 } 222 219 223 // Fill the new observation and add it to the correspondingepoch224 // ----------------------- ---------------------------------------220 // Put data into the epoch 221 // ----------------------- 225 222 if (epoch != 0) { 226 223 epoch->_satObs.push_back(newObs); 227 map<string, t_frqObs*> frqObsMap; 228 for (unsigned iEntry = 0; iEntry < GNSSENTRY_NUMBER; iEntry++) { 229 string hlp = oldObs.rnxStr(iEntry).toAscii().data(); 230 if (hlp.length() >= 2 && oldObs._measdata[iEntry] != 0.0) { 231 char obsType = hlp[0]; 232 string rnxType2ch = hlp.substr(1); 233 if (obsType == 'C' || obsType == 'L') { 234 t_frqObs* frqObs = 0; 235 if (frqObsMap.find(rnxType2ch) == frqObsMap.end()) { 236 frqObs = new t_frqObs(); 237 frqObsMap[rnxType2ch] = frqObs; 238 frqObs->_rnxType2ch = rnxType2ch; 239 newObs->_obs.push_back(frqObs); 240 } 241 else { 242 frqObs = frqObsMap[rnxType2ch]; 243 } 244 if (obsType == 'C') { 245 frqObs->_code = oldObs._measdata[iEntry]; 246 frqObs->_codeValid = true; 247 } 248 else if (obsType == 'L') { 249 frqObs->_phase = oldObs._measdata[iEntry]; 250 frqObs->_phaseValid = true; 251 } 252 } 253 } 254 } 224 } 225 else { 226 delete newObs; 255 227 } 256 228 } … … 477 449 // Create list of observations and start epoch processing 478 450 // ------------------------------------------------------ 479 QList<t_ obs> obsList;451 QList<t_satObs> obsList; 480 452 for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) { 481 453 const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs]; 482 454 483 t_ obs obs;455 t_satObs obs; 484 456 t_rnxObsFile::setObsFromRnx(_rnxObsFile, epo, rnxSat, obs); 485 457 obsList << obs;
Note:
See TracChangeset
for help on using the changeset viewer.