Changeset 10388 in ntrip for trunk/BNC/src
- Timestamp:
- Mar 12, 2024, 3:10:17 PM (10 months ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r10384 r10388 67 67 } 68 68 } 69 _offGps = 0.0; 69 70 _offGlo = 0.0; 70 71 _offGal = 0.0; … … 301 302 const t_pppSatObs* satObs = obsVector.at(ii); 302 303 char sys = satObs->prn().system(); 303 if (satObs->isValid() && 304 if (satObs->isValid() && 304 305 (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) { 305 306 ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3); … … 337 338 return success; 338 339 } 340 341 // Compute A Priori Gps Clock Offset 342 ////////////////////////////////////////////////////////////////////////////// 343 double t_pppClient::cmpOffGps(vector<t_pppSatObs*>& obsVector) { 344 345 t_lc::type tLC = t_lc::dummy; 346 double offGps = 0.0; 347 348 if (_opt->useSystem('G')) { 349 while (obsVector.size() > 0) { 350 offGps = 0.0; 351 double maxRes = 0.0; 352 int maxResIndex = -1; 353 unsigned nObs = 0; 354 t_prn maxResPrn; 355 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 356 const t_pppSatObs* satObs = obsVector.at(ii); 357 if (satObs->prn().system() == 'G') { 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 offGps += ll; 365 if (fabs(ll) > fabs(maxRes)) { 366 maxRes = ll; 367 maxResIndex = ii; 368 maxResPrn = satObs->prn(); 369 } 370 } 371 } 372 } 373 374 if (nObs > 0) { 375 offGps = offGps / nObs; 376 } 377 else { 378 offGps = 0.0; 379 } 380 381 if (fabs(maxRes) > 100.0) { 382 LOG << "t_pppClient::cmpOffGps outlier " << maxResPrn.toString() << " " << maxRes << endl; 383 delete obsVector.at(maxResIndex); 384 obsVector.erase(obsVector.begin() + maxResIndex); 385 } 386 else { 387 break; 388 } 389 } 390 } 391 return offGps; 392 } 393 339 394 340 395 // Compute A Priori Glonass Clock Offset … … 443 498 return offGal; 444 499 } 445 446 500 // Compute A Priori BDS Clock Offset 447 501 ////////////////////////////////////////////////////////////////////////////// … … 638 692 } 639 693 694 _offGps = cmpOffGps(_obsRover); 640 695 _offGlo = cmpOffGlo(_obsRover); 641 696 _offGal = cmpOffGal(_obsRover); -
trunk/BNC/src/PPP/pppClient.h
r10384 r10388 36 36 const bncAntex* antex() const {return _antex;} 37 37 const t_pppStation* staRover() const {return _staRover;} 38 double offGps() const {return _offGps;} 38 39 double offGlo() const {return _offGlo;} 39 40 double offGal() const {return _offGal;} 40 41 double offBds() const {return _offBds;} 42 void resetOffGps() {_offGps = 0.0;} 43 void resetOffGlo() {_offGlo = 0.0;} 44 void resetOffGal() {_offGal = 0.0;} 45 void resetOffBds() {_offBds = 0.0;} 41 46 42 47 … … 61 66 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 62 67 ColumnVector& xyzc, bool print); 68 double cmpOffGps(std::vector<t_pppSatObs*>& obsVector); 63 69 double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector); 64 70 double cmpOffGal(std::vector<t_pppSatObs*>& obsVector); … … 73 79 bncAntex* _antex; 74 80 t_pppFilter* _filter; 81 double _offGps; 75 82 double _offGlo; 76 83 double _offGal; -
trunk/BNC/src/PPP/pppFilter.cpp
r10386 r10388 310 310 string epoTimeStr = string(_epoTime); 311 311 const vector<t_pppParam*> ¶ms = _parlist->params(); 312 int maxNumberOfReset = (2.0 * obsVector.size()) - 2.0; 313 int numberOfReset = 0; 312 314 313 315 for (unsigned ii = 0; ii < LCs.size(); ii++) { … … 347 349 348 350 // Check Pre-Fit Residuals 349 / *-----------------------351 // ----------------------- 350 352 else { 351 353 ColumnVector AA(params.size()); … … 358 360 359 361 if (fabs(vv) > SLIP) { 362 numberOfReset++; 360 363 LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' ' 361 364 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl; 362 resetAmb(obs->prn(), obsVector, tLC); 363 } 364 }*/ 365 if (numberOfReset < maxNumberOfReset) { 366 resetAmb(obs->prn(), obsVector, tLC); 367 } 368 } 369 } 365 370 } 366 371 } -
trunk/BNC/src/PPP/pppParlist.cpp
r10387 r10388 74 74 const t_pppSatObs* obs = obsVector->at(ii); 75 75 if (obs->prn() == _prn) { 76 double offGps = 0.0; 77 if (_prn.system() == 'G' && tLC != t_lc::MW) { 78 offGps = PPP_CLIENT->offGps(); 79 } 76 80 double offGlo = 0.0; 77 81 if (_prn.system() == 'R' && tLC != t_lc::MW) { … … 86 90 offBds = PPP_CLIENT->offBds(); 87 91 } 88 _x0 = floor((obs->obsValue(tLC) - offG lo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);92 _x0 = floor((obs->obsValue(tLC) - offGps - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 89 93 break; 90 94 } 91 95 } 92 96 } 97 break; 98 case offGps: 99 _epoSpec = true; 100 _sigma0 = OPT->_aprSigClkOff; 101 _x0 = PPP_CLIENT->offGps(); 93 102 break; 94 103 case offGlo: … … 171 180 if (tLC == t_lc::GIM) {return 0.0;} 172 181 return 1.0; 182 case offGps: 183 if (tLC == t_lc::GIM) {return 0.0;} 184 return (obs->prn().system() == 'G') ? 1.0 : 0.0; 173 185 case offGlo: 174 186 if (tLC == t_lc::GIM) {return 0.0;} … … 298 310 case rClk: 299 311 ss << "REC_CLK "; 312 break; 313 case offGps: 314 ss << "OFF_GPS "; 300 315 break; 301 316 case offGlo: … … 401 416 } 402 417 418 // check which systems have observations 419 // ------------------------------------- 420 _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0; 421 for (unsigned jj = 0; jj < obsVector.size(); jj++) { 422 const t_pppSatObs* satObs = obsVector[jj]; 423 char sys = satObs->prn().system(); 424 _usedSystems[sys]++; 425 } 426 403 427 // Check whether parameters have observations 404 428 // ------------------------------------------ … … 435 459 required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy)); 436 460 437 // Receiver Clock 438 // -------------- 461 // Receiver Clocks 462 // --------------- 439 463 required.push_back(new t_pppParam(t_pppParam::rClk, t_prn(), t_lc::dummy)); 440 464 441 465 // GLONASS Clock Offset 442 466 // -------------------- 443 if ((OPT->useSystem('G') && OPT->useSystem('R')) || 444 (OPT->useSystem('E') && OPT->useSystem('R')) || 445 (OPT->useSystem('C') && OPT->useSystem('R')) ) { 467 if ( _usedSystems.value('R') && 468 (_usedSystems.value('G') || _usedSystems.value('E') || _usedSystems.value('C'))) { 446 469 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 470 } 471 else { 472 PPP_CLIENT->resetOffGlo(); 447 473 } 448 474 449 475 // Galileo Clock Offset 450 476 // -------------------- 451 if ( OPT->useSystem('G') && OPT->useSystem('E')) {477 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') >= OPT->_minObs) { 452 478 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 479 } 480 else { 481 PPP_CLIENT->resetOffGal(); 482 } 483 484 // GPS Clock Offset 485 // -------------------- 486 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') < OPT->_minObs) { 487 required.push_back(new t_pppParam(t_pppParam::offGps, t_prn(), t_lc::dummy)); 488 } 489 else { 490 PPP_CLIENT->resetOffGps(); 453 491 } 454 492 455 493 // BDS Clock Offset 456 494 // ---------------- 457 if ( (OPT->useSystem('G') && OPT->useSystem('C')) ||458 ( OPT->useSystem('E') && OPT->useSystem('C'))) {495 if (_usedSystems.contains('C') && 496 (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 459 497 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 498 } 499 else { 500 PPP_CLIENT->resetOffBds(); 460 501 } 461 502 -
trunk/BNC/src/PPP/pppParlist.h
r10384 r10388 14 14 class t_pppParam { 15 15 public: 16 enum e_type {crdX, crdY, crdZ, rClk, offG lo, offGal, offBds, trp, ion, amb,16 enum e_type {crdX, crdY, crdZ, rClk, offGps, offGlo, offGal, offBds, trp, ion, amb, 17 17 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 18 18 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; … … 104 104 const std::vector<t_pppParam*>& params() const {return _params;} 105 105 std::vector<t_pppParam*>& params() {return _params;} 106 const QMap<char, int>& usedSystems() const {return _usedSystems;} 106 107 void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ, 107 108 const ColumnVector& xx) const; … … 110 111 private: 111 112 std::vector<t_pppParam*> _params; 113 QMap<char, int> _usedSystems; 112 114 }; 113 115
Note:
See TracChangeset
for help on using the changeset viewer.