Changeset 10388 in ntrip for trunk/BNC/src/PPP/pppClient.cpp
- Timestamp:
- Mar 12, 2024, 3:10:17 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r10384 r10388 67 67 } 68 68 } 69 _offGps = 0.0; 69 70 _offGlo = 0.0; 70 71 _offGal = 0.0; … … 301 302 const t_pppSatObs* satObs = obsVector.at(ii); 302 303 char sys = satObs->prn().system(); 303 if (satObs->isValid() && 304 if (satObs->isValid() && 304 305 (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) { 305 306 ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3); … … 337 338 return success; 338 339 } 340 341 // Compute A Priori Gps Clock Offset 342 ////////////////////////////////////////////////////////////////////////////// 343 double t_pppClient::cmpOffGps(vector<t_pppSatObs*>& obsVector) { 344 345 t_lc::type tLC = t_lc::dummy; 346 double offGps = 0.0; 347 348 if (_opt->useSystem('G')) { 349 while (obsVector.size() > 0) { 350 offGps = 0.0; 351 double maxRes = 0.0; 352 int maxResIndex = -1; 353 unsigned nObs = 0; 354 t_prn maxResPrn; 355 for (unsigned ii = 0; ii < obsVector.size(); ii++) { 356 const t_pppSatObs* satObs = obsVector.at(ii); 357 if (satObs->prn().system() == 'G') { 358 if (tLC == t_lc::dummy) { 359 tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1; 360 } 361 if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) { 362 double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC); 363 ++nObs; 364 offGps += ll; 365 if (fabs(ll) > fabs(maxRes)) { 366 maxRes = ll; 367 maxResIndex = ii; 368 maxResPrn = satObs->prn(); 369 } 370 } 371 } 372 } 373 374 if (nObs > 0) { 375 offGps = offGps / nObs; 376 } 377 else { 378 offGps = 0.0; 379 } 380 381 if (fabs(maxRes) > 100.0) { 382 LOG << "t_pppClient::cmpOffGps outlier " << maxResPrn.toString() << " " << maxRes << endl; 383 delete obsVector.at(maxResIndex); 384 obsVector.erase(obsVector.begin() + maxResIndex); 385 } 386 else { 387 break; 388 } 389 } 390 } 391 return offGps; 392 } 393 339 394 340 395 // Compute A Priori Glonass Clock Offset … … 443 498 return offGal; 444 499 } 445 446 500 // Compute A Priori BDS Clock Offset 447 501 ////////////////////////////////////////////////////////////////////////////// … … 638 692 } 639 693 694 _offGps = cmpOffGps(_obsRover); 640 695 _offGlo = cmpOffGlo(_obsRover); 641 696 _offGal = cmpOffGal(_obsRover);
Note:
See TracChangeset
for help on using the changeset viewer.