Changeset 10583 in ntrip for trunk/BNC/src
- Timestamp:
- Dec 10, 2024, 2:19:35 PM (3 days ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r10576 r10583 67 67 } 68 68 } 69 _offGps = 0.0;70 _offGlo = 0.0;71 _offGal = 0.0;72 _offBds = 0.0;73 69 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this" 74 70 } … … 338 334 } 339 335 340 // Compute A Priori Gps Clock Offset341 //////////////////////////////////////////////////////////////////////////////342 double t_pppClient::cmpOffGps(vector<t_pppSatObs*>& obsVector) {343 344 t_lc::type tLC = t_lc::dummy;345 double offGps = 0.0;346 347 if (_opt->useSystem('G')) {348 while (obsVector.size() > 0) {349 offGps = 0.0;350 double maxRes = 0.0;351 int maxResIndex = -1;352 unsigned nObs = 0;353 t_prn maxResPrn;354 for (unsigned ii = 0; ii < obsVector.size(); ii++) {355 const t_pppSatObs* satObs = obsVector.at(ii);356 if (satObs->prn().system() == 'G') {357 if (tLC == t_lc::dummy) {358 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;359 }360 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {361 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);362 ++nObs;363 offGps += ll;364 if (fabs(ll) > fabs(maxRes)) {365 maxRes = ll;366 maxResIndex = ii;367 maxResPrn = satObs->prn();368 }369 }370 }371 }372 373 if (nObs > 0) {374 offGps = offGps / nObs;375 }376 else {377 offGps = 0.0;378 }379 380 if (fabs(maxRes) > 150.0) {381 LOG << "t_pppClient::cmpOffGps outlier " << maxResPrn.toString() << " " << maxRes << endl;382 delete obsVector.at(maxResIndex);383 obsVector.erase(obsVector.begin() + maxResIndex);384 }385 else {386 break;387 }388 }389 }390 return offGps;391 }392 393 394 // Compute A Priori Glonass Clock Offset395 //////////////////////////////////////////////////////////////////////////////396 double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) {397 398 t_lc::type tLC = t_lc::dummy;399 double offGlo = 0.0;400 401 if (_opt->useSystem('R')) {402 while (obsVector.size() > 0) {403 offGlo = 0.0;404 double maxRes = 0.0;405 int maxResIndex = -1;406 unsigned nObs = 0;407 t_prn maxResPrn;408 for (unsigned ii = 0; ii < obsVector.size(); ii++) {409 const t_pppSatObs* satObs = obsVector.at(ii);410 if (satObs->prn().system() == 'R') {411 if (tLC == t_lc::dummy) {412 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;413 }414 if (satObs->isValid(tLC) &&415 (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {416 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);417 ++nObs;418 offGlo += ll;419 if (fabs(ll) > fabs(maxRes)) {420 maxRes = ll;421 maxResIndex = ii;422 maxResPrn = satObs->prn();423 }424 }425 }426 }427 428 if (nObs > 0) {429 offGlo = offGlo / nObs;430 }431 else {432 offGlo = 0.0;433 }434 if (fabs(maxRes) > 150.0) {435 LOG << "t_pppClient::cmpOffGlo outlier " << maxResPrn.toString() << " " << maxRes << endl;436 delete obsVector.at(maxResIndex);437 obsVector.erase(obsVector.begin() + maxResIndex);438 }439 else {440 break;441 }442 }443 }444 return offGlo;445 }446 447 // Compute A Priori Galileo Clock Offset448 //////////////////////////////////////////////////////////////////////////////449 double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) {450 451 t_lc::type tLC = t_lc::dummy;452 double offGal = 0.0;453 454 if (_opt->useSystem('E')) {455 while (obsVector.size() > 0) {456 offGal = 0.0;457 double maxRes = 0.0;458 int maxResIndex = -1;459 unsigned nObs = 0;460 t_prn maxResPrn;461 for (unsigned ii = 0; ii < obsVector.size(); ii++) {462 const t_pppSatObs* satObs = obsVector.at(ii);463 if (satObs->prn().system() == 'E') {464 if (tLC == t_lc::dummy) {465 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;466 }467 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {468 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);469 ++nObs;470 offGal += ll;471 if (fabs(ll) > fabs(maxRes)) {472 maxRes = ll;473 maxResIndex = ii;474 maxResPrn = satObs->prn();475 }476 }477 }478 }479 480 if (nObs > 0) {481 offGal = offGal / nObs;482 }483 else {484 offGal = 0.0;485 }486 487 if (fabs(maxRes) > 150.0) {488 LOG << "t_pppClient::cmpOffGal outlier " << maxResPrn.toString() << " " << maxRes << endl;489 delete obsVector.at(maxResIndex);490 obsVector.erase(obsVector.begin() + maxResIndex);491 }492 else {493 break;494 }495 }496 }497 return offGal;498 }499 // Compute A Priori BDS Clock Offset500 //////////////////////////////////////////////////////////////////////////////501 double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) {502 503 t_lc::type tLC = t_lc::dummy;504 double offBds = 0.0;505 506 if (_opt->useSystem('C')) {507 while (obsVector.size() > 0) {508 offBds = 0.0;509 double maxRes = 0.0;510 int maxResIndex = -1;511 unsigned nObs = 0;512 t_prn maxResPrn;513 for (unsigned ii = 0; ii < obsVector.size(); ii++) {514 const t_pppSatObs* satObs = obsVector.at(ii);515 if (satObs->prn().system() == 'C') {516 if (tLC == t_lc::dummy) {517 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;518 }519 if (satObs->isValid(tLC) &&520 (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {521 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);522 ++nObs;523 offBds += ll;524 if (fabs(ll) > fabs(maxRes)) {525 maxRes = ll;526 maxResIndex = ii;527 maxResPrn = satObs->prn();528 }529 }530 }531 }532 533 if (nObs > 0) {534 offBds = offBds / nObs;535 }536 else {537 offBds = 0.0;538 }539 540 if (fabs(maxRes) > 150.0) {541 LOG << "t_pppClient::cmpOffBDS outlier " << maxResPrn.toString() << " " << maxRes << endl;542 delete obsVector.at(maxResIndex);543 obsVector.erase(obsVector.begin() + maxResIndex);544 }545 else {546 break;547 }548 }549 }550 return offBds;551 }552 553 336 // 554 337 ////////////////////////////////////////////////////////////////////////////// … … 690 473 return finish(failure, 4); 691 474 } 692 693 _offGps = cmpOffGps(_obsRover);694 _offGlo = cmpOffGlo(_obsRover);695 _offGal = cmpOffGal(_obsRover);696 _offBds = cmpOffBds(_obsRover);697 475 698 476 // Prepare Pseudo Observations of the Rover -
trunk/BNC/src/PPP/pppClient.h
r10388 r10583 36 36 const bncAntex* antex() const {return _antex;} 37 37 const t_pppStation* staRover() const {return _staRover;} 38 double offGps() const {return _offGps;}39 double offGlo() const {return _offGlo;}40 double offGal() const {return _offGal;}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;}46 47 38 48 39 std::ostringstream& log() {return *_log;} -
trunk/BNC/src/PPP/pppFilter.cpp
r10576 r10583 299 299 const vector<t_pppSatObs*> &obsVector) { 300 300 301 double SLIP = 150.0;301 double SLIP = 20.0; 302 302 double fac = 1.0; 303 303 if (_lastEpoTimeOK.valid()) { … … 386 386 firstObsTime = lastObsTime : firstObsTime = par->firstObsTime(); 387 387 t_lc::type tLC = par->tLC(); 388 388 // if (tLC != lc) {continue;} 389 389 LOG << string(_epoTime) << " RESET " << par->toString() << endl; 390 390 delete par; par = new t_pppParam(t_pppParam::amb, prn, tLC, &obsVector); -
trunk/BNC/src/PPP/pppParlist.cpp
r10576 r10583 62 62 _noise = OPT->_noiseCrd[2]; 63 63 break; 64 case rClk: 64 case rClkG: 65 _epoSpec = true; 66 _sigma0 = OPT->_aprSigClk; 67 break; 68 case rClkR: 69 _epoSpec = true; 70 _sigma0 = OPT->_aprSigClk; 71 break; 72 case rClkE: 73 _epoSpec = true; 74 _sigma0 = OPT->_aprSigClk; 75 break; 76 case rClkC: 65 77 _epoSpec = true; 66 78 _sigma0 = OPT->_aprSigClk; … … 73 85 const t_pppSatObs* obs = obsVector->at(ii); 74 86 if (obs->prn() == _prn) { 75 double offGps = 0.0; 76 if (_prn.system() == 'G' && tLC != t_lc::MW) { 77 offGps = PPP_CLIENT->offGps(); 78 } 79 double offGlo = 0.0; 80 if (_prn.system() == 'R' && tLC != t_lc::MW) { 81 offGlo = PPP_CLIENT->offGlo(); 82 } 83 double offGal = 0.0; 84 if (_prn.system() == 'E' && tLC != t_lc::MW) { 85 offGal = PPP_CLIENT->offGal(); 86 } 87 double offBds = 0.0; 88 if (_prn.system() == 'C' && tLC != t_lc::MW) { 89 offBds = PPP_CLIENT->offBds(); 90 } 91 _x0 = floor((obs->obsValue(tLC) - offGps - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 87 _x0 = floor((obs->obsValue(tLC) - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5); 92 88 break; 93 89 } 94 90 } 95 91 } 96 break;97 case offGps:98 _epoSpec = true;99 _sigma0 = OPT->_aprSigClkOff;100 _x0 = PPP_CLIENT->offGps();101 break;102 case offGlo:103 _epoSpec = true;104 _sigma0 = OPT->_aprSigClkOff;105 _x0 = PPP_CLIENT->offGlo();106 break;107 case offGal:108 _epoSpec = true;109 _sigma0 = OPT->_aprSigClkOff;110 _x0 = PPP_CLIENT->offGal();111 break;112 case offBds:113 _epoSpec = true;114 _sigma0 = OPT->_aprSigClkOff;115 _x0 = PPP_CLIENT->offBds();116 92 break; 117 93 case trp: … … 174 150 if (tLC == t_lc::GIM) {return 0.0;} 175 151 return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius(); 176 case rClk: 177 if (tLC == t_lc::GIM) {return 0.0;} 178 return 1.0; 179 case offGps: 152 case rClkG: 180 153 if (tLC == t_lc::GIM) {return 0.0;} 181 154 return (obs->prn().system() == 'G') ? 1.0 : 0.0; 182 case offGlo:155 case rClkR: 183 156 if (tLC == t_lc::GIM) {return 0.0;} 184 157 return (obs->prn().system() == 'R') ? 1.0 : 0.0; 185 case offGal:158 case rClkE: 186 159 if (tLC == t_lc::GIM) {return 0.0;} 187 160 return (obs->prn().system() == 'E') ? 1.0 : 0.0; 188 case offBds:161 case rClkC: 189 162 if (tLC == t_lc::GIM) {return 0.0;} 190 163 return (obs->prn().system() == 'C') ? 1.0 : 0.0; … … 305 278 ss << "CRD_Z"; 306 279 break; 307 case rClk: 308 ss << "REC_CLK "; 309 break; 310 case offGps: 311 ss << "OFF_GPS "; 312 break; 313 case offGlo: 314 ss << "OFF_GLO "; 315 break; 316 case offGal: 317 ss << "OFF_GAL "; 318 break; 319 case offBds: 320 ss << "OFF_BDS "; 280 case rClkG: 281 ss << "REC_CLK G "; 282 break; 283 case rClkR: 284 ss << "REC_CLK R "; 285 break; 286 case rClkE: 287 ss << "REC_CLK E "; 288 break; 289 case rClkC: 290 ss << "REC_CLK C "; 321 291 break; 322 292 case trp: … … 458 428 // Receiver Clocks 459 429 // --------------- 460 required.push_back(new t_pppParam(t_pppParam::rClk, t_prn(), t_lc::dummy)); 461 462 // GLONASS Clock Offset 463 // -------------------- 464 if ( _usedSystems.value('R') && 465 (_usedSystems.value('G') || _usedSystems.value('E') || _usedSystems.value('C'))) { 466 required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy)); 467 } 468 else { 469 PPP_CLIENT->resetOffGlo(); 470 } 471 472 // Galileo Clock Offset 473 // -------------------- 474 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') >= OPT->_minObs) { 475 required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy)); 476 } 477 else { 478 PPP_CLIENT->resetOffGal(); 479 } 480 481 // GPS Clock Offset 482 // -------------------- 483 if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') < OPT->_minObs) { 484 required.push_back(new t_pppParam(t_pppParam::offGps, t_prn(), t_lc::dummy)); 485 } 486 else { 487 PPP_CLIENT->resetOffGps(); 488 } 489 490 // BDS Clock Offset 491 // ---------------- 492 if (_usedSystems.value('C') && 493 (_usedSystems.value('G') || _usedSystems.value('E'))) { 494 required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy)); 495 } 496 else { 497 PPP_CLIENT->resetOffBds(); 498 } 430 if (_usedSystems.contains('G')) { 431 required.push_back(new t_pppParam(t_pppParam::rClkG, t_prn(), t_lc::dummy)); 432 } 433 434 if (_usedSystems.contains('R')) { 435 required.push_back(new t_pppParam(t_pppParam::rClkR, t_prn(), t_lc::dummy)); 436 } 437 438 if (_usedSystems.contains('E')) { 439 required.push_back(new t_pppParam(t_pppParam::rClkE, t_prn(), t_lc::dummy)); 440 } 441 442 if (_usedSystems.contains('C')) { 443 required.push_back(new t_pppParam(t_pppParam::rClkC, t_prn(), t_lc::dummy)); 444 } 499 445 500 446 // Troposphere -
trunk/BNC/src/PPP/pppParlist.h
r10388 r10583 14 14 class t_pppParam { 15 15 public: 16 enum e_type {crdX, crdY, crdZ, rClk , offGps, offGlo, offGal, offBds, trp, ion, amb,16 enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb, 17 17 cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1, 18 18 cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
Note:
See TracChangeset
for help on using the changeset viewer.