Changeset 10251 in ntrip for trunk/BNC/src/PPP
- Timestamp:
- Nov 20, 2023, 10:23:42 PM (21 months ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r10237 r10251 231 231 while (it != obsVector.end()) { 232 232 t_pppSatObs* pppSatObs = *it; 233 char sys = pppSatObs->prn().system();234 233 bool codeBiasesAvailable = false; 235 t_frequency::type fType1 = t_lc::toFreq(sys,t_lc::c1); 236 t_frequency::type fType2 = t_lc::toFreq(sys,t_lc::c2); 237 if (pppSatObs->getCodeBias(fType1) && 238 pppSatObs->getCodeBias(fType2)) { 239 codeBiasesAvailable = true; 234 if (pppSatObs->getCodeBias(pppSatObs->fType1()) && 235 pppSatObs->getCodeBias(pppSatObs->fType2())) { 236 codeBiasesAvailable = true; 240 237 } 241 238 if (codeBiasesAvailable) { … … 247 244 } 248 245 } 249 246 return; 250 247 } 251 248 -
trunk/BNC/src/PPP/pppFilter.cpp
r10250 r10251 307 307 const vector<t_pppSatObs*> &obsVector) { 308 308 309 const double SLIP = 20.0; 309 const double SLIP = 200.0; 310 310 string epoTimeStr = string(_epoTime); 311 311 const vector<t_pppParam*> ¶ms = _parlist->params(); -
trunk/BNC/src/PPP/pppParlist.cpp
r10232 r10251 179 179 else { 180 180 if (_tLC == t_lc::l1) { 181 return obs->lambda(t_lc::l1) * phaseCoeff[ t_lc::toFreq(obs->prn().system(),t_lc::l1)];181 return obs->lambda(t_lc::l1) * phaseCoeff[obs->fType1()]; 182 182 } 183 183 else if (_tLC == t_lc::l2) { 184 return obs->lambda(t_lc::l2) * phaseCoeff[ t_lc::toFreq(obs->prn().system(),t_lc::l2)];184 return obs->lambda(t_lc::l2) * phaseCoeff[obs->fType2()]; 185 185 } 186 186 } … … 198 198 if (obs->prn() == _prn) { 199 199 if (tLC == t_lc::c1) { 200 return ionoCoeff[ t_lc::toFreq(obs->prn().system(),t_lc::c1)];200 return ionoCoeff[obs->fType1()]; 201 201 } 202 202 else if (tLC == t_lc::c2) { 203 return ionoCoeff[ t_lc::toFreq(obs->prn().system(),t_lc::c2)];203 return ionoCoeff[obs->fType2()]; 204 204 } 205 205 else if (tLC == t_lc::l1) { 206 return ionoCoeff[ t_lc::toFreq(obs->prn().system(),t_lc::l1)];206 return ionoCoeff[obs->fType1()]; 207 207 } 208 208 else if (tLC == t_lc::l2) { 209 return ionoCoeff[ t_lc::toFreq(obs->prn().system(),t_lc::l2)];209 return ionoCoeff[obs->fType2()]; 210 210 } 211 211 else if (tLC == t_lc::GIM) { … … 414 414 } 415 415 416 if (OPT->_ obsModelType == OPT->PPPRTK || OPT->_pseudoObsIono) {416 if (OPT->_ionoModelType == OPT->PPP_RTK || OPT->_pseudoObsIono) { 417 417 vector<t_pppParam*>::iterator it = _params.begin(); 418 418 while (it != _params.end()) { … … 502 502 // Ionosphere 503 503 // ---------- 504 if (OPT->_ obsModelType == OPT->UncombPPP) {504 if (OPT->_ionoModelType == OPT->est) { 505 505 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 506 506 const t_pppSatObs* satObs = obsVector[jj]; 507 required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy)); 507 char sys = satObs->prn().system(); 508 std::vector<t_lc::type> LCs = OPT->LCs(sys); 509 if (std::find(LCs.begin(), LCs.end(), t_lc::cIF) == LCs.end() && 510 std::find(LCs.begin(), LCs.end(), t_lc::lIF) == LCs.end()) { 511 required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy)); 512 } 508 513 } 509 514 } … … 512 517 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 513 518 const t_pppSatObs* satObs = obsVector[jj]; 514 const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system()); 519 char sys = satObs->prn().system(); 520 const vector<t_lc::type>& ambLCs = OPT->ambLCs(sys); 515 521 for (unsigned ii = 0; ii < ambLCs.size(); ii++) { 516 522 required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector)); … … 520 526 // Receiver Code Biases 521 527 // -------------------- 522 if (OPT->_ obsModelType == OPT->PPPRTK) {528 if (OPT->_ionoModelType == OPT->PPP_RTK) { 523 529 std::vector<t_lc::type> lc; 524 530 if (_usedSystems.contains('G')) { … … 589 595 // Receiver Phase Biases 590 596 // --------------------- 591 if (OPT->_ obsModelType == OPT->PPPRTK) {597 if (OPT->_ionoModelType == OPT->PPP_RTK) { 592 598 std::vector<t_lc::type> lc; 593 599 if (_usedSystems.contains('G')) { -
trunk/BNC/src/PPP/pppSatObs.cpp
r10231 r10251 46 46 _stecSat = 0.0; 47 47 _signalPriorities = QString::fromStdString(OPT->_signalPriorities); 48 if (!_signalPriorities.size()) {49 _signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";50 }51 52 48 for (unsigned ii = 0; ii < t_frequency::max; ii++) { 53 49 _obs[ii] = 0; … … 66 62 // 67 63 //////////////////////////////////////////////////////////////////////////// 68 void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) { 64 void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {//cout << "SATELLITE: " << _prn.toString() << endl; 69 65 70 66 _model.reset(); 67 68 std::vector<char> bb = OPT->frqBands(_prn.system()); 69 char frqNum1 = '0'; 70 if (bb.size() >= 1) { 71 frqNum1 = bb[0]; 72 } 73 char frqNum2 = '0'; 74 if (bb.size() == 2) { 75 frqNum2 = bb[1]; 76 } 71 77 72 78 // Select pseudo-ranges and phase observations … … 74 80 QStringList priorList = _signalPriorities.split(" ", QString::SkipEmptyParts); 75 81 string preferredAttrib; 76 char obsSys = pppSatObs._prn.system(); //cout << "SATELLITE: " << pppSatObs._prn.toString() << endl;77 82 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 78 83 t_frequency::type frqType = static_cast<t_frequency::type>(iFreq); 79 84 char frqSys = t_frequency::toString(frqType)[0]; //cout << "frqSys: " << frqSys << endl; 80 85 char frqNum = t_frequency::toString(frqType)[1]; //cout << "frqNum: " << frqNum << endl; 81 if (obsSys != frqSys) { 86 if (frqSys != _prn.system()) { 87 continue; 88 } 89 if (frqNum != frqNum1 && 90 frqNum != frqNum2 ) { 82 91 continue; 83 92 } … … 100 109 //cout << "observation2char: " << obs->_rnxType2ch << " vs. " << obsType.toStdString().c_str()<< endl; 101 110 if (obs->_rnxType2ch == obsType.toStdString() && 102 obs->_codeValid && obs->_code && 111 obs->_codeValid && obs->_code && 103 112 obs->_phaseValid && obs->_phase) { 104 113 _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch <<endl; … … 112 121 // Used frequency types 113 122 // -------------------- 114 _fType1 = t_ lc::toFreq(_prn.system(),t_lc::l1);115 _fType2 = t_ lc::toFreq(_prn.system(),t_lc::l2);123 _fType1 = t_frqBand::toFreq(_prn.system(), frqNum1); 124 _fType2 = t_frqBand::toFreq(_prn.system(), frqNum2); 116 125 117 126 // Check whether all required frequencies available … … 524 533 } 525 534 const t_frqObs* obs = _obs[iFreq]; 526 if (obs && obs->_rnxType2ch == bias._rnxType2ch) { 535 if (obs && 536 obs->_rnxType2ch == bias._rnxType2ch) { 527 537 _model._codeBias[iFreq] = bias._value; 528 538 } … … 551 561 } 552 562 const t_frqObs* obs = _obs[iFreq]; 553 if (obs && obs->_rnxType2ch == bias._rnxType2ch) { 563 if (obs && 564 obs->_rnxType2ch == bias._rnxType2ch) { 554 565 _model._phaseBias[iFreq] = bias._value; 555 566 } … … 606 617 _model._set = true; 607 618 608 //printModel();619 printModel(); 609 620 610 621 return success; … … 619 630 620 631 << "\n======================= " << endl 621 << "PPP STRATEGY : " << OPT->_obsmodelTypeStr.at((int)OPT->_obsModelType).toLocal8Bit().constData()632 << "PPP " 622 633 << ((OPT->_pseudoObsIono) ? " with pseudo-observations for STEC" : "") << endl 623 634 << "RHO : " << setw(12) << setprecision(3) << _model._rho << endl … … 701 712 t_frequency::type tFreq = it->first; 702 713 dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]); 703 if (OPT->PPPRTK) { 714 if (OPT->PPP_RTK) { 704 715 dispPart += it->second * (_model._ionoCodeDelay[tFreq]); 705 716 } … … 709 720 dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] + 710 721 _model._windUp * t_CST::lambda(tFreq, _channel)); 711 if (OPT->PPPRTK) { 722 if (OPT->PPP_RTK) { 712 723 dispPart += it->second * (- _model._ionoCodeDelay[tFreq]); 713 724 } -
trunk/BNC/src/PPP/pppSatObs.h
r10034 r10251 50 50 double getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];} 51 51 double getCodeBias(t_frequency::type freq) {return _model._codeBias[freq];} 52 t_frequency::type fType1() const {return _fType1;} 53 t_frequency::type fType2() const {return _fType2;} 52 54 53 55 // RINEX
Note:
See TracChangeset
for help on using the changeset viewer.