Changeset 9598 in ntrip for trunk/BNC/src/PPP
- Timestamp:
- Jan 12, 2022, 2:14:56 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppSatObs.cpp
r9596 r9598 65 65 // Select pseudo-ranges and phase observations 66 66 // ------------------------------------------- 67 string preferredAttrib = "G:12&WCPSLX R:12&PC E:1&CBX E:5&QIX C:26&IQX"; 67 68 QString preferredAttribList = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX"; 68 69 if (OPT->_obsModelType == OPT->DCMcodeBias || 69 70 OPT->_obsModelType == OPT->DCMphaseBias) { 70 // at the moment only one code or phase bias per system (G,R,E,C)/modulation considered, 71 preferredAttrib = "G:12&W R:12&P E:1&CX E:5&QX C:26&I"; 72 } 73 71 // at the moment only one code or phase bias per system (G,R,E,C)/modulation considered 72 preferredAttribList = "G:12&CW R:12&CP E:1&CX E:5&QX C:26&I"; 73 } 74 QStringList priorList = preferredAttribList.split(" ", QString::SkipEmptyParts); 75 string preferredAttrib; 76 char obsSys = pppSatObs._prn.system(); //cout << "SATELLITE: " << pppSatObs._prn.toString() << endl; 74 77 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 75 string frqNum = t_frequency::toString(t_frequency::type(iFreq)).substr(1); 76 for (unsigned iPref = 0; iPref < preferredAttrib.length(); iPref++) { 77 string obsType = (preferredAttrib[iPref] == '_') ? frqNum : frqNum + preferredAttrib[iPref]; 78 if (_obs[iFreq] == 0) { 79 for (unsigned ii = 0; ii < pppSatObs._obs.size(); ii++) { 80 const t_frqObs* obs = pppSatObs._obs[ii]; 81 if (obs->_rnxType2ch == obsType && 82 obs->_codeValid && obs->_code && 83 obs->_phaseValid && obs->_phase && 84 obs->_lockTimeValid && obs->_lockTime > 5.0) { 85 _obs[iFreq] = new t_frqObs(*obs); 78 t_frequency::type frqType = static_cast<t_frequency::type>(iFreq); 79 char frqSys = t_frequency::toString(frqType)[0]; //cout << "frqSys: " << frqSys << endl; 80 char frqNum = t_frequency::toString(frqType)[1]; //cout << "frqNum: " << frqNum << endl; 81 if (obsSys != frqSys) { 82 continue; 83 } 84 QStringList hlp; 85 for (int ii = 0; ii < priorList.size(); ii++) { 86 if (priorList[ii].indexOf(":") != -1) { 87 hlp = priorList[ii].split(":", QString::SkipEmptyParts); 88 if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == frqSys) { 89 hlp = hlp[1].split("&", QString::SkipEmptyParts); 90 } 91 if (hlp.size() == 2 && hlp[0].indexOf(frqNum) != -1) { 92 preferredAttrib = hlp[1].toStdString(); //cout << "preferredAttrib: " << preferredAttrib << endl; 93 } 94 } 95 for (unsigned iPref = 0; iPref < preferredAttrib.length(); iPref++) { 96 QString obsType = QString("%1").arg(frqNum) + preferredAttrib[iPref]; //cout << "obstype: " << obsType.toStdString().c_str() << endl; 97 if (_obs[iFreq] == 0) { 98 for (unsigned ii = 0; ii < pppSatObs._obs.size(); ii++) { 99 const t_frqObs* obs = pppSatObs._obs[ii]; 100 //cout << "observation2char: " << obs->_rnxType2ch << " vs. " << obsType.toStdString().c_str()<< endl; 101 if (obs->_rnxType2ch == obsType.toStdString() && 102 obs->_codeValid && obs->_code && 103 obs->_phaseValid && obs->_phase && 104 obs->_lockTimeValid && obs->_lockTime > 5.0) { 105 _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch <<endl; 106 } 86 107 } 87 108 } … … 436 457 for (unsigned ii = 0; ii < t_frequency::max; ii++) { 437 458 t_frequency::type frqType = static_cast<t_frequency::type>(ii); 459 string frqStr = t_frequency::toString(frqType); 460 if (frqStr[0] != _prn.system()) {continue;} 438 461 bool found; 439 462 QString prn(_prn.toString().c_str()); … … 470 493 const t_frqCodeBias& bias = satCodeBias->_bias[ii]; 471 494 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 495 string frqStr = t_frequency::toString(t_frequency::type(iFreq)); 496 if (frqStr[0] != _prn.system()) { 497 continue; 498 } 472 499 const t_frqObs* obs = _obs[iFreq]; 473 500 if (obs && obs->_rnxType2ch == bias._rnxType2ch) { … … 493 520 const t_frqPhaseBias& bias = satPhaseBias->_bias[ii]; 494 521 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 522 string frqStr = t_frequency::toString(t_frequency::type(iFreq)); 523 if (frqStr[0] != _prn.system()) { 524 continue; 525 } 495 526 const t_frqObs* obs = _obs[iFreq]; 496 527 if (obs && obs->_rnxType2ch == bias._rnxType2ch) { … … 561 592 LOG << "\nMODEL for Satellite " << _prn.toString() << (isReference() ? " (Reference Satellite)" : "") 562 593 563 << " ======================= " << endl594 << "\n======================= " << endl 564 595 << "PPP STRATEGY : " << OPT->_obsmodelTypeStr.at((int)OPT->_obsModelType).toLocal8Bit().constData() 565 596 << ((OPT->_pseudoObsIono) ? " with pseudo-observations for STEC" : "") << endl … … 584 615 if (_prn.system() == frqStr[0]) { 585 616 LOG << "PCO : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq] << endl 586 << "BIAS CODE : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq] << endl587 << "BIAS PHASE : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << endl617 << "BIAS CODE : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq] << "\t(" << _obs[iFreq]->_rnxType2ch[1] << ") " << endl 618 << "BIAS PHASE : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << "\t(" << _obs[iFreq]->_rnxType2ch[1] << ") " << endl 588 619 << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq]<< endl; 589 620 }
Note:
See TracChangeset
for help on using the changeset viewer.