Changeset 10384 in ntrip for trunk/BNC/src/PPP/pppParlist.cpp
- Timestamp:
- Mar 11, 2024, 3:28:32 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppParlist.cpp
r10373 r10384 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 }80 76 double offGlo = 0.0; 81 77 if (_prn.system() == 'R' && tLC != t_lc::MW) { … … 90 86 offBds = PPP_CLIENT->offBds(); 91 87 } 92 _x0 = floor((obs->obsValue(tLC) - offG ps - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);88 _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 93 89 break; 94 90 } 95 91 } 96 92 } 97 break;98 case offGps:99 _epoSpec = true;100 _sigma0 = OPT->_aprSigClkOff;101 _x0 = PPP_CLIENT->offGps();102 93 break; 103 94 case offGlo: … … 180 171 if (tLC == t_lc::GIM) {return 0.0;} 181 172 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;185 173 case offGlo: 186 174 if (tLC == t_lc::GIM) {return 0.0;} … … 311 299 ss << "REC_CLK "; 312 300 break; 313 case offGps:314 ss << "OFF_GPS ";315 break;316 301 case offGlo: 317 302 ss << "OFF_GLO "; … … 385 370 par->type() == t_pppParam::crdX || 386 371 par->type() == t_pppParam::crdY || 387 par->type() == t_pppParam::crdZ) { 372 par->type() == t_pppParam::crdZ || 373 par->type() == t_pppParam::ion || 374 par->type() == t_pppParam::cBiasC1 || 375 par->type() == t_pppParam::cBiasC2 || 376 par->type() == t_pppParam::cBiasE1 || 377 par->type() == t_pppParam::cBiasE2 || 378 par->type() == t_pppParam::cBiasR1 || 379 par->type() == t_pppParam::cBiasR2 || 380 par->type() == t_pppParam::pBiasC1 || 381 par->type() == t_pppParam::pBiasC2 || 382 par->type() == t_pppParam::pBiasE1 || 383 par->type() == t_pppParam::pBiasE2 || 384 par->type() == t_pppParam::pBiasR1 || 385 par->type() == t_pppParam::pBiasR2) { 388 386 if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) { 389 387 remove = true; 390 388 } 391 389 } 392 else if (par->type() == t_pppParam::ion) {393 if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 5.0)) {394 remove = true;395 }396 }397 390 398 391 if (remove) { … … 406 399 ++it; 407 400 } 408 }409 410 // check which systems have observations411 // -------------------------------------412 _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0;413 for (unsigned jj = 0; jj < obsVector.size(); jj++) {414 const t_pppSatObs* satObs = obsVector[jj];415 char sys = satObs->prn().system();416 _usedSystems[sys]++;417 401 } 418 402 … … 441 425 } 442 426 443 if (OPT->_ionoModelType == OPT->PPP_RTK || OPT->_pseudoObsIono) {444 vector<t_pppParam*>::iterator it = _params.begin();445 while (it != _params.end()) {446 t_pppParam* par = *it;447 // Check if systems have to be presented per biases448 // ----------------------------------------------449 if (( par->type() == t_pppParam::cBiasG1 ||450 par->type() == t_pppParam::cBiasG2 ||451 par->type() == t_pppParam::pBiasG1 ||452 par->type() == t_pppParam::pBiasG2) && !_usedSystems.value('G')) {453 #ifdef BNC_DEBUG_PPP454 //LOG << "remove1 " << par->toString() << std::endl;455 #endif456 delete par;457 it = _params.erase(it);458 }459 else if ((par->type() == t_pppParam::cBiasR1 ||460 par->type() == t_pppParam::cBiasR2 ||461 par->type() == t_pppParam::pBiasR1 ||462 par->type() == t_pppParam::pBiasR2) && !_usedSystems.value('R')){463 #ifdef BNC_DEBUG_PPP464 //LOG << "remove1 " << par->toString() << std::endl;465 #endif466 delete par;467 it = _params.erase(it);468 }469 else if ((par->type() == t_pppParam::cBiasE1 ||470 par->type() == t_pppParam::cBiasE2 ||471 par->type() == t_pppParam::pBiasE1 ||472 par->type() == t_pppParam::pBiasE2) && !_usedSystems.value('E')) {473 #ifdef BNC_DEBUG_PPP474 //LOG << "remove1 " << par->toString() << std::endl;475 #endif476 delete par;477 it = _params.erase(it);478 }479 else if ((par->type() == t_pppParam::cBiasC1 ||480 par->type() == t_pppParam::cBiasC2 ||481 par->type() == t_pppParam::pBiasC1 ||482 par->type() == t_pppParam::pBiasC2) && !_usedSystems.value('C')) {483 #ifdef BNC_DEBUG_PPP484 //LOG << "remove1 " << par->toString() << std::endl;485 #endif486 delete par;487 it = _params.erase(it);488 }489 else {490 ++it;491 }492 }493 }494 495 427 // Required Set of Parameters 496 428 // -------------------------- … … 509 441 // GLONASS Clock Offset 510 442 // -------------------- 511 if ( _usedSystems.value('R') && 512 (_usedSystems.value('G') || _usedSystems.value('E') || _usedSystems.value('C'))) { 443 if (OPT->useSystem('R')) { 513 444 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 514 }515 else {516 PPP_CLIENT->resetOffGlo();517 445 } 518 446 519 447 // Galileo Clock Offset 520 448 // -------------------- 521 if ( _usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') >= OPT->_minObs) {449 if (OPT->useSystem('E')) { 522 450 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 523 }524 else {525 PPP_CLIENT->resetOffGal();526 }527 528 // GPS Clock Offset529 // --------------------530 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') < OPT->_minObs) {531 required.push_back(new t_pppParam(t_pppParam::offGps, t_prn(), t_lc::dummy));532 }533 else {534 PPP_CLIENT->resetOffGps();535 451 } 536 452 537 453 // BDS Clock Offset 538 454 // ---------------- 539 if (_usedSystems.contains('C') && 540 (_usedSystems.contains('G') || _usedSystems.contains('E'))) { 455 if (OPT->useSystem('C')) { 541 456 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 542 }543 else {544 PPP_CLIENT->resetOffBds();545 457 } 546 458 … … 577 489 // Receiver Code Biases 578 490 // -------------------- 579 if (OPT->_ionoModelType == OPT->PPP_RTK) {491 if (OPT->_ionoModelType == OPT->PPP_RTK) { 580 492 std::vector<t_lc::type> lc; 581 if ( _usedSystems.contains('G')) {493 if (OPT->useSystem('G')) { 582 494 lc = OPT->LCs('G'); 583 495 if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) { … … 588 500 } 589 501 } 590 if ( _usedSystems.contains('R')) {502 if (OPT->useSystem('R')) { 591 503 lc = OPT->LCs('R'); 592 504 if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) { … … 597 509 } 598 510 } 599 if ( _usedSystems.contains('E')) {511 if (OPT->useSystem('E')) { 600 512 lc = OPT->LCs('E'); 601 513 if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) { … … 606 518 } 607 519 } 608 if ( _usedSystems.contains('C')) {520 if (OPT->useSystem('C')) { 609 521 lc = OPT->LCs('C'); 610 522 if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) { … … 616 528 } 617 529 } 530 618 531 if (OPT->_pseudoObsIono) { 619 532 std::vector<t_lc::type> lc; 620 if ( _usedSystems.contains('G')) {533 if (OPT->useSystem('G')) { 621 534 lc = OPT->LCs('G'); 622 535 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { … … 624 537 } 625 538 } 626 if ( _usedSystems.contains('R')) {539 if (OPT->useSystem('R')) { 627 540 lc = OPT->LCs('R'); 628 541 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { … … 630 543 } 631 544 } 632 if ( _usedSystems.contains('E')) {545 if (OPT->useSystem('E')) { 633 546 lc = OPT->LCs('E'); 634 547 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { … … 636 549 } 637 550 } 638 if ( _usedSystems.contains('C')) {551 if (OPT->useSystem('C')) { 639 552 lc = OPT->LCs('C'); 640 553 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { … … 644 557 } 645 558 646 // Receiver Phase Biases647 // ---------------------648 559 if (OPT->_ionoModelType == OPT->PPP_RTK) { 649 560 std::vector<t_lc::type> lc; 650 if ( _usedSystems.contains('G')) {561 if (OPT->useSystem('G')) { 651 562 lc = OPT->LCs('G'); 652 563 if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) { … … 657 568 } 658 569 } 659 if ( _usedSystems.contains('R')) {570 if (OPT->useSystem('R')) { 660 571 lc = OPT->LCs('R'); 661 572 if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) { … … 666 577 } 667 578 } 668 if ( _usedSystems.contains('E')) {579 if (OPT->useSystem('E')) { 669 580 lc = OPT->LCs('E'); 670 581 if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) { … … 675 586 } 676 587 } 677 if ( _usedSystems.contains('C')) {588 if (OPT->useSystem('C')) { 678 589 lc = OPT->LCs('C'); 679 590 if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
Note:
See TracChangeset
for help on using the changeset viewer.