Changeset 8993 in ntrip for trunk/BNC/src
- Timestamp:
- Jul 21, 2020, 10:02:56 AM (5 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r8961 r8993 74 74 } 75 75 _offGG = 0.0; 76 _offGB = 0.0; 76 77 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this" 77 78 } … … 382 383 } 383 384 385 // Compute A Priori GPS-BDS Offset 386 ////////////////////////////////////////////////////////////////////////////// 387 double t_pppClient::cmpOffGB(vector<t_pppSatObs*>& obsVector) { 388 389 t_lc::type tLC = t_lc::dummy; 390 double offGB = 0.0; 391 392 if (_opt->useSystem('C')) { 393 while (obsVector.size() > 0) { 394 offGB = 0.0; 395 double maxRes = 0.0; 396 int maxResIndex = -1; 397 t_prn maxResPrn; 398 unsigned nObs = 0; 399 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 400 const t_pppSatObs* satObs = obsVector.at(ii); 401 if (satObs->prn().system() == 'C') { 402 if (tLC == t_lc::dummy) { 403 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 404 } 405 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 406 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 407 ++nObs; 408 offGB += ll; 409 if (fabs(ll) > fabs(maxRes)) { 410 maxRes = ll; 411 maxResIndex = ii; 412 maxResPrn = satObs->prn(); 413 } 414 } 415 } 416 } 417 418 if (nObs > 0) { 419 offGB = offGB / nObs; 420 } 421 else { 422 offGB = 0.0; 423 } 424 425 if (fabs(maxRes) > 1000.0) { 426 LOG << "t_pppClient::cmpOffGB outlier " << maxResPrn.toString() << " " << maxRes << endl; 427 delete obsVector.at(maxResIndex); 428 obsVector.erase(obsVector.begin() + maxResIndex); 429 } 430 else { 431 break; 432 } 433 } 434 } 435 return offGB; 436 } 437 384 438 // 385 439 ////////////////////////////////////////////////////////////////////////////// … … 517 571 518 572 _offGG = cmpOffGG(_obsRover); 573 _offGB = cmpOffGB(_obsRover); 519 574 520 575 if (_opt->_refSatRequired) { -
trunk/BNC/src/PPP/pppClient.h
r8956 r8993 38 38 const t_pppStation* staRover() const {return _staRover;} 39 39 double offGG() const {return _offGG;} 40 double offGB() const {return _offGB;} 40 41 41 42 std::ostringstream& log() {return *_log;} … … 60 61 ColumnVector& xyzc, bool print); 61 62 double cmpOffGG(std::vector<t_pppSatObs*>& obsVector); 63 double cmpOffGB(std::vector<t_pppSatObs*>& obsVector); 62 64 void setRefSatellites(std::vector<t_pppSatObs*>& obsVector); 63 65 … … 70 72 t_pppFilter* _filter; 71 73 double _offGG; 74 double _offGB; 72 75 std::vector<t_pppSatObs*> _obsRover; 73 76 std::ostringstream* _log; -
trunk/BNC/src/PPP/pppFilter.cpp
r8965 r8993 361 361 } 362 362 if (preProcessing) { 363 if (par && obs->prn() == refPrn) {363 if (par && obs->prn() == refPrn) { 364 364 _obsPool->setRefSatChangeRequired(true); 365 365 break; 366 } 367 else if (par && obs->prn() != refPrn) { 368 par->setAmbResetCandidate(); 366 369 } 367 370 } -
trunk/BNC/src/PPP/pppParlist.cpp
r8961 r8993 78 78 offGG = PPP_CLIENT->offGG(); 79 79 } 80 _x0 = floor((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 80 double offGB = 0; 81 if (_prn.system() == 'C' && tLC != t_lc::MW) { 82 offGB = PPP_CLIENT->offGB(); 83 } 84 _x0 = floor((obs->obsValue(tLC) - offGG - offGB - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 81 85 break; 82 86 } … … 88 92 _sigma0 = 1000.0; 89 93 _x0 = PPP_CLIENT->offGG(); 94 break; 95 case offGB: 96 _epoSpec = true; 97 _sigma0 = 1000.0; 98 _x0 = PPP_CLIENT->offGB(); 90 99 break; 91 100 case trp: … … 155 164 if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;} 156 165 return (obs->prn().system() == 'R') ? 1.0 : 0.0; 166 case offGB: 167 if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;} 168 return (obs->prn().system() == 'C') ? 1.0 : 0.0; 157 169 case amb: 158 170 if (tLC == t_lc::GIM || tLC == t_lc::Tz0) {return 0.0;} … … 267 279 ss << "OGG "; 268 280 break; 281 case offGB: 282 ss << "OGB "; 283 break; 269 284 case trp: 270 285 ss << "TRP "; … … 388 403 required.push_back(new t_pppParam(t_pppParam::offGG, t_prn(), t_lc::dummy)); 389 404 } 405 406 // GPS-BDS Clock Offset 407 // ------------------------ 408 if (OPT->useSystem('C')) { 409 required.push_back(new t_pppParam(t_pppParam::offGB, t_prn(), t_lc::dummy)); 410 } 411 390 412 391 413 // Troposphere -
trunk/BNC/src/PPP/pppParlist.h
r8956 r8993 15 15 class t_pppParam { 16 16 public: 17 enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, trp, ion, cBias1, cBias2, pBias1, pBias2};17 enum e_type {crdX, crdY, crdZ, clkR, amb, offGG, offGB, trp, ion, cBias1, cBias2, pBias1, pBias2}; 18 18 19 19 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC,
Note:
See TracChangeset
for help on using the changeset viewer.