Index: trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP/pppClient.cpp	(revision 5856)
+++ trunk/BNC/src/PPP/pppClient.cpp	(revision 5857)
@@ -280,23 +280,24 @@
 
   if (OPT->useGlonass()) {
-    while (true) {
+
+    while (obsVector.size() > 0) {
       offGG = 0.0;
-      bool outlierFound = false;
-      unsigned nObs  = 0;
+      double   maxRes      = 0.0;
+      int      maxResIndex = -1;
+      unsigned nObs        = 0;
       for (unsigned ii = 0; ii < obsVector.size(); ii++) {
         t_pppSatObs* satObs = obsVector.at(ii);
-        if ( !satObs->outlier() && satObs->isValid() && satObs->prn().system() == 'R' &&
+        if ( satObs->isValid() && satObs->prn().system() == 'R' &&
              (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
+          double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
           ++nObs;
-          double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
-          if (fabs(ll) > 1000.0) {
-            satObs->setOutlier();
-            outlierFound = true;
-           LOG << "t_pppClient::cmpOffGG outlier " << satObs->prn().toString()
-               << " " << ll << endl;
+          offGG += ll;
+          if (fabs(ll) > maxRes) {
+            maxRes      = fabs(ll);
+            maxResIndex = ii;
           }
-          offGG += ll;
         }
       }
+
       if (nObs > 0) {
         offGG = offGG / nObs;
@@ -305,5 +306,9 @@
         offGG = 0.0;
       }
-      if (!outlierFound) {
+
+      if (maxRes > 1000.0) {
+        obsVector.erase(obsVector.begin() + maxResIndex);
+      }
+      else {
         break;
       }
