Changeset 7288 in ntrip for trunk/BNC/src/PPP/pppSatObs.cpp
- Timestamp:
- Sep 20, 2015, 10:39:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppSatObs.cpp
r7262 r7288 11 11 * Created: 29-Jul-2014 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 53 53 } 54 54 55 // 55 // 56 56 //////////////////////////////////////////////////////////////////////////// 57 57 void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) { … … 122 122 break; 123 123 } 124 satPosOld = _xcSat; 124 satPosOld = _xcSat; 125 125 } 126 126 if (totOK) { 127 127 _signalPropagationTime = prange / t_CST::c - _xcSat[3]; 128 _model._satClkM = _xcSat[3] * t_CST::c; 128 _model._satClkM = _xcSat[3] * t_CST::c; 129 129 } 130 130 else { … … 133 133 } 134 134 135 // 136 //////////////////////////////////////////////////////////////////////////// 137 void t_pppSatObs::lcCoeff(t_lc::type tLC, 135 // 136 //////////////////////////////////////////////////////////////////////////// 137 void t_pppSatObs::lcCoeff(t_lc::type tLC, 138 138 map<t_frequency::type, double>& codeCoeff, 139 139 map<t_frequency::type, double>& phaseCoeff) const { … … 147 147 switch (tLC) { 148 148 case t_lc::l1: 149 phaseCoeff[_fType1] = 1.0; 150 return; 151 case t_lc::l2: 152 phaseCoeff[_fType2] = 1.0; 153 return; 154 case t_lc::lIF: 149 phaseCoeff[_fType1] = 1.0; 150 return; 151 case t_lc::l2: 152 phaseCoeff[_fType2] = 1.0; 153 return; 154 case t_lc::lIF: 155 155 phaseCoeff[_fType1] = f1 * f1 / (f1 * f1 - f2 * f2); 156 156 phaseCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2); 157 157 return; 158 case t_lc::MW: 158 case t_lc::MW: 159 159 phaseCoeff[_fType1] = f1 / (f1 - f2); 160 160 phaseCoeff[_fType2] = -f2 / (f1 - f2); … … 162 162 codeCoeff[_fType2] = -f2 / (f1 + f2); 163 163 return; 164 case t_lc::CL: 164 case t_lc::CL: 165 165 phaseCoeff[_fType1] = 0.5; 166 166 codeCoeff[_fType1] = 0.5; 167 167 return; 168 case t_lc::c1: 169 codeCoeff[_fType1] = 1.0; 170 return; 171 case t_lc::c2: 172 codeCoeff[_fType2] = 1.0; 173 return; 174 case t_lc::cIF: 168 case t_lc::c1: 169 codeCoeff[_fType1] = 1.0; 170 return; 171 case t_lc::c2: 172 codeCoeff[_fType2] = 1.0; 173 return; 174 case t_lc::cIF: 175 175 codeCoeff[_fType1] = f1 * f1 / (f1 * f1 - f2 * f2); 176 176 codeCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2); 177 177 return; 178 case t_lc::dummy: 179 case t_lc::maxLc: 180 return; 181 } 182 } 183 184 // 178 case t_lc::dummy: 179 case t_lc::maxLc: 180 return; 181 } 182 } 183 184 // 185 185 //////////////////////////////////////////////////////////////////////////// 186 186 bool t_pppSatObs::isValid(t_lc::type tLC) const { … … 189 189 return valid; 190 190 } 191 // 191 // 192 192 //////////////////////////////////////////////////////////////////////////// 193 193 double t_pppSatObs::obsValue(t_lc::type tLC, bool* valid) const { … … 225 225 } 226 226 227 // 227 // 228 228 //////////////////////////////////////////////////////////////////////////// 229 229 double t_pppSatObs::lambda(t_lc::type tLC) const { … … 251 251 } 252 252 253 // 253 // 254 254 //////////////////////////////////////////////////////////////////////////// 255 255 double t_pppSatObs::sigma(t_lc::type tLC) const { … … 268 268 retVal += it->second * it->second * OPT->_sigmaL1 * OPT->_sigmaL1; 269 269 } 270 271 retVal = sqrt(retVal); 270 271 retVal = sqrt(retVal); 272 272 273 273 // De-Weight GLONASS … … 290 290 } 291 291 292 // 292 // 293 293 //////////////////////////////////////////////////////////////////////////// 294 294 double t_pppSatObs::maxRes(t_lc::type tLC) const { … … 312 312 313 313 314 // 314 // 315 315 //////////////////////////////////////////////////////////////////////////// 316 316 t_irc t_pppSatObs::cmpModel(const t_pppStation* station) { … … 323 323 // ------------------------------ 324 324 ColumnVector rSat = _xcSat.Rows(1,3); 325 ColumnVector rhoV = rSat - station->xyzApr(); 325 ColumnVector rhoV = rSat - station->xyzApr(); 326 326 _model._rho = rhoV.norm_Frobenius(); 327 327 … … 361 361 t_frequency::type frqType = static_cast<t_frequency::type>(ii); 362 362 bool found; 363 _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, 363 _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, 364 364 _model._eleSat, _model._azSat, found); 365 365 } … … 377 377 // ----------- 378 378 const t_satCodeBias* satCodeBias = PPP_CLIENT->obsPool()->satCodeBias(_prn); 379 if (satCodeBias) { 379 if (satCodeBias) { 380 380 for (unsigned ii = 0; ii < satCodeBias->_bias.size(); ii++) { 381 381 const t_frqCodeBias& bias = satCodeBias->_bias[ii]; … … 389 389 } 390 390 391 // Phase Biases 392 // ----------- 393 // TODO: consideration of fix indicators, yaw angle and jump counter 394 const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn); 395 if (satPhaseBias) { 396 for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) { 397 const t_frqPhaseBias& bias = satPhaseBias->_bias[ii]; 398 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 399 const t_frqObs* obs = _obs[iFreq]; 400 if (obs && obs->_rnxType2ch == bias._rnxType2ch) { 401 _model._phaseBias[iFreq] = bias._value; 402 } 403 } 404 } 405 } 406 391 407 // Tidal Correction 392 408 // ---------------- … … 424 440 } 425 441 426 // 442 // 427 443 //////////////////////////////////////////////////////////////////////////// 428 444 void t_pppSatObs::printModel() const { … … 442 458 for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) { 443 459 if (_obs[iFreq]) { 444 LOG << "PCO : " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._antPCO[iFreq] << endl 445 << "BIAS CODE : " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._codeBias[iFreq] << endl 446 << "BIAS PHASE : " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << endl 447 << "IONO CODEDELAY: " << t_frequency::toString(t_frequency::type(iFreq)) << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq] << endl; 460 string frqStr = t_frequency::toString(t_frequency::type(iFreq)); 461 if (_prn.system() == frqStr[0]) { 462 LOG << "PCO : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq] << endl 463 << "BIAS CODE : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq] << endl 464 << "BIAS PHASE : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << endl 465 << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq] << endl; 466 } 448 467 } 449 468 } … … 456 475 457 476 } 458 LOG << "OBS-CMP MW: " << _prn.toString() << " " 477 LOG << "OBS-CMP MW: " << _prn.toString() << " " 459 478 << setw(12) << setprecision(3) << obsValue(t_lc::MW) << " " 460 479 << setw(12) << setprecision(3) << cmpValue(t_lc::MW) << " " … … 462 481 } 463 482 464 // 483 // 465 484 //////////////////////////////////////////////////////////////////////////// 466 485 double t_pppSatObs::cmpValueForBanc(t_lc::type tLC) const { … … 468 487 } 469 488 470 // 489 // 471 490 //////////////////////////////////////////////////////////////////////////// 472 491 double t_pppSatObs::cmpValue(t_lc::type tLC) const { … … 478 497 // Non-Dispersive Part 479 498 // ------------------- 480 double nonDisp = _model._rho + _model._recClkM - _model._satClkM 481 + _model._sagnac + _model._antEcc + _model._tropo 499 double nonDisp = _model._rho + _model._recClkM - _model._satClkM 500 + _model._sagnac + _model._antEcc + _model._tropo 482 501 + _model._tide; 483 502 … … 506 525 } 507 526 508 // 527 // 509 528 //////////////////////////////////////////////////////////////////////////// 510 529 void t_pppSatObs::setRes(t_lc::type tLC, double res) { … … 512 531 } 513 532 514 // 533 // 515 534 //////////////////////////////////////////////////////////////////////////// 516 535 double t_pppSatObs::getRes(t_lc::type tLC) const {
Note:
See TracChangeset
for help on using the changeset viewer.