Changeset 3029 in ntrip
- Timestamp:
- Feb 24, 2011, 2:46:03 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncephuser.h
r3012 r3029 68 68 bool raoSet; 69 69 bool dClkSet; 70 t_eph* eph; 70 const t_eph* eph; 71 QString AC; 71 72 }; 72 73 -
trunk/BNC/combination/bnccomb.cpp
r3028 r3029 190 190 } 191 191 192 newCorr->AC = AC->name; 193 192 194 // Reject delayed corrections 193 195 // -------------------------- … … 197 199 } 198 200 199 // Check the IOD200 //-------------- 201 // Check the Ephemeris 202 //-------------------- 201 203 if (_eph.find(newCorr->prn) == _eph.end()) { 202 204 delete newCorr; … … 206 208 t_eph* lastEph = _eph[newCorr->prn]->last; 207 209 t_eph* prevEph = _eph[newCorr->prn]->prev; 208 if (prevEph && prevEph->IOD() == newCorr->iod) { 209 switchToLastEph(AC->name, lastEph, prevEph, newCorr); 210 } 211 else if (!lastEph || lastEph->IOD() != newCorr->iod) { 210 if (lastEph && lastEph->IOD() == newCorr->iod) { 211 newCorr->eph = lastEph; 212 } 213 else if (prevEph && prevEph->IOD() == newCorr->iod) { 214 newCorr->eph = prevEph; 215 } 216 else { 212 217 delete newCorr; 213 218 return; 214 219 } 215 newCorr->eph = lastEph;216 }220 } 221 217 222 218 223 // Process all older Epochs (if there are any) … … 357 362 // Change the correction so that it refers to last received ephemeris 358 363 //////////////////////////////////////////////////////////////////////////// 359 void bncComb::switchToLastEph(const QString& ACname, const t_eph* lastEph, 360 const t_eph* prevEph, t_corr* newCorr) { 364 void bncComb::switchToLastEph(const t_eph* lastEph, t_corr* corr) { 361 365 362 366 ColumnVector oldXC(4); 363 367 ColumnVector oldVV(3); 364 prevEph->position(newCorr->tt.gpsw(), newCorr->tt.gpssec(),365 oldXC.data(), oldVV.data());368 corr->eph->position(corr->tt.gpsw(), corr->tt.gpssec(), 369 oldXC.data(), oldVV.data()); 366 370 367 371 ColumnVector newXC(4); 368 372 ColumnVector newVV(3); 369 lastEph->position( newCorr->tt.gpsw(), newCorr->tt.gpssec(),373 lastEph->position(corr->tt.gpsw(), corr->tt.gpssec(), 370 374 newXC.data(), newVV.data()); 371 375 … … 380 384 XYZ_to_RSW(newXC.Rows(1,3), newVV, dV, dDotRAO); 381 385 382 newCorr->iod = lastEph->IOD(); 383 newCorr->rao -= dRAO; 384 newCorr->dotRao -= dDotRAO; 385 newCorr->dClk -= dC; 386 387 QString msg = "switch " + newCorr->prn 388 + QString(" %1 -> %2 %3").arg(prevEph->IOD(),3) 386 QString msg = "switch " + corr->prn 387 + QString(" %1 -> %2 %3").arg(corr->iod,3) 389 388 .arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4); 390 389 391 // Check/change the static offset parameters392 // -----------------------------------------393 for (int iPar = 1; iPar <= _params.size(); iPar++) {394 cmbParam* pp = _params[iPar-1];395 if (pp->type == cmbParam::Sat_offset &&396 pp->prn == newCorr->prn &&397 pp->AC == ACname) {398 if (pp->iod != lastEph->IOD()) {399 pp->iod = lastEph->IOD();400 msg += " need corr ";401 }402 }403 }404 405 390 emit newMessage(msg.toAscii(), false); 391 392 corr->iod = lastEph->IOD(); 393 corr->eph = lastEph; 394 corr->rao -= dRAO; 395 corr->dotRao -= dDotRAO; 396 corr->dClk -= dC; 397 398 // for (int iPar = 1; iPar <= _params.size(); iPar++) { 399 // cmbParam* pp = _params[iPar-1]; 400 // if (pp->type == cmbParam::Sat_offset && 401 // pp->prn == corr->prn && pp->AC == corr->AC) { 402 // if (pp->iod != corr->iod) { 403 // pp->xx += dC * t_CST::c; 404 // pp->iod = corr->iod; 405 // } 406 // } 407 // } 406 408 } 407 409 … … 452 454 while (itEpo.hasNext()) { 453 455 cmbEpoch* epo = itEpo.next(); 454 QM apIterator<QString, t_corr*> itCorr(epo->corr);456 QMutableMapIterator<QString, t_corr*> itCorr(epo->corr); 455 457 while (itCorr.hasNext()) { 456 458 itCorr.next(); 457 ++nObs; 459 t_corr* corr = itCorr.value(); 460 461 // Switch to new ephemeris 462 // ----------------------- 463 t_eph* lastEph = _eph[corr->prn]->last; 464 if (lastEph == corr->eph) { 465 ++nObs; 466 } 467 else { 468 if (corr->eph == _eph[corr->prn]->prev) { 469 switchToLastEph(lastEph, corr); 470 ++nObs; 471 } 472 else { 473 itCorr.remove(); 474 } 475 } 458 476 } 459 477 } … … 528 546 it.next(); 529 547 t_corr* corr = it.value(); 530 t_eph* eph = corr->eph;548 const t_eph* eph = corr->eph; 531 549 if (eph) { 532 550 double xx, yy, zz, cc; -
trunk/BNC/combination/bnccomb.h
r3028 r3029 72 72 void printResults(QTextStream& out, const bncTime& resTime, 73 73 const QMap<QString, t_corr*>& resCorr); 74 void switchToLastEph(const QString& ACname, const t_eph* lastEph, 75 const t_eph* prevEph, t_corr* newCorr); 74 void switchToLastEph(const t_eph* lastEph, t_corr* corr); 76 75 77 76 QMap<QString, cmbAC*> _ACs; // Analytical Centers (key is mountpoint)
Note:
See TracChangeset
for help on using the changeset viewer.