Changeset 10216 in ntrip for trunk/BNC/src/combination
- Timestamp:
- Sep 22, 2023, 8:18:12 AM (15 months ago)
- Location:
- trunk/BNC/src/combination
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/combination/bncbiassnx.cpp
r10038 r10216 297 297 //////////////////////////////////////////////////////////////////////////// 298 298 void bncBiasSnx::determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2, 299 t_satCodeBias *satCodeBias) {299 t_satCodeBias& satCodeBias) { 300 300 std::string rnxType2ch; 301 301 double value; … … 520 520 521 521 void bncBiasSnx::setSsrSatCodeBias(std::string rnxType2ch, double value, 522 t_satCodeBias *satCodeBias) {522 t_satCodeBias& satCodeBias) { 523 523 t_frqCodeBias frqCodeBias; 524 524 … … 526 526 frqCodeBias._value = value; 527 527 528 satCodeBias ->_bias.push_back(frqCodeBias);528 satCodeBias._bias.push_back(frqCodeBias); 529 529 return; 530 530 } -
trunk/BNC/src/combination/bncbiassnx.h
r10038 r10216 49 49 _startTime = startTime; 50 50 } 51 ~snxSatCodeBias() {_biasMap.clear();} 51 ~snxSatCodeBias() { 52 _biasMap.clear(); 53 } 52 54 bncTime _startTime; 53 55 QMap<QString, double> _biasMap; … … 59 61 ~bncBiasSnx(); 60 62 t_irc readFile(const QString& fileName); 61 void determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2, t_satCodeBias *satCodeBias);62 void setSsrSatCodeBias(std::string rnxType2ch, double value, t_satCodeBias *satCodeBias);63 void determineSsrSatCodeBiases(QString prn, double aIF1, double aIF2, t_satCodeBias& satCodeBias); 64 void setSsrSatCodeBias(std::string rnxType2ch, double value, t_satCodeBias& satCodeBias); 63 65 64 66 private: -
trunk/BNC/src/combination/bnccomb.cpp
r10200 r10216 295 295 } 296 296 297 298 297 // Maximal Residuum 299 298 // ---------------- … … 311 310 delete icAC.next(); 312 311 } 312 313 313 delete _rtnetDecoder; 314 314 315 if (_ssrCorr) { 315 316 delete _ssrCorr; 317 316 318 } 317 319 delete _antex; … … 327 329 _buffer.remove(sys); 328 330 } 331 329 332 while (!_epoClkData.empty()) { 330 333 delete _epoClkData.front(); 331 334 _epoClkData.pop_front(); 332 335 } 336 333 337 } 334 338 … … 388 392 // Store the correction 389 393 // -------------------- 390 QMap<t_prn, t_orbCorr*>& storage = _orbCorrections[acName]; 391 if (storage[orbCorr._prn]) { 392 delete storage[orbCorr._prn]; 393 } 394 storage[orbCorr._prn] = new t_orbCorr(orbCorr); 394 QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName]; 395 storage[orbCorr._prn] = orbCorr; 395 396 } 396 397 } … … 427 428 // Store the correction 428 429 // -------------------- 429 QMap<t_prn, t_satCodeBias*>& storage = _satCodeBiases[acName]; 430 if (storage[satCodeBias._prn]) { 431 delete storage[satCodeBias._prn]; 432 } 433 storage[satCodeBias._prn] = new t_satCodeBias(satCodeBias); 430 QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName]; 431 storage[satCodeBias._prn] = satCodeBias; 434 432 } 435 433 } … … 623 621 corr->_eph = lastEph; 624 622 625 corr->_orbCorr ->_xr += dRAO;626 corr->_orbCorr ->_dotXr += dDotRAO;627 corr->_clkCorr ->_dClk -= dC;623 corr->_orbCorr._xr += dRAO; 624 corr->_orbCorr._dotXr += dDotRAO; 625 corr->_clkCorr._dClk -= dC; 628 626 } 629 627 … … 660 658 newCorr->_acName = acName; 661 659 newCorr->_weightFactor = weigthFactor; 662 newCorr->_clkCorr = new t_clkCorr(*clkCorrVec[ii]);660 newCorr->_clkCorr = t_clkCorr(static_cast<t_clkCorr>(*clkCorr)); 663 661 664 662 // Check orbit correction … … 669 667 } 670 668 else { 671 QMap<t_prn, t_orbCorr *>& storage = _orbCorrections[acName];669 QMap<t_prn, t_orbCorr>& storage = _orbCorrections[acName]; 672 670 if (!storage.contains(clkCorr->_prn) || 673 storage[clkCorr->_prn] ->_iod != newCorr->_iod) {671 storage[clkCorr->_prn]._iod != newCorr->_iod) { 674 672 delete newCorr; 675 673 continue; … … 686 684 if (ephLast == 0) { 687 685 #ifdef BNC_DEBUG_CMB 688 emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1(), true);686 //emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1(), true); 689 687 #endif 690 688 delete newCorr; … … 695 693 ephLast->checkState() == t_eph::unhealthy) { 696 694 #ifdef BNC_DEBUG_CMB 697 emit newMessage("bncComb: ephLast not ok (checkState: " + ephLast->checkStateToString().toLatin1() + ") for " + prn.mid(0,3).toLatin1(), true);695 // emit newMessage("bncComb: ephLast not ok (checkState: " + ephLast->checkStateToString().toLatin1() + ") for " + prn.mid(0,3).toLatin1(), true); 698 696 #endif 699 697 delete newCorr; … … 711 709 else { 712 710 #ifdef BNC_DEBUG_CMB 713 emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1() +714 QString(" with IOD %1").arg(newCorr->_iod).toLatin1(), true);711 // emit newMessage("bncComb: eph not found for " + prn.mid(0,3).toLatin1() + 712 // QString(" with IOD %1").arg(newCorr->_iod).toLatin1(), true); 715 713 #endif 716 714 delete newCorr; … … 722 720 // ---------------------------- 723 721 if (_satCodeBiases.contains(acName)) { 724 QMap<t_prn, t_satCodeBias *>& storage = _satCodeBiases[acName];722 QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName]; 725 723 if (storage.contains(clkCorr->_prn)) { 726 724 newCorr->_satCodeBias = storage[clkCorr->_prn]; … … 731 729 char attrib = cmbRefSig::toAttrib(sys, static_cast<cmbRefSig::type>(ii)); 732 730 QString rnxType2ch = QString("%1%2").arg(frqNum).arg(attrib); 733 for (unsigned ii = 0; ii < newCorr->_satCodeBias ->_bias.size(); ii++) {734 const t_frqCodeBias& bias = newCorr->_satCodeBias ->_bias[ii];731 for (unsigned ii = 0; ii < newCorr->_satCodeBias._bias.size(); ii++) { 732 const t_frqCodeBias& bias = newCorr->_satCodeBias._bias[ii]; 735 733 if (rnxType2ch.toStdString() == bias._rnxType2ch) { 736 734 codeBiasesRefSig[frqType] = bias._value; … … 748 746 } 749 747 } 750 newCorr->_satCodeBias ->_bias.clear();748 newCorr->_satCodeBias._bias.clear(); 751 749 } 752 750 } … … 876 874 t_frequency::type fType1 = cmbRefSig::toFreq(sys, cmbRefSig::c1); 877 875 t_frequency::type fType2 = cmbRefSig::toFreq(sys, cmbRefSig::c2); 878 if (resCorr[pp->prn]->_satCodeBias == 0) {879 resCorr[pp->prn]->_satCodeBias = new t_satCodeBias();880 }881 876 _bsx->determineSsrSatCodeBiases(pp->prn.mid(0,3), codeCoeff[fType1], codeCoeff[fType2], resCorr[pp->prn]->_satCodeBias); 882 877 } … … 895 890 dumpResults(epoTime, resCorr); 896 891 } 897 // Delete Data 898 // ----------- 892 899 893 _buffer.remove(sys); 900 894 } … … 1044 1038 1045 1039 // ORBIT 1046 t_orbCorr orbCorr( static_cast<t_orbCorr>(*corr->_orbCorr));1040 t_orbCorr orbCorr(corr->_orbCorr); 1047 1041 orbCorr._staID = "INTERNAL"; 1048 1042 orbCorrections.push_back(orbCorr); 1049 1043 1050 1044 // CLOCK 1051 t_clkCorr clkCorr( static_cast<t_clkCorr>(*corr->_clkCorr));1045 t_clkCorr clkCorr(corr->_clkCorr); 1052 1046 clkCorr._staID = "INTERNAL"; 1053 1047 clkCorr._dClk = corr->_dClkResult; … … 1113 1107 1114 1108 // CODE BIASES 1115 if (corr->_satCodeBias ) {1116 t_satCodeBias satCodeBias( static_cast<t_satCodeBias>(*corr->_satCodeBias));1109 if (corr->_satCodeBias._bias.size()) { 1110 t_satCodeBias satCodeBias(corr->_satCodeBias); 1117 1111 satCodeBias._staID = "INTERNAL"; 1118 1112 satCodeBiasList.push_back(satCodeBias); … … 1191 1185 } 1192 1186 1193 ll(iObs) = (corr->_clkCorr ->_dClk * t_CST::c - corr->_satCodeBiasIF) - DotProduct(AA.Row(iObs), x0);1187 ll(iObs) = (corr->_clkCorr._dClk * t_CST::c - corr->_satCodeBiasIF) - DotProduct(AA.Row(iObs), x0); 1194 1188 1195 1189 PP(iObs, iObs) *= 1.0 / (corr->_weightFactor * corr->_weightFactor); … … 1448 1442 if (meanRao.find(prn) == meanRao.end()) { 1449 1443 meanRao[prn].ReSize(4); 1450 meanRao[prn].Rows(1,3) = corr->_orbCorr ->_xr;1444 meanRao[prn].Rows(1,3) = corr->_orbCorr._xr; 1451 1445 meanRao[prn](4) = 1; 1452 1446 } 1453 1447 else { 1454 meanRao[prn].Rows(1,3) += corr->_orbCorr ->_xr;1448 meanRao[prn].Rows(1,3) += corr->_orbCorr._xr; 1455 1449 meanRao[prn](4) += 1; 1456 1450 } … … 1474 1468 meanRao[prn](4) = 0; 1475 1469 } 1476 corr->_diffRao = corr->_orbCorr ->_xr - meanRao[prn].Rows(1,3);1470 corr->_diffRao = corr->_orbCorr._xr - meanRao[prn].Rows(1,3); 1477 1471 if (maxDiff.find(prn) == maxDiff.end()) { 1478 1472 maxDiff[prn] = corr; -
trunk/BNC/src/combination/bnccomb.h
r10116 r10216 99 99 cmbCorr() { 100 100 _eph = 0; 101 _orbCorr = 0;102 _clkCorr = 0;103 _satCodeBias = 0;104 101 _iod = 0; 105 102 _dClkResult = 0.0; … … 112 109 unsigned long _iod; 113 110 t_eph* _eph; 114 t_orbCorr *_orbCorr;115 t_clkCorr *_clkCorr;116 t_satCodeBias *_satCodeBias;111 t_orbCorr _orbCorr; 112 t_clkCorr _clkCorr; 113 t_satCodeBias _satCodeBias; 117 114 QString _acName; 118 115 double _satCodeBiasIF; … … 248 245 bncTime _lastClkCorrTime; 249 246 bncTime _resTime; 250 QMap<char, QVector<cmbParam*>> _params;251 247 QMap<char, cmbEpoch> _buffer; 252 248 bncRtnetDecoder* _rtnetDecoder; … … 256 252 bncBiasSnx* _bsx; 257 253 double _MAXRES; 254 e_method _method; 255 int _cmbSampl; 256 int _ms; 258 257 QMap<char, QString> _masterOrbitAC; 259 258 QMap<char, unsigned> _masterMissingEpochs; 260 259 QMap<char, bool> _masterIsAPC; 261 e_method _method;262 int _cmbSampl;263 int _ms;264 260 QString _cmbRefAttributes; 265 QMap<QString, QMap<t_prn, t_orbCorr*> > _orbCorrections; 266 QMap<QString, QMap<t_prn, t_satCodeBias*> > _satCodeBiases; 261 QMap<char, QVector<cmbParam*>> _params; 262 QMap<QString, QMap<t_prn, t_orbCorr> > _orbCorrections; 263 QMap<QString, QMap<t_prn, t_satCodeBias> > _satCodeBiases; 264 QMap<char, unsigned> _cmbSysPrn; 267 265 bncEphUser _ephUser; 268 266 SsrCorr* _ssrCorr; 269 QMap<char, unsigned> _cmbSysPrn;270 267 bool _useGps; 271 268 bool _useGlo;
Note:
See TracChangeset
for help on using the changeset viewer.