Changeset 7288 in ntrip
- Timestamp:
- Sep 20, 2015, 10:39:48 PM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r7271 r7288 129 129 for (unsigned ii = 0; ii < biases.size(); ii++) { 130 130 _obsPool->putCodeBias(new t_satCodeBias(*biases[ii])); 131 } 132 } 133 134 // 135 ////////////////////////////////////////////////////////////////////////////// 136 void t_pppClient::putPhaseBiases(const vector<t_satPhaseBias*>& biases) { 137 for (unsigned ii = 0; ii < biases.size(); ii++) { 138 _obsPool->putPhaseBias(new t_satPhaseBias(*biases[ii])); 131 139 } 132 140 } -
trunk/BNC/src/PPP/pppClient.h
r7248 r7288 21 21 class t_pppClient : public interface_pppClient { 22 22 public: 23 t_pppClient(const t_pppOptions* opt); 24 ~t_pppClient(); 23 t_pppClient(const t_pppOptions* opt); 24 ~t_pppClient(); 25 25 26 void putEphemeris(const t_eph* eph); 26 void putEphemeris(const t_eph* eph); 27 27 void putTec(const t_vTec* vTec); 28 void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 29 void putClkCorrections(const std::vector<t_clkCorr*>& corr); 30 void putCodeBiases(const std::vector<t_satCodeBias*>& satBias); 28 void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 29 void putClkCorrections(const std::vector<t_clkCorr*>& corr); 30 void putCodeBiases(const std::vector<t_satCodeBias*>& biases); 31 void putPhaseBiases(const std::vector<t_satPhaseBias*>& biases); 31 32 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output); 32 33 … … 52 53 t_irc cmpModel(t_pppStation* station, const ColumnVector& xyzc, 53 54 std::vector<t_pppSatObs*>& obsVector); 54 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 55 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 55 56 ColumnVector& xyzc, bool print); 56 57 double cmpOffGG(std::vector<t_pppSatObs*>& obsVector); … … 65 66 double _offGG; 66 67 std::vector<t_pppSatObs*> _obsRover; 67 std::ostringstream* _log; 68 t_pppOptions* _opt; 68 std::ostringstream* _log; 69 t_pppOptions* _opt; 69 70 t_tides* _tides; 70 71 }; -
trunk/BNC/src/PPP/pppObsPool.cpp
r7249 r7288 11 11 * Created: 29-Jul-2014 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 44 44 _satCodeBiases[ii] = 0; 45 45 } 46 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 47 _satPhaseBiases[ii] = 0; 48 } 46 49 _vTec = 0; 47 50 } … … 70 73 // 71 74 ///////////////////////////////////////////////////////////////////////////// 75 void t_pppObsPool::putPhaseBias(t_satPhaseBias* satPhaseBias) { 76 int iPrn = satPhaseBias->_prn.toInt(); 77 delete _satPhaseBiases[iPrn]; 78 _satPhaseBiases[iPrn] = satPhaseBias; 79 } 80 81 // 82 ///////////////////////////////////////////////////////////////////////////// 72 83 void t_pppObsPool::putTec(t_vTec* vTec) { 73 84 delete _vTec; -
trunk/BNC/src/PPP/pppObsPool.h
r7249 r7288 10 10 11 11 class t_pppObsPool { 12 public: 12 public: 13 13 14 14 class t_epoch { … … 27 27 ~t_pppObsPool(); 28 28 void putCodeBias(t_satCodeBias* satCodeBias); 29 void putPhaseBias(t_satPhaseBias* satPhaseBias); 29 30 void putTec(t_vTec* _vTec); 30 31 31 32 void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector); 32 33 33 const t_satCodeBias* satCodeBias(const t_prn& prn) const { 34 const t_satCodeBias* satCodeBias(const t_prn& prn) const { 34 35 return _satCodeBiases[prn.toInt()]; 36 } 37 const t_satPhaseBias* satPhaseBias(const t_prn& prn) const { 38 return _satPhaseBiases[prn.toInt()]; 35 39 } 36 40 const t_vTec* vTec() const {return _vTec;} … … 47 51 private: 48 52 t_satCodeBias* _satCodeBiases[t_prn::MAXPRN+1]; 53 t_satPhaseBias* _satPhaseBiases[t_prn::MAXPRN+1]; 49 54 t_vTec* _vTec; 50 55 std::deque<t_epoch*> _epochs; -
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 { -
trunk/BNC/src/PPP_SSR_I/pppClient.cpp
r7241 r7288 35 35 * Created: 21-Nov-2009 36 36 * 37 * Changes: 37 * Changes: 38 38 * 39 39 * -----------------------------------------------------------------------*/ … … 76 76 //////////////////////////////////////////////////////////////////////////// 77 77 void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) { 78 78 79 79 // Convert and store observations 80 80 // ------------------------------ 81 81 _epoData->clear(); 82 82 for (unsigned ii = 0; ii < satObs.size(); ii++) { 83 const t_satObs* obs = satObs[ii]; 83 const t_satObs* obs = satObs[ii]; 84 84 t_prn prn = obs->_prn; 85 85 if (prn.system() == 'E') {prn.setFlags(1);} // force I/NAV usage … … 145 145 QString prn = it.key(); 146 146 t_satData* satData = it.value(); 147 147 148 148 if (cmpToT(satData) != success) { 149 149 delete satData; … … 211 211 // ------------------------ 212 212 else if (satData->system() == 'R' && _opt->useSystem('R')) { 213 if (satData->P1 != 0.0 && satData->P2 != 0.0 && 213 if (satData->P1 != 0.0 && satData->P2 != 0.0 && 214 214 satData->L1 != 0.0 && satData->L2 != 0.0 ) { 215 215 … … 249 249 // ------------------------ 250 250 else if (satData->system() == 'E' && _opt->useSystem('E')) { 251 if (satData->P1 != 0.0 && satData->P5 != 0.0 && 251 if (satData->P1 != 0.0 && satData->P5 != 0.0 && 252 252 satData->L1 != 0.0 && satData->L5 != 0.0 ) { 253 253 double f1 = t_CST::freq(t_frequency::E1, 0); … … 293 293 } 294 294 295 // 295 // 296 296 //////////////////////////////////////////////////////////////////////////// 297 297 void t_pppClient::putOrbCorrections(const std::vector<t_orbCorr*>& corr) { … … 309 309 } 310 310 311 // 311 // 312 312 //////////////////////////////////////////////////////////////////////////// 313 313 void t_pppClient::putClkCorrections(const std::vector<t_clkCorr*>& corr) { … … 325 325 } 326 326 327 // 327 // 328 328 ////////////////////////////////////////////////////////////////////////////// 329 329 void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) { … … 335 335 // 336 336 ////////////////////////////////////////////////////////////////////////////// 337 void t_pppClient::putPhaseBiases(const std::vector<t_satPhaseBias*>& /*satPhaseBias*/) { 338 } 339 340 // 341 ////////////////////////////////////////////////////////////////////////////// 337 342 void t_pppClient::putTec(const t_vTec* /*vTec*/) { 338 343 } 339 344 340 // 345 // 341 346 ////////////////////////////////////////////////////////////////////////////// 342 347 void t_pppClient::putEphemeris(const t_eph* eph) { … … 362 367 // Satellite Position 363 368 //////////////////////////////////////////////////////////////////////////// 364 t_irc t_pppClient::getSatPos(const bncTime& tt, const QString& prn, 369 t_irc t_pppClient::getSatPos(const bncTime& tt, const QString& prn, 365 370 ColumnVector& xc, ColumnVector& vv) { 366 371 … … 404 409 satData->clk = clkSat * t_CST::c; 405 410 return success; 406 } 411 } 407 412 } 408 413 -
trunk/BNC/src/PPP_SSR_I/pppClient.h
r7235 r7288 38 38 39 39 namespace BNC_PPP { 40 40 41 41 class t_pppClient : public interface_pppClient { 42 42 public: … … 46 46 void putEphemeris(const t_eph* eph); 47 47 void putTec(const t_vTec* vTec); 48 void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 49 void putClkCorrections(const std::vector<t_clkCorr*>& corr); 50 void putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias); 48 void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 49 void putClkCorrections(const std::vector<t_clkCorr*>& corr); 50 void putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias); 51 void putPhaseBiases(const std::vector<t_satPhaseBias*>& satPhaseBias); 51 52 std::ostringstream& log() {return *_log;} 52 53 const t_pppOptions* opt() const {return _opt;} … … 61 62 t_pppFilter* _filter; 62 63 t_pppUtils* _pppUtils; 63 std::ostringstream* _log; 64 std::ostringstream* _log; 64 65 }; 65 66 -
trunk/BNC/src/pppRun.cpp
r7278 r7288 112 112 connect(BNC_CORE, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), 113 113 this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)),conType); 114 115 connect(BNC_CORE, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), 116 this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)),conType); 114 117 } 115 118 else { … … 409 412 // 410 413 //////////////////////////////////////////////////////////////////////////// 414 void t_pppRun::slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases) { 415 if (phaseBiases.size() == 0) { 416 return; 417 } 418 419 if (_opt->_realTime) { 420 if (_opt->_corrMount.empty() || _opt->_corrMount != phaseBiases[0]._staID) { 421 return; 422 } 423 } 424 vector<t_satPhaseBias*> biases; 425 for (int ii = 0; ii < phaseBiases.size(); ii++) { 426 biases.push_back(new t_satPhaseBias(phaseBiases[ii])); 427 } 428 429 _pppClient->putPhaseBiases(biases); 430 431 for (unsigned ii = 0; ii < biases.size(); ii++) { 432 delete biases[ii]; 433 } 434 } 435 436 // 437 //////////////////////////////////////////////////////////////////////////// 411 438 void t_pppRun::processFiles() { 412 439 … … 432 459 connect(_corrFile, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), 433 460 this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>))); 461 connect(_corrFile, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), 462 this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>))); 434 463 } 435 464 -
trunk/BNC/src/pppRun.h
r7231 r7288 44 44 void slotNewClkCorrections(QList<t_clkCorr> clkCorr); 45 45 void slotNewCodeBiases(QList<t_satCodeBias> codeBiases); 46 void slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases); 46 47 void slotNewObs(QByteArray staID, QList<t_satObs> obsList); 47 48 void slotSetSpeed(int speed);
Note:
See TracChangeset
for help on using the changeset viewer.