Changeset 8993 in ntrip for trunk/BNC/src/PPP/pppClient.cpp
- Timestamp:
- Jul 21, 2020, 10:02:56 AM (4 years ago)
- File:
-
- 1 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) {
Note:
See TracChangeset
for help on using the changeset viewer.