Changeset 9288 in ntrip for trunk/BNC/src/PPP/pppClient.cpp
- Timestamp:
- Nov 27, 2020, 10:38:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r8993 r9288 73 73 } 74 74 } 75 _offGG = 0.0; 76 _offGB = 0.0; 75 _offGR = 0.0; 76 _offGE = 0.0; 77 _offGC = 0.0; 77 78 CLIENTS.setLocalData(this); // CLIENTS takes ownership over "this" 78 79 } … … 332 333 // Compute A Priori GPS-Glonass Offset 333 334 ////////////////////////////////////////////////////////////////////////////// 334 double t_pppClient::cmpOffG G(vector<t_pppSatObs*>& obsVector) {335 double t_pppClient::cmpOffGR(vector<t_pppSatObs*>& obsVector) { 335 336 336 337 t_lc::type tLC = t_lc::dummy; 337 double offG G= 0.0;338 double offGR = 0.0; 338 339 339 340 if (_opt->useSystem('R')) { 340 341 while (obsVector.size() > 0) { 341 offG G= 0.0;342 offGR = 0.0; 342 343 double maxRes = 0.0; 343 344 int maxResIndex = -1; … … 353 354 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 354 355 ++nObs; 355 offG G+= ll;356 offGR += ll; 356 357 if (fabs(ll) > fabs(maxRes)) { 357 358 maxRes = ll; … … 364 365 365 366 if (nObs > 0) { 366 offG G = offGG/ nObs;367 offGR = offGR / nObs; 367 368 } 368 369 else { 369 offG G= 0.0;370 offGR = 0.0; 370 371 } 371 372 372 373 if (fabs(maxRes) > 1000.0) { 373 LOG << "t_pppClient::cmpOffG Goutlier " << maxResPrn.toString() << " " << maxRes << endl;374 LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl; 374 375 delete obsVector.at(maxResIndex); 375 376 obsVector.erase(obsVector.begin() + maxResIndex); … … 380 381 } 381 382 } 382 return offGG; 383 return offGR; 384 } 385 386 // Compute A Priori GPS-Galileo Offset 387 ////////////////////////////////////////////////////////////////////////////// 388 double t_pppClient::cmpOffGE(vector<t_pppSatObs*>& obsVector) { 389 390 t_lc::type tLC = t_lc::dummy; 391 double offGE = 0.0; 392 393 if (_opt->useSystem('E')) { 394 while (obsVector.size() > 0) { 395 offGE = 0.0; 396 double maxRes = 0.0; 397 int maxResIndex = -1; 398 t_prn maxResPrn; 399 unsigned nObs = 0; 400 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 401 const t_pppSatObs* satObs = obsVector.at(ii); 402 if (satObs->prn().system() == 'E') { 403 if (tLC == t_lc::dummy) { 404 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 405 } 406 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 407 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 408 ++nObs; 409 offGE += ll; 410 if (fabs(ll) > fabs(maxRes)) { 411 maxRes = ll; 412 maxResIndex = ii; 413 maxResPrn = satObs->prn(); 414 } 415 } 416 } 417 } 418 419 if (nObs > 0) { 420 offGE = offGE / nObs; 421 } 422 else { 423 offGE = 0.0; 424 } 425 426 if (fabs(maxRes) > 1000.0) { 427 LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl; 428 delete obsVector.at(maxResIndex); 429 obsVector.erase(obsVector.begin() + maxResIndex); 430 } 431 else { 432 break; 433 } 434 } 435 } 436 return offGE; 383 437 } 384 438 385 439 // Compute A Priori GPS-BDS Offset 386 440 ////////////////////////////////////////////////////////////////////////////// 387 double t_pppClient::cmpOffG B(vector<t_pppSatObs*>& obsVector) {441 double t_pppClient::cmpOffGC(vector<t_pppSatObs*>& obsVector) { 388 442 389 443 t_lc::type tLC = t_lc::dummy; 390 double offG B= 0.0;444 double offGC = 0.0; 391 445 392 446 if (_opt->useSystem('C')) { 393 447 while (obsVector.size() > 0) { 394 offG B= 0.0;448 offGC = 0.0; 395 449 double maxRes = 0.0; 396 450 int maxResIndex = -1; … … 406 460 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 407 461 ++nObs; 408 offG B+= ll;462 offGC += ll; 409 463 if (fabs(ll) > fabs(maxRes)) { 410 464 maxRes = ll; … … 417 471 418 472 if (nObs > 0) { 419 offG B = offGB/ nObs;473 offGC = offGC / nObs; 420 474 } 421 475 else { 422 offG B= 0.0;476 offGC = 0.0; 423 477 } 424 478 425 479 if (fabs(maxRes) > 1000.0) { 426 LOG << "t_pppClient::cmpOffG Boutlier " << maxResPrn.toString() << " " << maxRes << endl;480 LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl; 427 481 delete obsVector.at(maxResIndex); 428 482 obsVector.erase(obsVector.begin() + maxResIndex); … … 433 487 } 434 488 } 435 return offG B;489 return offGC; 436 490 } 437 491 … … 570 624 } 571 625 572 _offGG = cmpOffGG(_obsRover); 573 _offGB = cmpOffGB(_obsRover); 626 _offGR = cmpOffGR(_obsRover); 627 _offGE = cmpOffGE(_obsRover); 628 _offGC = cmpOffGC(_obsRover); 574 629 575 630 if (_opt->_refSatRequired) {
Note:
See TracChangeset
for help on using the changeset viewer.