Changeset 10003 in ntrip for trunk/BNC/src
- Timestamp:
- Mar 16, 2023, 10:06:39 AM (21 months ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r10002 r10003 73 73 } 74 74 75 _offGG = 0.0; 75 _offGlo = 0.0; 76 _offGal = 0.0; 77 _offBds = 0.0; 76 78 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this" 77 79 } … … 357 359 // Compute A Priori GPS-Glonass Offset 358 360 ////////////////////////////////////////////////////////////////////////////// 359 double t_pppClient::cmpOffG G(vector<t_pppSatObs*>& obsVector) {361 double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) { 360 362 361 363 t_lc::type tLC = t_lc::dummy; 362 double offG G= 0.0;364 double offGlo = 0.0; 363 365 364 366 if (OPT->useSystem('R')) { 365 367 366 368 while (obsVector.size() > 0) { 367 offG G= 0.0;369 offGlo = 0.0; 368 370 double maxRes = 0.0; 369 371 int maxResIndex = -1; … … 379 381 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 380 382 ++nObs; 381 offG G+= ll;383 offGlo += ll; 382 384 if (fabs(ll) > fabs(maxRes)) { 383 385 maxRes = ll; … … 390 392 391 393 if (nObs > 0) { 392 offG G = offGG/ nObs;394 offGlo = offGlo / nObs; 393 395 } 394 396 else { 395 offG G= 0.0;397 offGlo = 0.0; 396 398 } 397 399 398 400 if (fabs(maxRes) > 1000.0) { 399 LOG << "t_pppClient::cmpOffG Goutlier " << maxResPrn.toString() << " " << maxRes << endl;401 LOG << "t_pppClient::cmpOffGlo outlier " << maxResPrn.toString() << " " << maxRes << endl; 400 402 obsVector.erase(obsVector.begin() + maxResIndex); 401 403 } … … 406 408 } 407 409 408 return offGG; 409 } 410 410 return offGlo; 411 } 412 413 // Compute A Priori GPS-Galileo Offset 414 ////////////////////////////////////////////////////////////////////////////// 415 double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) { 416 417 t_lc::type tLC = t_lc::dummy; 418 double offGal = 0.0; 419 420 if (OPT->useSystem('E')) { 421 422 while (obsVector.size() > 0) { 423 offGal = 0.0; 424 double maxRes = 0.0; 425 int maxResIndex = -1; 426 t_prn maxResPrn; 427 unsigned nObs = 0; 428 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 429 t_pppSatObs* satObs = obsVector.at(ii); 430 if (satObs->prn().system() == 'E') { 431 if (tLC == t_lc::dummy) { 432 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 433 } 434 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) { 435 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 436 ++nObs; 437 offGal += ll; 438 if (fabs(ll) > fabs(maxRes)) { 439 maxRes = ll; 440 maxResIndex = ii; 441 maxResPrn = satObs->prn(); 442 } 443 } 444 } 445 } 446 447 if (nObs > 0) { 448 offGal = offGal / nObs; 449 } 450 else { 451 offGal = 0.0; 452 } 453 454 if (fabs(maxRes) > 1000.0) { 455 LOG << "t_pppClient::cmpOffGal outlier " << maxResPrn.toString() << " " << maxRes << endl; 456 obsVector.erase(obsVector.begin() + maxResIndex); 457 } 458 else { 459 break; 460 } 461 } 462 } 463 464 return offGal; 465 } 466 467 468 // Compute A Priori GPS-BDS Offset 469 ////////////////////////////////////////////////////////////////////////////// 470 double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) { 471 472 t_lc::type tLC = t_lc::dummy; 473 double offBds = 0.0; 474 475 if (_opt->useSystem('C')) { 476 while (obsVector.size() > 0) { 477 offBds = 0.0; 478 double maxRes = 0.0; 479 int maxResIndex = -1; 480 t_prn maxResPrn; 481 unsigned nObs = 0; 482 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 483 const t_pppSatObs* satObs = obsVector.at(ii); 484 if (satObs->prn().system() == 'C') { 485 if (tLC == t_lc::dummy) { 486 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 487 } 488 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 489 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 490 ++nObs; 491 offBds += ll; 492 if (fabs(ll) > fabs(maxRes)) { 493 maxRes = ll; 494 maxResIndex = ii; 495 maxResPrn = satObs->prn(); 496 } 497 } 498 } 499 } 500 501 if (nObs > 0) { 502 offBds = offBds / nObs; 503 } 504 else { 505 offBds = 0.0; 506 } 507 508 if (fabs(maxRes) > 1000.0) { 509 LOG << "t_pppClient::cmpOffBds outlier " << maxResPrn.toString() << " " << maxRes << endl; 510 delete obsVector.at(maxResIndex); 511 obsVector.erase(obsVector.begin() + maxResIndex); 512 } 513 else { 514 break; 515 } 516 } 517 } 518 return offBds; 519 } 411 520 // 412 521 ////////////////////////////////////////////////////////////////////////////// … … 586 695 } 587 696 588 _offGG = cmpOffGG(_obsRover); 697 _offGlo = cmpOffGlo(_obsRover); 698 _offGal = cmpOffGal(_obsRover); 699 _offBds = cmpOffBds(_obsRover); 589 700 590 701 // Prepare Pseudo Observations of the Rover -
trunk/BNC/src/PPP/pppClient.h
r10002 r10003 38 38 const bncAntex* antex() const {return _antex;} 39 39 const t_pppStation* staRover() const {return _staRover;} 40 double offGG() const {return _offGG;} 40 double offGlo() const {return _offGlo;} 41 double offGal() const {return _offGal;} 42 double offBds() const {return _offBds;} 41 43 42 44 std::ostringstream& log() {return *_log;} … … 61 63 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 62 64 ColumnVector& xyzc, bool print); 63 double cmpOffGG(std::vector<t_pppSatObs*>& obsVector); 65 double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector); 66 double cmpOffGal(std::vector<t_pppSatObs*>& obsVector); 67 double cmpOffBds(std::vector<t_pppSatObs*>& obsVector); 64 68 t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector); 65 69 void setRefSatellites(std::vector<t_pppSatObs*>& obsVector); … … 73 77 bncAntex* _antex; 74 78 t_pppFilter* _filter; 75 double _offGG; 79 double _offGlo; 80 double _offGal; 81 double _offBds; 76 82 std::vector<t_pppSatObs*> _obsRover; 77 83 QMap<char, t_pppRefSat*> _refSatMap; -
trunk/BNC/src/PPP/pppFilter.cpp
r10002 r10003 354 354 << t_lc::toString(maxOutlierLC) << ' ' << obs->prn().toString() 355 355 << ' ' << setw(8) << setprecision(4) << maxOutlier << endl; 356 //break;356 break; 357 357 } //else {obs->setOutlier(); } 358 358 } else { // fin-processing -
trunk/BNC/src/PPP/pppFilter.h
r9642 r10003 128 128 _D21.ReSize(_numPar, _numPar); _D21 = 0.0; 129 129 } 130 t_irc prepareAA(const Matrix& AA, int ind) { //LOG << "prepare AA" << ind << "\n";130 t_irc prepareAA(const Matrix& AA, int ind) {LOG << "prepare AA" << ind << "\n"; 131 131 Matrix* Prep = &_AA2; 132 132 if (ind == 1) { 133 133 Prep = &_AA1; 134 134 } 135 //LOG << "_firstRow: " << _firstRow << " _lastRow: " << _lastRow << " _numPar " << _numPar << std::endl; 135 LOG << "_firstRow: " << _firstRow << " _lastRow: " << _lastRow << " _numPar " << _numPar << std::endl; 136 LOG << "t_pppFilter::prepareAA: AA.Ncols() > _numPar? " << AA.Ncols() << " / " << _numPar << std::endl; 136 137 if (AA.Ncols() > _numPar) { 137 138 LOG << "t_pppFilter::prepareAA: AA.Ncols() > _numPar: " << AA.Ncols() << " > " << _numPar << std::endl; -
trunk/BNC/src/PPP/pppParlist.cpp
r10002 r10003 74 74 const t_pppSatObs* obs = obsVector->at(ii); 75 75 if (obs->prn() == _prn) { 76 double offG G= 0;76 double offGlo = 0; 77 77 if (_prn.system() == 'R' && tLC != t_lc::MW) { 78 offG G = PPP_CLIENT->offGG();78 offGlo = PPP_CLIENT->offGlo(); 79 79 } 80 _x0 = floor((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 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); 81 89 break; 82 90 } … … 84 92 } 85 93 break; 86 case offG G:94 case offGlo: 87 95 _epoSpec = true; 88 96 _sigma0 = OPT->_aprSigClk; 89 _x0 = PPP_CLIENT->offGG(); 90 break; 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 break; 91 109 case trp: 92 110 _epoSpec = false; … … 176 194 if (tLC == t_lc::GIM) {return 0.0;} 177 195 return 1.0; 178 case offG G:196 case offGlo: 179 197 if (tLC == t_lc::GIM) {return 0.0;} 180 198 return (obs->prn().system() == 'R') ? 1.0 : 0.0; 199 case offGal: 200 if (tLC == t_lc::GIM) {return 0.0;} 201 return (obs->prn().system() == 'E') ? 1.0 : 0.0; 202 case offBds: 203 if (tLC == t_lc::GIM) {return 0.0;} 204 return (obs->prn().system() == 'C') ? 1.0 : 0.0; 181 205 case amb: 182 206 if (tLC == t_lc::GIM) {return 0.0;} … … 304 328 ss << "REC_CLK "; 305 329 break; 306 case offGG: 307 ss << "OFF_GLO "; 330 case offGlo: 331 ss << "OFF_GLO "; 332 break; 333 case offGal: 334 ss << "OFF GAL "; 335 break; 336 case offBds: 337 ss << "OFF_BDS "; 308 338 break; 309 339 case trp: … … 663 693 required.push_back(new t_pppParam(t_pppParam::clkR, t_prn(), t_lc::dummy)); 664 694 665 // GPS-Glonass Clock Offset 666 // ------------------------ 667 if (OPT->useSystem('R')) { 668 required.push_back(new t_pppParam(t_pppParam::offGG, t_prn(), t_lc::dummy)); 695 // Glonass Clock Offset 696 // -------------------- 697 if (_usedSystems.contains('R') && (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 698 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 699 } 700 701 // Galileo Clock Offset 702 // -------------------- 703 if (_usedSystems.contains('E') && _usedSystems.contains('G')) { 704 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 705 } 706 707 // BDS Clock Offset 708 // ---------------- 709 if (_usedSystems.contains('C') && (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 710 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 669 711 } 670 712 -
trunk/BNC/src/PPP/pppParlist.h
r10002 r10003 15 15 class t_pppParam { 16 16 public: 17 enum e_type {crdX, crdY, crdZ, clkR, offG G, trp, ion, amb,17 enum e_type {crdX, crdY, crdZ, clkR, offGlo, offGal, offBds, trp, ion, amb, 18 18 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 19 19 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
Note:
See TracChangeset
for help on using the changeset viewer.