Changeset 9561 in ntrip for trunk/BNC/src
- Timestamp:
- Dec 3, 2021, 12:22:40 PM (3 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r9560 r9561 356 356 } 357 357 358 // Compute A Priori GPS-Glonass Offset359 //////////////////////////////////////////////////////////////////////////////360 double t_pppClient::cmpOffGR(vector<t_pppSatObs*>& obsVector) {361 362 t_lc::type tLC = t_lc::dummy;363 double offGR = 0.0;364 365 if (_opt->useSystem('R')) {366 while (obsVector.size() > 0) {367 offGR = 0.0;368 double maxRes = 0.0;369 int maxResIndex = -1;370 t_prn maxResPrn;371 unsigned nObs = 0;372 for (unsigned ii = 0; ii < obsVector.size(); ii++) {373 const t_pppSatObs* satObs = obsVector.at(ii);374 if (satObs->prn().system() == 'R') {375 if (tLC == t_lc::dummy) {376 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;377 }378 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {379 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);380 ++nObs;381 offGR += ll;382 if (fabs(ll) > fabs(maxRes)) {383 maxRes = ll;384 maxResIndex = ii;385 maxResPrn = satObs->prn();386 }387 }388 }389 }390 391 if (nObs > 0) {392 offGR = offGR / nObs;393 }394 else {395 offGR = 0.0;396 }397 if (fabs(maxRes) > OPT->_aprSigOGC) {398 LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;399 delete obsVector.at(maxResIndex);400 obsVector.erase(obsVector.begin() + maxResIndex);401 }402 else {403 break;404 }405 }406 }407 return offGR;408 }409 410 // Compute A Priori GPS-Galileo Offset411 //////////////////////////////////////////////////////////////////////////////412 double t_pppClient::cmpOffGE(vector<t_pppSatObs*>& obsVector) {413 414 t_lc::type tLC = t_lc::dummy;415 double offGE = 0.0;416 417 if (_opt->useSystem('E')) {418 while (obsVector.size() > 0) {419 offGE = 0.0;420 double maxRes = 0.0;421 int maxResIndex = -1;422 t_prn maxResPrn;423 unsigned nObs = 0;424 for (unsigned ii = 0; ii < obsVector.size(); ii++) {425 const t_pppSatObs* satObs = obsVector.at(ii);426 if (satObs->prn().system() == 'E') {427 if (tLC == t_lc::dummy) {428 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;429 }430 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {431 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);432 ++nObs;433 offGE += ll;434 if (fabs(ll) > fabs(maxRes)) {435 maxRes = ll;436 maxResIndex = ii;437 maxResPrn = satObs->prn();438 }439 }440 }441 }442 443 if (nObs > 0) {444 offGE = offGE / nObs;445 }446 else {447 offGE = 0.0;448 }449 450 if (fabs(maxRes) > OPT->_aprSigOGE) {451 LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;452 delete obsVector.at(maxResIndex);453 obsVector.erase(obsVector.begin() + maxResIndex);454 }455 else {456 break;457 }458 }459 }460 return offGE;461 }462 463 // Compute A Priori GPS-BDS Offset464 //////////////////////////////////////////////////////////////////////////////465 double t_pppClient::cmpOffGC(vector<t_pppSatObs*>& obsVector) {466 467 t_lc::type tLC = t_lc::dummy;468 double offGC = 0.0;469 470 if (_opt->useSystem('C')) {471 while (obsVector.size() > 0) {472 offGC = 0.0;473 double maxRes = 0.0;474 int maxResIndex = -1;475 t_prn maxResPrn;476 unsigned nObs = 0;477 for (unsigned ii = 0; ii < obsVector.size(); ii++) {478 const t_pppSatObs* satObs = obsVector.at(ii);479 if (satObs->prn().system() == 'C') {480 if (tLC == t_lc::dummy) {481 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;482 }483 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {484 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);485 ++nObs;486 offGC += ll;487 if (fabs(ll) > fabs(maxRes)) {488 maxRes = ll;489 maxResIndex = ii;490 maxResPrn = satObs->prn();491 }492 }493 }494 }495 496 if (nObs > 0) {497 offGC = offGC / nObs;498 }499 else {500 offGC = 0.0;501 }502 503 if (fabs(maxRes) > OPT->_aprSigOGC) {504 LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;505 delete obsVector.at(maxResIndex);506 obsVector.erase(obsVector.begin() + maxResIndex);507 }508 else {509 break;510 }511 }512 }513 return offGC;514 }515 516 358 // 517 359 ////////////////////////////////////////////////////////////////////////////// -
trunk/BNC/src/PPP/pppClient.h
r9560 r9561 62 62 t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 63 63 ColumnVector& xyzc, bool print); 64 double cmpOffGR(std::vector<t_pppSatObs*>& obsVector);65 double cmpOffGE(std::vector<t_pppSatObs*>& obsVector);66 double cmpOffGC(std::vector<t_pppSatObs*>& obsVector);67 64 t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector); 68 65 void setRefSatellites(std::vector<t_pppSatObs*>& obsVector); -
trunk/BNC/src/PPP/pppParlist.cpp
r9559 r9561 102 102 _noise = OPT->_noiseIon; 103 103 break; 104 case cBiasG1: case cBias E1: case cBiasC1:105 case cBiasG2: case cBias E2: case cBiasC2:104 case cBiasG1: case cBiasR1: case cBiasE1: case cBiasC1: 105 case cBiasG2: case cBiasR2: case cBiasE2: case cBiasC2: 106 106 _epoSpec = false; 107 107 _sigma0 = OPT->_aprSigCodeBias; 108 108 _noise = OPT->_noiseCodeBias; 109 109 break; 110 case pBiasG1: case pBias E1: case pBiasC1:111 case pBiasG2: case pBias E2: case pBiasC2:110 case pBiasG1: case pBiasR1: case pBiasE1: case pBiasC1: 111 case pBiasG2: case pBiasR2: case pBiasE2: case pBiasC2: 112 112 _epoSpec = false; 113 113 _sigma0 = OPT->_aprSigPhaseBias; … … 246 246 if ((obs->prn().system() == 'G') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} 247 247 break; 248 case cBiasR1: 249 if ((obs->prn().system() == 'R') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} 250 break; 248 251 case cBiasE1: 249 252 if ((obs->prn().system() == 'E') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;} … … 254 257 case cBiasG2: 255 258 if ((obs->prn().system() == 'G') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;} 259 break; 260 case cBiasR2: 261 if ((obs->prn().system() == 'R') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;} 256 262 break; 257 263 case cBiasE2: … … 264 270 if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 265 271 break; 272 case pBiasR1: 273 if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} 274 break; 266 275 case pBiasE1: 267 276 if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;} … … 272 281 case pBiasG2: 273 282 if ((obs->prn().system() == 'G') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;} 283 break; 284 case pBiasR2: 285 if ((obs->prn().system() == 'R') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;} 274 286 break; 275 287 case pBiasE2: … … 322 334 case cBiasG2: case pBiasG2: 323 335 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " G "; 336 break; 337 case cBiasR1: case pBiasR1: 338 case cBiasR2: case pBiasR2: 339 ss << "BIA " << left << setw(3) << t_lc::toString(_tLC) << right << " R "; 324 340 break; 325 341 case cBiasE1: case pBiasE1: … … 509 525 it = _params.erase(it); 510 526 } 527 else if ((par->type() == t_pppParam::cBiasR1 || 528 par->type() == t_pppParam::cBiasR2 || 529 par->type() == t_pppParam::pBiasR1 || 530 par->type() == t_pppParam::pBiasR2) && !usedSystems().contains('R')) { 531 #ifdef BNC_DEBUG_PPP 532 LOG << "remove1 " << par->toString() << std::endl; 533 #endif 534 delete par; 535 it = _params.erase(it); 536 } 511 537 else if ((par->type() == t_pppParam::cBiasE1 || 512 538 par->type() == t_pppParam::cBiasE2 || … … 576 602 } 577 603 } 604 if (_usedSystems.contains('R')) { 605 lc = OPT->LCs('R'); 606 if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) { 607 required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1)); 608 } 609 if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) { 610 required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2)); 611 } 612 } 578 613 if (_usedSystems.contains('E')) { 579 614 lc = OPT->LCs('E'); … … 608 643 if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) { 609 644 required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2)); 645 } 646 } 647 if (_usedSystems.contains('R')) { 648 lc = OPT->LCs('R'); 649 if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) { 650 required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1)); 651 } 652 if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) { 653 required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2)); 610 654 } 611 655 } -
trunk/BNC/src/PPP/pppParlist.h
r9559 r9561 16 16 public: 17 17 enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb, 18 cBiasG1, cBias E1, cBiasC1, pBiasG1, pBiasE1, pBiasC1,19 cBiasG2, cBias E2, cBiasC2, pBiasG2, pBiasE2, pBiasC2};18 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 19 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2}; 20 20 21 21 t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0); -
trunk/BNC/src/PPP/pppSatObs.cpp
r9560 r9561 353 353 retVal = sqrt(retVal); 354 354 355 // Elevation-Dependent Weighting 356 // ----------------------------- 357 double cEle = 1.0; 358 if ( (OPT->_eleWgtCode && t_lc::includesCode(tLC)) || 359 (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) { 360 double eleD = eleSat()*180.0/M_PI; 361 double hlp = fabs(90.0 - eleD); 362 cEle = (1.0 + hlp*hlp*hlp*0.000004); 363 } 364 365 return cEle * retVal; 355 return retVal; 366 356 } 367 357 -
trunk/BNC/src/pppMain.cpp
r9559 r9561 216 216 opt->_obsModelType = t_pppOptions::DCMcodeBias; 217 217 opt->_refSatRequired = true; 218 opt->_noiseCodeBias = 100 0.0;218 opt->_noiseCodeBias = 100.0; 219 219 opt->_noiseIon = 0.1; 220 220 } … … 222 222 opt->_obsModelType = t_pppOptions::DCMphaseBias; 223 223 opt->_refSatRequired = true; 224 opt->_noisePhaseBias = 100 0.0;224 opt->_noisePhaseBias = 100.0; 225 225 opt->_noiseIon = 0.1; 226 226 } … … 420 420 // ------------------- 421 421 opt->_aprSigAmb = 1000.0; 422 opt->_aprSigIon = 1000.0;423 422 opt->_aprSigClk = 1000.0; 424 opt->_aprSigOGR = 1000.0; 425 opt->_aprSigOGE = 1000.0; 426 opt->_aprSigOGC = 1000.0; 427 opt->_aprSigCodeBias = 1000.0; 428 opt->_aprSigPhaseBias = 1000.0; 423 opt->_aprSigIon = 100.0; 424 opt->_aprSigCodeBias = 100.0; 425 opt->_aprSigPhaseBias = 100.0; 429 426 430 427 _options << opt; -
trunk/BNC/src/pppOptions.h
r9552 r9561 63 63 double _aprSigTrp; 64 64 double _aprSigIon; 65 double _aprSigOGR;66 double _aprSigOGE;67 double _aprSigOGC;68 65 double _aprSigAmb; 69 66 double _aprSigCodeBias;
Note:
See TracChangeset
for help on using the changeset viewer.