Changeset 5857 in ntrip


Ignore:
Timestamp:
Aug 7, 2014, 1:58:21 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppClient.cpp

    r5831 r5857  
    280280
    281281  if (OPT->useGlonass()) {
    282     while (true) {
     282
     283    while (obsVector.size() > 0) {
    283284      offGG = 0.0;
    284       bool outlierFound = false;
    285       unsigned nObs  = 0;
     285      double   maxRes      = 0.0;
     286      int      maxResIndex = -1;
     287      unsigned nObs        = 0;
    286288      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    287289        t_pppSatObs* satObs = obsVector.at(ii);
    288         if ( !satObs->outlier() && satObs->isValid() && satObs->prn().system() == 'R' &&
     290        if ( satObs->isValid() && satObs->prn().system() == 'R' &&
    289291             (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
     292          double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    290293          ++nObs;
    291           double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    292           if (fabs(ll) > 1000.0) {
    293             satObs->setOutlier();
    294             outlierFound = true;
    295            LOG << "t_pppClient::cmpOffGG outlier " << satObs->prn().toString()
    296                << " " << ll << endl;
     294          offGG += ll;
     295          if (fabs(ll) > maxRes) {
     296            maxRes      = fabs(ll);
     297            maxResIndex = ii;
    297298          }
    298           offGG += ll;
    299299        }
    300300      }
     301
    301302      if (nObs > 0) {
    302303        offGG = offGG / nObs;
     
    305306        offGG = 0.0;
    306307      }
    307       if (!outlierFound) {
     308
     309      if (maxRes > 1000.0) {
     310        obsVector.erase(obsVector.begin() + maxResIndex);
     311      }
     312      else {
    308313        break;
    309314      }
Note: See TracChangeset for help on using the changeset viewer.