Changeset 10791 in ntrip for trunk/BNC/src/PPP/pppSatObs.cpp
- Timestamp:
- Dec 3, 2025, 5:37:16 PM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/src/PPP/pppSatObs.cpp (modified) (29 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppSatObs.cpp
r10626 r10791 19 19 #include <iomanip> 20 20 #include <cmath> 21 #include <algorithm> 22 #include <set> 21 23 #include <newmatio.h> 22 24 … … 43 45 _reference = false; 44 46 _stecSat = 0.0; 45 _signalPriorities = QString::fromStdString(OPT->_signalPriorities);46 47 for (unsigned ii = 0; ii < t_frequency::max; ii++) { 47 48 _obs[ii] = 0; … … 60 61 // 61 62 //////////////////////////////////////////////////////////////////////////// 62 void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) { 63 bool t_pppSatObs::isBetter(const t_frqObs* aa, t_frqObs* bb, const string& trkModes) const { 64 65 if (!trkModes.empty()) { 66 size_t posA = trkModes.find(aa->trkChar()); 67 size_t posB = trkModes.find(bb->trkChar()); 68 if (posA != posB) { 69 if (posA == string::npos) { 70 return false; 71 } 72 else if (posB == string::npos) { 73 return true; 74 } 75 else { 76 return posA < posB; 77 } 78 } 79 } 80 81 unsigned numValA = 0; 82 if (aa->_codeValid) numValA += 1; 83 if (aa->_phaseValid) numValA += 1; 84 85 unsigned numValB = 0; 86 if (bb->_codeValid) numValB += 1; 87 if (bb->_phaseValid) numValB += 1; 88 89 if (numValA != numValB) { 90 return numValA > numValB; 91 } 92 93 return false; 94 } 95 96 // 97 //////////////////////////////////////////////////////////////////////////// 98 void t_pppSatObs::prepareObs(const t_satObs& satObs) { 63 99 64 100 _model.reset(); 65 101 66 std::vector<char> bb = OPT->frqBands(_prn.system()); 67 char frqNum1 = '0'; 68 if (bb.size() >= 1) { 69 frqNum1 = bb[0]; 70 } 71 char frqNum2 = '0'; 72 if (bb.size() == 2) { 73 frqNum2 = bb[1]; 74 } 75 76 // Select pseudo-ranges and phase observations 77 // ------------------------------------------- 78 QStringList priorList = _signalPriorities.split(" ", Qt::SkipEmptyParts); 79 string preferredAttrib; 80 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 81 t_frequency::type frqType = static_cast<t_frequency::type>(iFreq); 82 char frqSys = t_frequency::toString(frqType)[0]; //cout << "frqSys: " << frqSys << endl; 83 char frqNum = t_frequency::toString(frqType)[1]; //cout << "frqNum: " << frqNum << endl; 84 if (frqSys != _prn.system()) { 85 continue; 86 } 87 if (frqNum != frqNum1 && 88 frqNum != frqNum2 ) { 89 continue; 90 } 91 QStringList hlp; 92 for (int ii = 0; ii < priorList.size(); ii++) { 93 if (priorList[ii].indexOf(":") != -1) { 94 hlp = priorList[ii].split(":", Qt::SkipEmptyParts); 95 if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == frqSys) { 96 hlp = hlp[1].split("&", Qt::SkipEmptyParts); 97 } 98 if (hlp.size() == 2 && hlp[0].indexOf(frqNum) != -1) { 99 preferredAttrib = hlp[1].toStdString(); //cout << "preferredAttrib: " << preferredAttrib << endl; 100 } 101 } 102 for (unsigned iPref = 0; iPref < preferredAttrib.length(); iPref++) { 103 QString obsType = QString("%1").arg(frqNum) + preferredAttrib[iPref]; //cout << "obstype: " << obsType.toStdString().c_str() << endl; 104 if (_obs[iFreq] == 0) { 105 for (unsigned ii = 0; ii < pppSatObs._obs.size(); ii++) { 106 const t_frqObs* obs = pppSatObs._obs[ii]; 107 //cout << "observation2char: " << obs->_rnxType2ch << " vs. " << obsType.toStdString().c_str()<< endl; 108 if (obs->_rnxType2ch == obsType.toStdString() && 109 obs->_codeValid && obs->_code && 110 obs->_phaseValid && obs->_phase) { 111 _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch << " obs->_lockTime: " << obs->_lockTime << endl; 112 } 113 } 114 } 115 } 116 } 117 } 118 119 // Used frequency types 120 // -------------------- 121 _fType1 = t_frqBand::toFreq(_prn.system(), frqNum1); 122 _fType2 = t_frqBand::toFreq(_prn.system(), frqNum2); 123 102 const t_pppOptions::SysTrkModes* sysTrkModes = OPT->sysTrkModes(_prn.system()); 103 using FrqTrkModes = t_pppOptions::SysTrkModes::FrqTrkModes; 104 105 for (const t_frqObs* obs : satObs._obs) { 106 if ( (obs->_codeValid || obs->_phaseValid)) { 107 t_frequency::type frq = t_frequency::toFreq(_prn.system(), obs->frqChar()); 108 if (frq == t_frequency::dummy) { 109 continue; 110 } 111 string trkModes; 112 if (sysTrkModes) { 113 const vector<FrqTrkModes>& frqTrkModes = sysTrkModes->_frqTrkModes; 114 auto it = find_if(frqTrkModes.begin(), frqTrkModes.end(), 115 [frq](const FrqTrkModes& mm){return mm._frq == frq;}); 116 if (it != frqTrkModes.end()) { 117 trkModes = it->_trkModes; 118 } 119 } 120 if (_obs[frq] == 0 || isBetter(obs, _obs[frq], trkModes)) { 121 delete _obs[frq]; 122 _obs[frq] = new t_frqObs(*obs); 123 } 124 } 125 } 126 124 127 // Check whether all required frequencies available 125 128 // ------------------------------------------------ 126 for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) { 127 t_lc::type tLC = OPT->LCs(_prn.system())[ii]; 128 if (tLC == t_lc::GIM) {continue;} 129 if (!isValid(tLC)) { 129 const std::vector<t_lc>& LCs = OPT->LCs(_prn.system()); 130 for (unsigned ii = 0; ii < LCs.size(); ii++) { 131 t_lc LC = LCs[ii]; 132 if (LC._type == t_lc::GIM) { 133 continue; 134 } 135 if (LC._frq1 != t_frequency::G5 && !isValid(LC)) { 130 136 _valid = false; 131 137 return; … … 148 154 bool totOK = false; 149 155 ColumnVector satPosOld(6); satPosOld = 0.0; 150 t_lc::type tLC = t_lc::dummy; 151 if (isValid(t_lc::cIF)) { 152 tLC = t_lc::cIF; 153 } 154 if (tLC == t_lc::dummy && isValid(t_lc::c1)) { 155 tLC = t_lc::c1; 156 } 157 if (tLC == t_lc::dummy && isValid(t_lc::c2)) { 158 tLC = t_lc::c2; 159 } 160 if (tLC == t_lc::dummy) { 161 _valid = false; 156 157 _valid = false; 158 t_frequency::type frq1 = t_frequency::dummy; 159 t_frequency::type frq2 = t_frequency::dummy; 160 OPT->defaultFrqs(_prn.system(), frq1, frq2); 161 if (frq1 != t_frequency::dummy) { 162 t_lc lc1(t_lc::code, frq1); 163 if (isValid(lc1)) { 164 _valid = true; 165 _rangeLC = lc1; 166 } 167 if (frq2 != t_frequency::dummy) { 168 t_lc lcIF(t_lc::codeIF, frq1, frq2); 169 if (isValid(lcIF)) { 170 _valid = true; 171 _rangeLC = lcIF; 172 } 173 } 174 } 175 if (!_valid) { 162 176 return; 163 177 } 164 double prange = obsValue(tLC); 178 179 double prange = obsValue(_rangeLC); 165 180 for (int ii = 1; ii <= 10; ii++) { 166 181 bncTime ToT = _time - prange / t_CST::c - _xcSat[3]; … … 188 203 // 189 204 //////////////////////////////////////////////////////////////////////////// 190 void t_pppSatObs::lcCoeff(t_lc ::type tLC,205 void t_pppSatObs::lcCoeff(t_lc LC, 191 206 map<t_frequency::type, double>& codeCoeff, 192 207 map<t_frequency::type, double>& phaseCoeff, … … 197 212 ionoCoeff.clear(); 198 213 199 double f1 = t_CST::freq( _fType1, _channel);200 double f2 = t_CST::freq( _fType2, _channel);214 double f1 = t_CST::freq(LC._frq1, _channel); 215 double f2 = t_CST::freq(LC._frq2, _channel); 201 216 double f1GPS = t_CST::freq(t_frequency::G1, 0); 202 217 203 switch ( tLC) {204 case t_lc:: l1:205 phaseCoeff[ _fType1] = 1.0;206 ionoCoeff [ _fType1] = -1.0 * pow(f1GPS, 2) / pow(f1, 2);218 switch (LC._type) { 219 case t_lc::phase: 220 phaseCoeff[LC._frq1] = 1.0; 221 ionoCoeff [LC._frq1] = -1.0 * pow(f1GPS, 2) / pow(f1, 2); 207 222 return; 208 case t_lc:: l2:209 phaseCoeff[_fType2] =1.0;210 ionoCoeff [_fType2] = -1.0 *pow(f1GPS, 2) / pow(f2, 2);223 case t_lc::code: 224 codeCoeff[LC._frq1] = 1.0; 225 ionoCoeff[LC._frq1] = pow(f1GPS, 2) / pow(f1, 2); 211 226 return; 212 case t_lc::lIF: 213 phaseCoeff[_fType1] = f1 * f1 / (f1 * f1 - f2 * f2); 214 phaseCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2); 227 case t_lc::phaseIF: 228 phaseCoeff[LC._frq1] = f1 * f1 / (f1 * f1 - f2 * f2); 229 phaseCoeff[LC._frq2] = -f2 * f2 / (f1 * f1 - f2 * f2); 230 return; 231 case t_lc::codeIF: 232 codeCoeff[LC._frq1] = f1 * f1 / (f1 * f1 - f2 * f2); 233 codeCoeff[LC._frq2] = -f2 * f2 / (f1 * f1 - f2 * f2); 215 234 return; 216 235 case t_lc::MW: 217 phaseCoeff[ _fType1] = f1 / (f1 - f2);218 phaseCoeff[ _fType2] = -f2 / (f1 - f2);219 codeCoeff [_fType1]= -f1 / (f1 + f2);220 codeCoeff [_fType2]= -f2 / (f1 + f2);236 phaseCoeff[LC._frq1] = f1 / (f1 - f2); 237 phaseCoeff[LC._frq2] = -f2 / (f1 - f2); 238 codeCoeff [LC._frq1] = -f1 / (f1 + f2); 239 codeCoeff [LC._frq2] = -f2 / (f1 + f2); 221 240 return; 222 241 case t_lc::CL: 223 phaseCoeff[_fType1] = 0.5; 224 codeCoeff [_fType1] = 0.5; 225 return; 226 case t_lc::c1: 227 codeCoeff[_fType1] = 1.0; 228 ionoCoeff[_fType1] = pow(f1GPS, 2) / pow(f1, 2); 229 return; 230 case t_lc::c2: 231 codeCoeff[_fType2] = 1.0; 232 ionoCoeff[_fType2] = pow(f1GPS, 2) / pow(f2, 2); 233 return; 234 case t_lc::cIF: 235 codeCoeff[_fType1] = f1 * f1 / (f1 * f1 - f2 * f2); 236 codeCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2); 242 phaseCoeff[LC._frq1] = 0.5; 243 codeCoeff [LC._frq1] = 0.5; 237 244 return; 238 245 case t_lc::GIM: … … 245 252 // 246 253 //////////////////////////////////////////////////////////////////////////// 247 bool t_pppSatObs::isValid(t_lc ::type tLC) const {254 bool t_pppSatObs::isValid(t_lc LC) const { 248 255 bool valid = true; 249 obsValue( tLC, &valid);256 obsValue(LC, &valid); 250 257 251 258 return valid; … … 253 260 // 254 261 //////////////////////////////////////////////////////////////////////////// 255 double t_pppSatObs::obsValue(t_lc ::type tLC, bool* valid) const {262 double t_pppSatObs::obsValue(t_lc LC, bool* valid) const { 256 263 257 264 double retVal = 0.0; … … 259 266 260 267 // Pseudo observations 261 if ( tLC== t_lc::GIM) {268 if (LC._type == t_lc::GIM) { 262 269 if (_stecSat == 0.0) { 263 270 if (valid) *valid = false; … … 272 279 map<t_frequency::type, double> phaseCoeff; 273 280 map<t_frequency::type, double> ionoCoeff; 274 lcCoeff( tLC, codeCoeff, phaseCoeff, ionoCoeff);281 lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff); 275 282 276 283 map<t_frequency::type, double>::const_iterator it; … … 303 310 // 304 311 //////////////////////////////////////////////////////////////////////////// 305 double t_pppSatObs::lambda(t_lc ::type tLC) const {306 307 double f1 = t_CST::freq( _fType1, _channel);308 double f2 = t_CST::freq( _fType2, _channel);309 310 if ( tLC== t_lc::l1) {312 double t_pppSatObs::lambda(t_lc LC) const { 313 314 double f1 = t_CST::freq(LC._frq1, _channel); 315 double f2 = t_CST::freq(LC._frq2, _channel); 316 317 if (LC._type == t_lc::phase) { 311 318 return t_CST::c / f1; 312 319 } 313 else if (tLC == t_lc::l2) { 314 return t_CST::c / f2; 315 } 316 else if (tLC == t_lc::lIF) { 320 else if (LC._type == t_lc::phaseIF) { 317 321 return t_CST::c / (f1 + f2); 318 322 } 319 else if ( tLC== t_lc::MW) {323 else if (LC._type == t_lc::MW) { 320 324 return t_CST::c / (f1 - f2); 321 325 } 322 else if ( tLC== t_lc::CL) {326 else if (LC._type == t_lc::CL) { 323 327 return t_CST::c / f1 / 2.0; 324 328 } … … 329 333 // 330 334 //////////////////////////////////////////////////////////////////////////// 331 double t_pppSatObs::sigma(t_lc ::type tLC) const {335 double t_pppSatObs::sigma(t_lc LC) const { 332 336 333 337 double retVal = 0.0; … … 335 339 map<t_frequency::type, double> phaseCoeff; 336 340 map<t_frequency::type, double> ionoCoeff; 337 lcCoeff( tLC, codeCoeff, phaseCoeff, ionoCoeff);338 339 if ( tLC== t_lc::GIM) {341 lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff); 342 343 if (LC._type == t_lc::GIM) { 340 344 retVal = OPT->_sigmaGIM * OPT->_sigmaGIM; 341 345 } … … 354 358 // De-Weight R 355 359 // ----------- 356 if (_prn.system() == 'R'&& t_lc::includesCode(tLC)) {360 if (_prn.system() == 'R'&& LC.includesCode()) { 357 361 retVal *= 5.0; 358 362 } … … 361 365 // ----------------------------- 362 366 double cEle = 1.0; 363 if ( (OPT->_eleWgtCode && t_lc::includesCode(tLC)) ||364 (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) {367 if ( (OPT->_eleWgtCode && LC.includesCode()) || 368 (OPT->_eleWgtPhase && LC.includesPhase()) ) { 365 369 double eleD = eleSat()*180.0/M_PI; 366 370 double hlp = fabs(90.0 - eleD); … … 373 377 // 374 378 //////////////////////////////////////////////////////////////////////////// 375 double t_pppSatObs::maxRes(t_lc ::type tLC) const {379 double t_pppSatObs::maxRes(t_lc LC) const { 376 380 double retVal = 0.0; 377 381 … … 379 383 map<t_frequency::type, double> phaseCoeff; 380 384 map<t_frequency::type, double> ionoCoeff; 381 lcCoeff( tLC, codeCoeff, phaseCoeff, ionoCoeff);385 lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff); 382 386 383 387 map<t_frequency::type, double>::const_iterator it; … … 388 392 retVal += it->second * it->second * OPT->_maxResL1 * OPT->_maxResL1; 389 393 } 390 if ( tLC== t_lc::GIM) {394 if (LC._type == t_lc::GIM) { 391 395 retVal = OPT->_maxResGIM * OPT->_maxResGIM + OPT->_maxResGIM * OPT->_maxResGIM; 392 396 } … … 517 521 } 518 522 const t_frqObs* obs = _obs[iFreq]; 519 if (obs && 520 obs->_rnxType2ch == bias._rnxType2ch) { 521 _model._codeBias[iFreq] = bias._value; 523 if (obs && obs->_rnxType2ch == bias._rnxType2ch) { 524 _model._codeBias[iFreq] = (bias._value != 0.0 ? bias._value : ZEROVALUE); 522 525 } 523 526 } … … 527 530 // Phase Biases 528 531 // ----------- 529 const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn); 530 double yaw = 0.0; 531 bool ssr = false; 532 if (satPhaseBias) { 533 double dt = station->epochTime() - satPhaseBias->_time; 534 if (satPhaseBias->_updateInt) { 535 dt -= (0.5 * ssrUpdateInt[satPhaseBias->_updateInt]); 536 } 537 yaw = satPhaseBias->_yaw + satPhaseBias->_yawRate * dt; 538 ssr = true; 539 for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) { 540 const t_frqPhaseBias& bias = satPhaseBias->_bias[ii]; 541 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 542 string frqStr = t_frequency::toString(t_frequency::type(iFreq)); 543 if (frqStr[0] != _prn.system()) { 544 continue; 545 } 546 const t_frqObs* obs = _obs[iFreq]; 547 if (obs && 548 obs->_rnxType2ch == bias._rnxType2ch) { 549 _model._phaseBias[iFreq] = bias._value; 532 double yaw = 0.0; 533 bool useYaw = false; 534 if (OPT->arSystem(_prn.system())) { 535 const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn); 536 if (satPhaseBias) { 537 if (OPT->_ar._useYaw) { 538 double dt = station->epochTime() - satPhaseBias->_time; 539 if (satPhaseBias->_updateInt) { 540 dt -= (0.5 * ssrUpdateInt[satPhaseBias->_updateInt]); 541 } 542 yaw = satPhaseBias->_yaw + satPhaseBias->_yawRate * dt; 543 useYaw = true; 544 } 545 for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) { 546 const t_frqPhaseBias& bias = satPhaseBias->_bias[ii]; 547 if (bias._fixIndicator) { // if AR, biases without fixIndicator not used 548 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 549 string frqStr = t_frequency::toString(t_frequency::type(iFreq)); 550 if (frqStr[0] != _prn.system()) { 551 continue; 552 } 553 t_frqObs* obs = _obs[iFreq]; 554 if (obs && obs->_rnxType2ch[0] == bias._rnxType2ch[0]) { // allow different tracking mode 555 _model._phaseBias[iFreq] = (bias._value != 0.0 ? bias._value : ZEROVALUE); 556 obs->_biasJumpCounter = bias._jumpCounter; 557 } 558 } 550 559 } 551 560 } … … 555 564 // Phase Wind-Up 556 565 // ------------- 557 _model._windUp = station->windUp(_time, _prn, rSat, ssr, yaw, vSat) ;566 _model._windUp = station->windUp(_time, _prn, rSat, useYaw, yaw, vSat) ; 558 567 559 568 // Relativistic effect due to earth gravity … … 574 583 bool vTecUsage = true; 575 584 for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) { 576 t_lc ::type tLC = OPT->LCs(_prn.system())[ii];577 if ( tLC== t_lc::cIF || tLC== t_lc::lIF) {585 t_lc LC = OPT->LCs(_prn.system())[ii]; 586 if (LC._type == t_lc::codeIF || LC._type == t_lc::phaseIF) { 578 587 vTecUsage = false; 579 588 } … … 601 610 _model._set = true; 602 611 603 //printModel(); 612 if (OPT->_logMode == t_pppOptions::all) { 613 printModel(); 614 } 604 615 605 616 return success; … … 636 647 if (_prn.system() == frqStr[0]) { 637 648 LOG << "PCO : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq] << endl 638 << "BIAS CODE : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq] << "\t(" << _obs[iFreq]-> _rnxType2ch[1]<< ") " << endl639 << "BIAS PHASE : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << "\t(" << _obs[iFreq]-> _rnxType2ch[1]<< ") " << endl649 << "BIAS CODE : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq] << "\t(" << _obs[iFreq]->trkChar() << ") " << endl 650 << "BIAS PHASE : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << "\t(" << _obs[iFreq]->trkChar() << ") " << endl 640 651 << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq]<< endl; 641 652 } … … 652 663 char sys = _prn.system(); 653 664 for (unsigned ii = 0; ii < OPT->LCs(sys).size(); ii++) { 654 t_lc ::type tLC = OPT->LCs(sys)[ii];655 LOG << "OBS-CMP " << setw(4) << t_lc::toString(tLC) << ": " << _prn.toString() << " "656 << setw(12) << setprecision(3) << obsValue( tLC) << " "657 << setw(12) << setprecision(3) << cmpValue( tLC) << " "658 << setw(12) << setprecision(3) << obsValue( tLC) - cmpValue(tLC) << endl;659 } 660 } 661 662 // 663 //////////////////////////////////////////////////////////////////////////// 664 double t_pppSatObs::cmpValueForBanc(t_lc ::type tLC) const {665 return cmpValue( tLC) - _model._rho - _model._sagnac - _model._recClkM;666 } 667 668 // 669 //////////////////////////////////////////////////////////////////////////// 670 double t_pppSatObs::cmpValue(t_lc ::type tLC) const {665 t_lc LC = OPT->LCs(sys)[ii]; 666 LOG << "OBS-CMP " << setw(4) << LC.toString() << ": " << _prn.toString() << " " 667 << setw(12) << setprecision(3) << obsValue(LC) << " " 668 << setw(12) << setprecision(3) << cmpValue(LC) << " " 669 << setw(12) << setprecision(3) << obsValue(LC) - cmpValue(LC) << endl; 670 } 671 } 672 673 // 674 //////////////////////////////////////////////////////////////////////////// 675 double t_pppSatObs::cmpValueForBanc(t_lc LC) const { 676 return cmpValue(LC) - _model._rho - _model._sagnac - _model._recClkM; 677 } 678 679 // 680 //////////////////////////////////////////////////////////////////////////// 681 double t_pppSatObs::cmpValue(t_lc LC) const { 671 682 double cmpValue; 672 683 673 if (!isValid( tLC)) {684 if (!isValid(LC)) { 674 685 cmpValue = 0.0; 675 686 } 676 else if ( tLC== t_lc::GIM) {687 else if (LC._type == t_lc::GIM) { 677 688 cmpValue = _stecSat; 678 689 } … … 691 702 map<t_frequency::type, double> phaseCoeff; 692 703 map<t_frequency::type, double> ionoCoeff; 693 lcCoeff( tLC, codeCoeff, phaseCoeff, ionoCoeff);704 lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff); 694 705 map<t_frequency::type, double>::const_iterator it; 695 706 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) { 696 707 t_frequency::type tFreq = it->first; 697 708 dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]); 698 if (OPT->PPP_RTK) {699 dispPart += it->second * (_model._ionoCodeDelay[tFreq]);700 }701 709 } 702 710 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) { … … 704 712 dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] + 705 713 _model._windUp * t_CST::lambda(tFreq, _channel)); 706 if (OPT->PPP_RTK) {707 dispPart += it->second * (- _model._ionoCodeDelay[tFreq]);708 }709 714 } 710 715 cmpValue = nonDisp + dispPart; … … 716 721 // 717 722 //////////////////////////////////////////////////////////////////////////// 718 void t_pppSatObs::setRes(t_lc ::type tLC, double res) {719 _res[ tLC] = res;720 } 721 722 // 723 //////////////////////////////////////////////////////////////////////////// 724 double t_pppSatObs::getRes(t_lc ::type tLC) const {725 map<t_lc ::type, double>::const_iterator it = _res.find(tLC);723 void t_pppSatObs::setRes(t_lc LC, double res) { 724 _res[LC] = res; 725 } 726 727 // 728 //////////////////////////////////////////////////////////////////////////// 729 double t_pppSatObs::getRes(t_lc LC) const { 730 map<t_lc, double>::const_iterator it = _res.find(LC); 726 731 if (it != _res.end()) { 727 732 return it->second; … … 742 747 return pseudoObsIono; 743 748 } 749 750 // 751 //////////////////////////////////////////////////////////////////////////// 752 bool t_pppSatObs::hasBiases() const { 753 bool ar = OPT->arSystem(_prn.system()); 754 set<t_frequency::type> frqs; 755 for (const auto& lc : OPT->LCs(_prn.system())) { 756 if (lc._frq1 != t_frequency::dummy) frqs.insert(lc._frq1); 757 if (lc._frq2 != t_frequency::dummy) frqs.insert(lc._frq2); 758 } 759 for (int iFreq : frqs) { 760 if (_obs[iFreq] != 0) { 761 if (_model._codeBias[iFreq] == 0 || (ar && _model._phaseBias[iFreq] == 0)) { 762 return false; 763 } 764 } 765 } 766 return true; 767 }
Note:
See TracChangeset
for help on using the changeset viewer.
