Changeset 10232 in ntrip
- Timestamp:
- Oct 30, 2023, 4:39:46 PM (15 months ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r10222 r10232 297 297 // Check Blunders 298 298 // -------------- 299 const double BLUNDER = 1 50.0;299 const double BLUNDER = 100.0; 300 300 double maxRes = 0.0; 301 301 unsigned maxResIndex = 0; … … 338 338 return success; 339 339 } 340 // Compute A Priori Glonass Receiver Clock Offset 341 ////////////////////////////////////////////////////////////////////////////// 342 double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) { 343 344 t_lc::type tLC = t_lc::dummy; 345 double offGlo = 0.0; 346 const double MAXRES = 1000.0; 347 348 if (OPT->useSystem('R')) { 349 while (obsVector.size() > 0) { 350 offGlo = 0.0; 351 double maxRes = 0.0; 352 int maxResIndex = -1; 353 t_prn maxResPrn; 354 unsigned nObs = 0; 355 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 356 t_pppSatObs* satObs = obsVector.at(ii); 357 if (satObs->prn().system() == 'R') { 358 if (tLC == t_lc::dummy) { 359 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 360 } 361 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) { 362 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 363 ++nObs; 364 offGlo += ll; 365 if (fabs(ll) > fabs(maxRes)) { 366 maxRes = ll; 367 maxResIndex = ii; 368 maxResPrn = satObs->prn(); 369 } 370 } 371 } 372 } 373 if (nObs > 0) { 374 offGlo = offGlo / nObs; 375 } 376 else { 377 offGlo = 0.0; 378 } 379 if (fabs(maxRes) > MAXRES) { 380 LOG << "t_pppClient::cmpOffGlo Outlier " << maxResPrn.toString() << " " << maxRes << endl; 381 obsVector.erase(obsVector.begin() + maxResIndex); 382 } 383 else { 384 break; 385 } 386 } 387 } 388 389 return offGlo; 390 } 391 392 // Compute A Priori Galileo Receiver Clock Offset 393 ////////////////////////////////////////////////////////////////////////////// 394 double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) { 395 396 t_lc::type tLC = t_lc::dummy; 397 double offGal = 0.0; 398 const double MAXRES = 1000.0; 399 400 if (OPT->useSystem('E')) { 401 while (obsVector.size() > 0) { 402 offGal = 0.0; 403 double maxRes = 0.0; 404 int maxResIndex = -1; 405 t_prn maxResPrn; 406 unsigned nObs = 0; 407 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 408 t_pppSatObs* satObs = obsVector.at(ii); 409 if (satObs->prn().system() == 'E') { 410 if (tLC == t_lc::dummy) { 411 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 412 } 413 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) { 414 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 415 ++nObs; 416 offGal += ll; 417 if (fabs(ll) > fabs(maxRes)) { 418 maxRes = ll; 419 maxResIndex = ii; 420 maxResPrn = satObs->prn(); 421 } 422 } 423 } 424 } 425 if (nObs > 0) { 426 offGal = offGal / nObs; 427 } 428 else { 429 offGal = 0.0; 430 } 431 if (fabs(maxRes) > MAXRES) { 432 LOG << "t_pppClient::cmpOffGal Outlier " << maxResPrn.toString() << " " << maxRes << endl; 433 obsVector.erase(obsVector.begin() + maxResIndex); 434 } 435 else { 436 break; 437 } 438 } 439 } 440 441 return offGal; 442 } 443 444 445 // Compute A Priori BDS Receiver Clock Offset 446 ////////////////////////////////////////////////////////////////////////////// 447 double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) { 448 449 t_lc::type tLC = t_lc::dummy; 450 double offBds = 0.0; 451 const double MAXRES = 1000.0; 452 453 if (_opt->useSystem('C')) { 454 while (obsVector.size() > 0) { 455 offBds = 0.0; 456 double maxRes = 0.0; 457 int maxResIndex = -1; 458 t_prn maxResPrn; 459 unsigned nObs = 0; 460 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 461 const t_pppSatObs* satObs = obsVector.at(ii); 462 if (satObs->prn().system() == 'C') { 463 if (tLC == t_lc::dummy) { 464 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 465 } 466 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 467 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 468 ++nObs; 469 offBds += ll; 470 if (fabs(ll) > fabs(maxRes)) { 471 maxRes = ll; 472 maxResIndex = ii; 473 maxResPrn = satObs->prn(); 474 } 475 } 476 } 477 } 478 if (nObs > 0) { 479 offBds = offBds / nObs; 480 } 481 else { 482 offBds = 0.0; 483 } 484 if (fabs(maxRes) > MAXRES) { 485 LOG << "t_pppClient::cmpOffBds Outlier " << maxResPrn.toString() << " " << maxRes << endl; 486 delete obsVector.at(maxResIndex); 487 obsVector.erase(obsVector.begin() + maxResIndex); 488 } 489 else { 490 break; 491 } 492 } 493 } 494 return offBds; 495 } 340 496 341 // 497 342 ////////////////////////////////////////////////////////////////////////////// … … 633 478 return finish(failure, 4); 634 479 } 635 636 _offGlo = cmpOffGlo(_obsRover);637 _offGal = cmpOffGal(_obsRover);638 _offBds = cmpOffBds(_obsRover);639 480 640 481 // Prepare Pseudo Observations of the Rover -
trunk/BNC/src/PPP/pppClient.h
r10034 r10232 61 61 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 62 62 ColumnVector& xyzc, bool print); 63 double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector); 64 double cmpOffGal(std::vector<t_pppSatObs*>& obsVector); 65 double cmpOffBds(std::vector<t_pppSatObs*>& obsVector); 66 63 67 64 t_output* _output; 68 65 t_pppEphPool* _ephPool; … … 74 71 double _offGlo; 75 72 double _offGal; 76 double _offBds; 73 double _offBds; 77 74 std::vector<t_pppSatObs*> _obsRover; 78 75 std::ostringstream* _log; -
trunk/BNC/src/PPP/pppFilter.cpp
r10223 r10232 306 306 const vector<t_pppSatObs*> &obsVector) { 307 307 308 const double SLIP = 300.0;308 const double SLIP = 20.0; 309 309 string epoTimeStr = string(_epoTime); 310 310 const vector<t_pppParam*> ¶ms = _parlist->params(); -
trunk/BNC/src/PPP/pppParlist.cpp
r10219 r10232 62 62 _noise = OPT->_noiseCrd[2]; 63 63 break; 64 case clkR: 64 case rClkG: 65 _epoSpec = true; 66 _sigma0 = OPT->_aprSigClk; 67 break; 68 case rClkR: 69 _epoSpec = true; 70 _sigma0 = OPT->_aprSigClk; 71 break; 72 case rClkE: 73 _epoSpec = true; 74 _sigma0 = OPT->_aprSigClk; 75 break; 76 case rClkC: 65 77 _epoSpec = true; 66 78 _sigma0 = OPT->_aprSigClk; … … 74 86 const t_pppSatObs* obs = obsVector->at(ii); 75 87 if (obs->prn() == _prn) { 76 double offGlo = 0; 77 if (_prn.system() == 'R' && tLC != t_lc::MW) { 78 offGlo = PPP_CLIENT->offGlo(); 79 } 80 double offGal = 0; 81 if (_prn.system() == 'E' && tLC != t_lc::MW) { 82 offGal = PPP_CLIENT->offGal(); 83 } 84 double offBds = 0; 85 if (_prn.system() == 'C' && tLC != t_lc::MW) { 86 offBds = PPP_CLIENT->offBds(); 87 } 88 _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 88 _x0 = floor((obs->obsValue(tLC) - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 89 89 break; 90 90 } 91 91 } 92 92 } 93 break;94 case offGlo:95 _epoSpec = true;96 _sigma0 = OPT->_aprSigClk;97 _x0 = PPP_CLIENT->offGlo();98 break;99 case offGal:100 _epoSpec = true;101 _sigma0 = OPT->_aprSigClk;102 _x0 = PPP_CLIENT->offGal();103 break;104 case offBds:105 _epoSpec = true;106 _sigma0 = OPT->_aprSigClk;107 _x0 = PPP_CLIENT->offBds();108 93 break; 109 94 case trp: … … 168 153 if (tLC == t_lc::GIM) {return 0.0;} 169 154 return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius(); 170 case clkR:155 case rClkG: 171 156 if (tLC == t_lc::GIM) {return 0.0;} 172 return 1.0;173 case offGlo:157 return (obs->prn().system() == 'G') ? 1.0 : 0.0; 158 case rClkR: 174 159 if (tLC == t_lc::GIM) {return 0.0;} 175 160 return (obs->prn().system() == 'R') ? 1.0 : 0.0; 176 case offGal:161 case rClkE: 177 162 if (tLC == t_lc::GIM) {return 0.0;} 178 163 return (obs->prn().system() == 'E') ? 1.0 : 0.0; 179 case offBds:164 case rClkC: 180 165 if (tLC == t_lc::GIM) {return 0.0;} 181 166 return (obs->prn().system() == 'C') ? 1.0 : 0.0; … … 296 281 ss << "CRD_Z"; 297 282 break; 298 case clkR:299 ss << "REC_CLK 300 break; 301 case offGlo:302 ss << " OFF_GLO";303 break; 304 case offGal:305 ss << " OFF_GAL";306 break; 307 case offBds:308 ss << " OFF_BDS";283 case rClkG: 284 ss << "REC_CLK G "; 285 break; 286 case rClkR: 287 ss << "REC_CLK R "; 288 break; 289 case rClkE: 290 ss << "REC_CLK E "; 291 break; 292 case rClkC: 293 ss << "REC_CLK C "; 309 294 break; 310 295 case trp: … … 491 476 required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy)); 492 477 493 // Receiver Clock 494 // -------------- 495 required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy)); 496 497 // GLONASS Clock Offset 498 // -------------------- 499 if ( _usedSystems.contains('R') && 500 (_usedSystems.contains('G') || _usedSystems.contains('E') || _usedSystems.contains('C'))) { 501 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 502 } 503 504 // Galileo Clock Offset 505 // -------------------- 506 if (_usedSystems.contains('E') && _usedSystems.contains('G')) { 507 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 508 } 509 510 // BDS Clock Offset 511 // ---------------- 512 if (_usedSystems.contains('C') && (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 513 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 514 } 478 // Receiver Clocks 479 // --------------- 480 if (_usedSystems.contains('G')) { 481 required.push_back(new t_pppParam(t_pppParam::rClkG, t_prn(), t_lc::dummy)); 482 } 483 484 if (_usedSystems.contains('R')) { 485 required.push_back(new t_pppParam(t_pppParam::rClkR, t_prn(), t_lc::dummy)); 486 } 487 488 if (_usedSystems.contains('E')) { 489 required.push_back(new t_pppParam(t_pppParam::rClkE, t_prn(), t_lc::dummy)); 490 } 491 492 if (_usedSystems.contains('C')) { 493 required.push_back(new t_pppParam(t_pppParam::rClkC, t_prn(), t_lc::dummy)); 494 } 515 495 516 496 // Troposphere -
trunk/BNC/src/PPP/pppParlist.h
r10034 r10232 14 14 class t_pppParam { 15 15 public: 16 enum e_type {crdX, crdY, crdZ, clkR, offGlo, offGal, offBds, trp, ion, amb,16 enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb, 17 17 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 18 18 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; … … 23 23 e_type type() const {return _type;} 24 24 double x0() const {return _x0;} 25 double partial(const bncTime& epoTime, const t_pppSatObs* obs, 25 double partial(const bncTime& epoTime, const t_pppSatObs* obs, 26 26 const t_lc::type& tLC) const; 27 27 bool epoSpec() const {return _epoSpec;}
Note:
See TracChangeset
for help on using the changeset viewer.