Index: /trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppClient.cpp	(revision 10255)
+++ /trunk/BNC/src/PPP/pppClient.cpp	(revision 10256)
@@ -66,5 +66,7 @@
     }
   }
-
+  _offGlo = 0.0;
+  _offGal = 0.0;
+  _offBds = 0.0;
   CLIENTS.setLocalData(this);  // CLIENTS takes ownership over "this"
 }
@@ -210,5 +212,5 @@
     }
   }
-  /*
+/*
   vector<t_pppSatObs*>::iterator it = obsVector.begin();
   while (it != obsVector.end()) {
@@ -250,30 +252,56 @@
                                   vector<t_pppSatObs*>& obsVector,
                                   ColumnVector& xyzc, bool print) {
-
   t_lc::type tLC = t_lc::dummy;
+  char sysBancroft = 'G';
+  int  numBancroft = obsVector.size();
+
+  _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0;
+  for (unsigned jj = 0; jj < obsVector.size(); jj++) {
+    const t_pppSatObs* satObs = obsVector[jj];
+    char sys = satObs->prn().system();
+    _usedSystems[sys]++;
+  }
+
+  if      ((numBancroft = _usedSystems.value('G'))) {
+    sysBancroft = 'G';
+  }
+  else if ((numBancroft = _usedSystems.value('E'))) {
+    sysBancroft = 'E';
+  }
+  else if ((numBancroft = _usedSystems.value('C'))) {
+    sysBancroft = 'C';
+  }
+  else if ((numBancroft = _usedSystems.value('R'))) {
+    sysBancroft = 'R';
+  }
+  else {
+    return failure;
+  }
 
   while (true) {
-    Matrix BB(obsVector.size(), 4);
+    Matrix BB(numBancroft, 4);
     int iObs = -1;
     for (unsigned ii = 0; ii < obsVector.size(); ii++) {
       const t_pppSatObs* satObs = obsVector.at(ii);
-      if (tLC == t_lc::dummy) {
-        if (satObs->isValid(t_lc::cIF)) {
-          tLC = t_lc::cIF;
+      if (satObs->prn().system() == sysBancroft) {
+        if (tLC == t_lc::dummy) {
+          if (satObs->isValid(t_lc::cIF)) {
+            tLC = t_lc::cIF;
+          }
+          else if (satObs->isValid(t_lc::c1)) {
+            tLC = t_lc::c1;
+          }
+          else if (satObs->isValid(t_lc::c2)) {
+            tLC = t_lc::c2;
+          }
         }
-        else if (satObs->isValid(t_lc::c1)) {
-          tLC = t_lc::c1;
+        if ( satObs->isValid(tLC) &&
+            (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
+          ++iObs;
+          BB[iObs][0] = satObs->xc()[0];
+          BB[iObs][1] = satObs->xc()[1];
+          BB[iObs][2] = satObs->xc()[2];
+          BB[iObs][3] = satObs->obsValue(tLC) - satObs->cmpValueForBanc(tLC);
         }
-        else if (satObs->isValid(t_lc::c2)) {
-          tLC = t_lc::c2;
-        }
-      }
-      if ( satObs->isValid(tLC) &&
-          (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
-        ++iObs;
-        BB[iObs][0] = satObs->xc()[0];
-        BB[iObs][1] = satObs->xc()[1];
-        BB[iObs][2] = satObs->xc()[2];
-        BB[iObs][3] = satObs->obsValue(tLC) - satObs->cmpValueForBanc(tLC);
       }
     }
@@ -291,10 +319,11 @@
     // Check Blunders
     // --------------
-    const double BLUNDER = 500.0;
+    const double BLUNDER = 200.0;
     double   maxRes      = 0.0;
     unsigned maxResIndex = 0;
     for (unsigned ii = 0; ii < obsVector.size(); ii++) {
       const t_pppSatObs* satObs = obsVector.at(ii);
-      if (satObs->isValid() &&
+      char sys = satObs->prn().system();
+      if (satObs->isValid() && sys == sysBancroft &&
           (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
         ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
@@ -313,5 +342,5 @@
         if (!_epoTimeRover.undef()) LOG << string(_epoTimeRover);
         LOG << "\n---------------------------------------------------------------\n";
-        LOG << string(epoTime) << " BANCROFT:"        << ' '
+        LOG << string(epoTime) << " BANCROFT " <<   sysBancroft << ": "
             << setw(14) << setprecision(3) << xyzc[0] << ' '
             << setw(14) << setprecision(3) << xyzc[1] << ' '
@@ -331,4 +360,164 @@
 
   return success;
+}
+
+// Compute A Priori Glonass Clock Offset
+//////////////////////////////////////////////////////////////////////////////
+double t_pppClient::cmpOffGlo(vector<t_pppSatObs*>& obsVector) {
+
+  t_lc::type tLC   = t_lc::dummy;
+  double offGlo = 0.0;
+
+  if (_opt->useSystem('R')) {
+    while (obsVector.size() > 0) {
+      offGlo = 0.0;
+      double   maxRes      = 0.0;
+      int      maxResIndex = -1;
+      t_prn    maxResPrn;
+      unsigned nObs = 0;
+      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
+        const t_pppSatObs* satObs = obsVector.at(ii);
+        if (satObs->prn().system() == 'R') {
+          if (tLC == t_lc::dummy) {
+            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
+          }
+          if (satObs->isValid(tLC) &&
+              (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
+            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
+            ++nObs;
+            offGlo += ll;
+            if (fabs(ll) > fabs(maxRes)) {
+              maxRes      = ll;
+              maxResIndex = ii;
+              maxResPrn   = satObs->prn();
+            }
+          }
+        }
+      }
+
+      if (nObs > 0) {
+        offGlo = offGlo / nObs;
+      }
+      else {
+        offGlo = 0.0;
+      }
+      if (fabs(maxRes) > OPT->_aprSigClkOff) {
+        LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;
+        delete obsVector.at(maxResIndex);
+        obsVector.erase(obsVector.begin() + maxResIndex);
+      }
+      else {
+        break;
+      }
+    }
+  }
+  return offGlo;
+}
+
+// Compute A Priori Galileo Clock Offset
+//////////////////////////////////////////////////////////////////////////////
+double t_pppClient::cmpOffGal(vector<t_pppSatObs*>& obsVector) {
+
+  t_lc::type tLC   = t_lc::dummy;
+  double     offGal = 0.0;
+
+  if (_opt->useSystem('E')) {
+    while (obsVector.size() > 0) {
+      offGal = 0.0;
+      double   maxRes      = 0.0;
+      int      maxResIndex = -1;
+      t_prn    maxResPrn;
+      unsigned nObs        = 0;
+      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
+        const t_pppSatObs* satObs = obsVector.at(ii);
+        if (satObs->prn().system() == 'E') {
+          if (tLC == t_lc::dummy) {
+            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
+          }
+          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
+            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
+            ++nObs;
+            offGal += ll;
+            if (fabs(ll) > fabs(maxRes)) {
+              maxRes      = ll;
+              maxResIndex = ii;
+              maxResPrn   = satObs->prn();
+            }
+          }
+        }
+      }
+
+      if (nObs > 0) {
+        offGal = offGal / nObs;
+      }
+      else {
+        offGal = 0.0;
+      }
+
+      if (fabs(maxRes) > OPT->_aprSigClkOff) {
+        LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;
+        delete obsVector.at(maxResIndex);
+        obsVector.erase(obsVector.begin() + maxResIndex);
+      }
+      else {
+        break;
+      }
+    }
+  }
+  return offGal;
+}
+
+// Compute A Priori BDS Clock Offset
+//////////////////////////////////////////////////////////////////////////////
+double t_pppClient::cmpOffBds(vector<t_pppSatObs*>& obsVector) {
+
+  t_lc::type tLC   = t_lc::dummy;
+  double offBds = 0.0;
+
+  if (_opt->useSystem('C')) {
+    while (obsVector.size() > 0) {
+      offBds = 0.0;
+      double   maxRes      = 0.0;
+      int      maxResIndex = -1;
+      t_prn    maxResPrn;
+      unsigned nObs        = 0;
+      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
+        const t_pppSatObs* satObs = obsVector.at(ii);
+        if (satObs->prn().system() == 'C') {
+          if (tLC == t_lc::dummy) {
+            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
+          }
+          if (satObs->isValid(tLC) &&
+              (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
+            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
+            ++nObs;
+            offBds += ll;
+            if (fabs(ll) > fabs(maxRes)) {
+              maxRes      = ll;
+              maxResIndex = ii;
+              maxResPrn   = satObs->prn();
+            }
+          }
+        }
+      }
+
+      if (nObs > 0) {
+        offBds = offBds / nObs;
+      }
+      else {
+        offBds = 0.0;
+      }
+
+      if (fabs(maxRes) > OPT->_aprSigClkOff) {
+        LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;
+        delete obsVector.at(maxResIndex);
+        obsVector.erase(obsVector.begin() + maxResIndex);
+      }
+      else {
+        break;
+      }
+    }
+  }
+  return offBds;
 }
 
@@ -472,4 +661,8 @@
       return finish(failure, 4);
     }
+
+    _offGlo = cmpOffGlo(_obsRover);
+    _offGal = cmpOffGal(_obsRover);
+    _offBds = cmpOffBds(_obsRover);
 
     // Prepare Pseudo Observations of the Rover
@@ -596,5 +789,5 @@
 //
 //////////////////////////////////////////////////////////////////////////////
-void t_pppClient::reset() {cout << "t_pppClient::reset()" << endl;
+void t_pppClient::reset() {
 
   // to delete old orbit and clock corrections
Index: /trunk/BNC/src/PPP/pppClient.h
===================================================================
--- /trunk/BNC/src/PPP/pppClient.h	(revision 10255)
+++ /trunk/BNC/src/PPP/pppClient.h	(revision 10256)
@@ -36,8 +36,10 @@
   const bncAntex*     antex() const {return _antex;}
   const t_pppStation* staRover() const {return _staRover;}
+  double              offGlo() const {return _offGlo;}
+  double              offGal() const {return _offGal;}
+  double              offBds() const {return _offBds;}
 
   std::ostringstream& log() {return *_log;}
   const t_pppOptions* opt() const {return _opt;}
-
   static t_irc bancroft(const Matrix& BBpass, ColumnVector& pos);
 
@@ -58,4 +60,8 @@
   t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
                     ColumnVector& xyzc, bool print);
+  double cmpOffGlo(std::vector<t_pppSatObs*>& obsVector);
+  double cmpOffGal(std::vector<t_pppSatObs*>& obsVector);
+  double cmpOffBds(std::vector<t_pppSatObs*>& obsVector);
+
 
   t_output*                 _output;
@@ -66,4 +72,7 @@
   bncAntex*                 _antex;
   t_pppFilter*              _filter;
+  double                    _offGlo;
+  double                    _offGal;
+  double                    _offBds;
   std::vector<t_pppSatObs*> _obsRover;
   std::ostringstream*       _log;
@@ -71,4 +80,5 @@
   t_tides*                  _tides;
   bool                      _pseudoObsIono;
+  QMap<char, int>           _usedSystems;
 };
 
Index: /trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.cpp	(revision 10255)
+++ /trunk/BNC/src/PPP/pppFilter.cpp	(revision 10256)
@@ -86,7 +86,7 @@
   // Status Vector, Variance-Covariance Matrix
   // -----------------------------------------
-  _xFltOld = _xFlt;
-  _QFltOld = _QFlt;
-  setStateVectorAndVarCovMatrix(setNeuNoiseToZero);
+  ColumnVector    xFltOld = _xFlt;
+  SymmetricMatrix QFltOld = _QFlt;
+  setStateVectorAndVarCovMatrix(xFltOld, QFltOld, setNeuNoiseToZero);
 
   // Process Satellite Systems separately
@@ -167,4 +167,5 @@
     for (unsigned ii = 0; ii < obsVector.size(); ii++) {
       t_pppSatObs *obs = obsVector[ii];
+      char sys = obs->prn().system();
       if (iOutlier == 0) {
         obs->resetOutlier();
@@ -184,5 +185,17 @@
             AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
           }
-          ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
+          double offGlo = 0;
+          if (sys == 'R' && tLC != t_lc::MW) {
+            offGlo = PPP_CLIENT->offGlo();
+          }
+          double offGal = 0;
+          if (sys == 'E' && tLC != t_lc::MW) {
+            offGal = PPP_CLIENT->offGal();
+          }
+          double offBds = 0;
+          if (sys == 'C' && tLC != t_lc::MW) {
+            offBds = PPP_CLIENT->offBds();
+          }
+          ll[iObs] = obs->obsValue(tLC) - offGlo - offGal - offBds  - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
           PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
         }
@@ -192,5 +205,5 @@
     // Check number of observations
     // ----------------------------
-    if (!nSat) {
+    if (nSat < 2) {
       return failure;
     }
@@ -201,4 +214,5 @@
       for (unsigned ii = 0; ii < obsVector.size(); ii++) {
         t_pppSatObs *obs = obsVector[ii];
+        char sys = obs->prn().system();
         if (!obs->outlier()) {
           for (unsigned jj = 0; jj < usedLCs; jj++) {
@@ -215,5 +229,17 @@
               AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
             }
-            ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
+            double offGlo = 0;
+            if (sys == 'R' && tLC != t_lc::MW) {
+              offGlo = PPP_CLIENT->offGlo();
+            }
+            double offGal = 0;
+            if (sys == 'E' && tLC != t_lc::MW) {
+              offGal = PPP_CLIENT->offGal();
+            }
+            double offBds = 0;
+            if (sys == 'C' && tLC != t_lc::MW) {
+              offBds = PPP_CLIENT->offBds();
+            }
+            ll[iObs] = obs->obsValue(tLC) - offGlo - offGal - offBds  - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
             PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
           }
@@ -269,5 +295,4 @@
 //        if (par->ambResetCandidate()) {
           resetAmb(obs->prn(), obsVector, maxOutlierLC, &QSav, &xSav);
-          adjustNoise(t_pppParam::ion, obs->prn(), 0.1, &QSav);
 //        }
 //        else {
@@ -307,5 +332,5 @@
                                     const vector<t_pppSatObs*> &obsVector) {
 
-  const double SLIP = 1000.0;
+  const double SLIP = 20.0;
   string epoTimeStr = string(_epoTime);
   const vector<t_pppParam*> &params = _parlist->params();
@@ -316,4 +341,5 @@
       for (unsigned iObs = 0; iObs < obsVector.size(); iObs++) {
         const t_pppSatObs *obs = obsVector[iObs];
+        char sys = obs->prn().system();
 
         // Check set Slips and Jump Counters
@@ -344,9 +370,9 @@
         if (slip) {
           resetAmb(obs->prn(), obsVector, tLC);
-          adjustNoise(t_pppParam::ion, obs->prn(), 0.1);
-        }
-
-        // Check Pre-Fit Residuals
-        // -----------------------
+        }
+
+        // Check Pre-Fit Residuals => switched off, because after a millisecond receiver clock jump, a cycle slip is detected for all satellites
+        /* -----------------------
+
         else {
           ColumnVector AA(params.size());
@@ -355,6 +381,17 @@
             AA[iPar] = par->partial(_epoTime, obs, tLC);
           }
-
-          double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA);
+          double offGlo = 0;
+          if (sys == 'R' && tLC != t_lc::MW) {
+            offGlo = PPP_CLIENT->offGlo();
+          }
+          double offGal = 0;
+          if (sys == 'E' && tLC != t_lc::MW) {
+            offGal = PPP_CLIENT->offGal();
+          }
+          double offBds = 0;
+          if (sys == 'C' && tLC != t_lc::MW) {
+            offBds = PPP_CLIENT->offBds();
+          }
+          double ll = obs->obsValue(tLC) - offGlo - offGal - offBds  - obs->cmpValue(tLC) - DotProduct(_x0, AA);
           double vv = DotProduct(AA, _xFlt) - ll;
 
@@ -363,7 +400,6 @@
                 << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
             resetAmb(obs->prn(), obsVector, tLC);
-            adjustNoise(t_pppParam::ion, obs->prn(), 0.1);
-          }
-        }
+          }
+        }*/
       }
     }
@@ -413,31 +449,8 @@
       }
       _x0[ind] = par->x0();
-      return success;
-    }
-  }
-
-  return irc;
-}
-
-// Adjust process noise of individual parameters
-////////////////////////////////////////////////////////////////////////////
-t_irc t_pppFilter::adjustNoise(t_pppParam::e_type parType, t_prn prn, double noise,
-                               SymmetricMatrix *QSav) {
-
-  t_irc irc = failure;
-  vector<t_pppParam*>& params = _parlist->params();
-  for (unsigned iPar = 0; iPar < params.size(); iPar++) {
-    t_pppParam *par = params[iPar];
-    if (par->type() == parType && par->prn() == prn) {
-      int iOld = par->indexOld();
-      int iNew = par->indexNew();
-      LOG << string(_epoTime) << " ADJUSTNOISE " << prn.toString() << endl;
-      _QFlt[iNew][iNew] = _QFltOld[iOld][iOld] + noise * noise;
-      if (QSav) {
-        (*QSav)(iNew + 1, iNew + 1) = _QFlt(iNew + 1, iNew + 1);
-      }
-      return success;
-    }
-  }
+      irc = success;
+    }
+  }
+
   return irc;
 }
@@ -482,5 +495,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppFilter::predictCovCrdPart(bool setNeuNoiseToZero) {
+void t_pppFilter::predictCovCrdPart(const SymmetricMatrix &QFltOld, bool setNeuNoiseToZero) {
 
   const vector<t_pppParam*>& params = _parlist->params();
@@ -513,8 +526,8 @@
     double dt = _epoTime - _firstEpoTime;
     if (dt < OPT->_seedingTime || setNeuNoiseToZero) {
-      _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3);
+      _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3);
     }
     else {
-      _QFlt.SymSubMatrix(1, 3) = _QFltOld.SymSubMatrix(1, 3) + Qxyz;
+      _QFlt.SymSubMatrix(1, 3) = QFltOld.SymSubMatrix(1, 3) + Qxyz;
     }
   }
@@ -523,5 +536,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppFilter::setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero) {
+void t_pppFilter::setStateVectorAndVarCovMatrix(const ColumnVector &xFltOld,
+                                                const SymmetricMatrix &QFltOld,
+                                                bool setNeuNoiseToZero) {
 
   const vector<t_pppParam*>& params = _parlist->params();
@@ -534,5 +549,5 @@
   for (unsigned ii = 0; ii < nPar; ii++) {
     t_pppParam *par1 = params[ii];
-    if (_QFltOld.size() == 0) {
+    if (QFltOld.size() == 0) {
       par1->resetIndex();
     }
@@ -542,16 +557,16 @@
       _QFlt[ii][ii] = par1->sigma0() * par1->sigma0(); // new parameter
     } else {
-      _QFlt[ii][ii] = _QFltOld[iOld][iOld] + par1->noise() * par1->noise();
-      _xFlt[ii]     = _xFltOld[iOld];
+      _QFlt[ii][ii] = QFltOld[iOld][iOld] + par1->noise() * par1->noise();
+      _xFlt[ii]     = xFltOld[iOld];
       for (unsigned jj = 0; jj < ii; jj++) {
         t_pppParam *par2 = params[jj];
         int jOld = par2->indexOld();
         if (jOld >= 0) {
-          _QFlt[ii][jj] = _QFltOld(iOld + 1, jOld + 1);
-        }
-      }
-    }
-  }
-  predictCovCrdPart(setNeuNoiseToZero);
-}
-
+          _QFlt[ii][jj] = QFltOld(iOld + 1, jOld + 1);
+        }
+      }
+    }
+  }
+  predictCovCrdPart(QFltOld, setNeuNoiseToZero);
+}
+
Index: /trunk/BNC/src/PPP/pppFilter.h
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.h	(revision 10255)
+++ /trunk/BNC/src/PPP/pppFilter.h	(revision 10256)
@@ -83,19 +83,16 @@
                  SymmetricMatrix* QSav = 0, ColumnVector* xSav = 0);
 
-  t_irc adjustNoise(t_pppParam::e_type parType, t_prn prn, double noise,
-                         SymmetricMatrix* QSav = 0);
-
   void cmpDOP(const std::vector<t_pppSatObs*>& obsVector);
 
-  void setStateVectorAndVarCovMatrix(bool setNeuNoiseToZero);
+  void setStateVectorAndVarCovMatrix(const ColumnVector& xFltOld, const SymmetricMatrix& QFltOld,
+                                     bool setNeuNoiseToZero);
 
-  void predictCovCrdPart(bool setNeuNoiseToZero);
+  void predictCovCrdPart(const SymmetricMatrix& QFltOld, bool setNeuNoiseToZero);
+
 
   bncTime         _epoTime;
   t_pppParlist*   _parlist;
   SymmetricMatrix _QFlt;
-  SymmetricMatrix _QFltOld;
   ColumnVector    _xFlt;
-  ColumnVector    _xFltOld;
   ColumnVector    _x0;
   t_slip          _slips[t_prn::MAXPRN+1];
Index: /trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.cpp	(revision 10255)
+++ /trunk/BNC/src/PPP/pppParlist.cpp	(revision 10256)
@@ -62,17 +62,5 @@
      _noise   = OPT->_noiseCrd[2];
      break;
-   case rClkG:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case rClkR:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case rClkE:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case rClkC:
+   case rClk:
      _epoSpec = true;
      _sigma0  = OPT->_aprSigClk;
@@ -86,9 +74,36 @@
          const t_pppSatObs* obs = obsVector->at(ii);
          if (obs->prn() == _prn) {
-           _x0 = floor((obs->obsValue(tLC) - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
+           double offGlo = 0;
+           if (_prn.system() == 'R' && tLC != t_lc::MW) {
+             offGlo = PPP_CLIENT->offGlo();
+           }
+           double offGal = 0;
+           if (_prn.system() == 'E' && tLC != t_lc::MW) {
+             offGal = PPP_CLIENT->offGal();
+           }
+           double offBds = 0;
+           if (_prn.system() == 'C' && tLC != t_lc::MW) {
+             offBds = PPP_CLIENT->offBds();
+           }
+           _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
            break;
          }
        }
      }
+     break;
+   case offGlo:
+     _epoSpec = true;
+     _sigma0  = OPT->_aprSigClk;
+     _x0      = PPP_CLIENT->offGlo();
+     break;
+   case offGal:
+     _epoSpec = true;
+     _sigma0  = OPT->_aprSigClk;
+     _x0      = PPP_CLIENT->offGal();
+     break;
+   case offBds:
+     _epoSpec = true;
+     _sigma0  = OPT->_aprSigClk;
+     _x0      = PPP_CLIENT->offBds();
      break;
    case trp:
@@ -153,14 +168,14 @@
     if (tLC == t_lc::GIM) {return 0.0;}
     return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius();
-  case rClkG:
+  case rClk:
     if (tLC == t_lc::GIM) {return 0.0;}
-    return (obs->prn().system() == 'G') ? 1.0 : 0.0;
-  case rClkR:
+    return 1.0;
+  case offGlo:
     if (tLC == t_lc::GIM) {return 0.0;}
     return (obs->prn().system() == 'R') ? 1.0 : 0.0;
-  case rClkE:
+  case offGal:
     if (tLC == t_lc::GIM) {return 0.0;}
     return (obs->prn().system() == 'E') ? 1.0 : 0.0;
-  case rClkC:
+  case offBds:
     if (tLC == t_lc::GIM) {return 0.0;}
     return (obs->prn().system() == 'C') ? 1.0 : 0.0;
@@ -281,15 +296,15 @@
     ss << "CRD_Z";
     break;
-  case rClkG:
-    ss << "REC_CLK  G  ";
-    break;
-  case rClkR:
-    ss << "REC_CLK  R  ";
-    break;
-  case rClkE:
-    ss << "REC_CLK  E  ";
-    break;
-  case rClkC:
-    ss << "REC_CLK  C  ";
+  case rClk:
+    ss << "REC_CLK     ";
+    break;
+  case offGlo:
+    ss << "OFF_GLO     ";
+    break;
+  case offGal:
+    ss << "OFF_GAL     ";
+    break;
+  case offBds:
+    ss << "OFF_BDS     ";
     break;
   case trp:
@@ -478,19 +493,23 @@
   // Receiver Clocks
   // ---------------
-   if (_usedSystems.contains('G')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkG, t_prn(), t_lc::dummy));
-   }
-
-   if (_usedSystems.contains('R')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkR, t_prn(), t_lc::dummy));
-   }
-
-   if (_usedSystems.contains('E')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkE, t_prn(), t_lc::dummy));
-   }
-
-   if (_usedSystems.contains('C')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkC, t_prn(), t_lc::dummy));
-   }
+  required.push_back(new t_pppParam(t_pppParam::rClk, t_prn(), t_lc::dummy));
+
+  // GLONASS Clock Offset
+  // --------------------
+  if (OPT->useSystem('R')) {
+    required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
+  }
+
+  // Galileo Clock Offset
+  // --------------------
+  if (OPT->useSystem('E')) {
+    required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
+  }
+
+  // BDS Clock Offset
+  // ----------------
+  if (OPT->useSystem('C')) {
+    required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
+  }
 
   // Troposphere
Index: /trunk/BNC/src/PPP/pppParlist.h
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.h	(revision 10255)
+++ /trunk/BNC/src/PPP/pppParlist.h	(revision 10256)
@@ -14,5 +14,5 @@
 class t_pppParam {
  public:
-  enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,
+  enum e_type {crdX, crdY, crdZ, rClk, offGlo, offGal, offBds, trp, ion, amb,
                cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
                cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
@@ -35,5 +35,4 @@
   void resetIndex() {
     _indexOld = -1;
-    _indexNew = -1;
   }
   int indexOld() const {return _indexOld;}
Index: /trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10255)
+++ /trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10256)
@@ -663,14 +663,26 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppSatObs::printObsMinusComputed() const {
-// TODO: cout should be LOG
   LOG.setf(ios::fixed);
   LOG << "\nOBS-COMP for Satellite " << _prn.toString() << (isReference() ? " (Reference Satellite)" : "") << endl
        << "========================== " << endl;
-  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
-    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
+  char sys = _prn.system();
+  for (unsigned ii = 0; ii < OPT->LCs(sys).size(); ii++) {
+    t_lc::type tLC = OPT->LCs(sys)[ii];
+    double offGlo = 0;
+    if (sys == 'R' && tLC != t_lc::MW) {
+      offGlo = PPP_CLIENT->offGlo();
+    }
+    double offGal = 0;
+    if (sys == 'E' && tLC != t_lc::MW) {
+      offGal = PPP_CLIENT->offGal();
+    }
+    double offBds = 0;
+    if (sys == 'C' && tLC != t_lc::MW) {
+      offBds = PPP_CLIENT->offBds();
+    }
     LOG << "OBS-CMP " << setw(4) << t_lc::toString(tLC) << ": " << _prn.toString() << " "
         << setw(12) << setprecision(3) << obsValue(tLC) << " "
         << setw(12) << setprecision(3) << cmpValue(tLC) << " "
-        << setw(12) << setprecision(3) << obsValue(tLC) - cmpValue(tLC) << endl;
+        << setw(12) << setprecision(3) << obsValue(tLC) - offGlo - offGal - offBds  - cmpValue(tLC) << endl;
   }
 }
Index: /trunk/BNC/src/pppMain.cpp
===================================================================
--- /trunk/BNC/src/pppMain.cpp	(revision 10255)
+++ /trunk/BNC/src/pppMain.cpp	(revision 10256)
@@ -187,5 +187,5 @@
     opt->_sigmaC1      = settings.value("PPP/sigmaC1").toDouble(); if (opt->_sigmaC1 <= 0.0)  opt->_sigmaC1  = 1.00;
     opt->_sigmaL1      = settings.value("PPP/sigmaL1").toDouble(); if (opt->_sigmaL1 <= 0.0)  opt->_sigmaL1  = 0.01;
-    opt->_sigmaGIM     = settings.value("PPP/sigmaGIM").toDouble();if (opt->_sigmaGIM <= 0.0) opt->_sigmaGIM = 1.00;
+    opt->_sigmaGIM     = settings.value("PPP/sigmaGIM").toDouble();if (opt->_sigmaGIM <= 0.0) opt->_sigmaGIM = 5.00;
     opt->_corrWaitTime = settings.value("PPP/corrWaitTime").toDouble();
     if (!_realTime || opt->_corrMount.empty()) {
@@ -519,5 +519,5 @@
     opt->_maxResC1    = settings.value("PPP/maxResC1").toDouble();  if (opt->_maxResC1 <= 0.0)  opt->_maxResC1  = 2.0;
     opt->_maxResL1    = settings.value("PPP/maxResL1").toDouble();  if (opt->_maxResL1 <= 0.0)  opt->_maxResL1  = 0.02;
-    opt->_maxResGIM   = settings.value("PPP/maxResGIM").toDouble(); if (opt->_maxResGIM <= 0.0) opt->_maxResGIM = 2.0;
+    opt->_maxResGIM   = settings.value("PPP/maxResGIM").toDouble(); if (opt->_maxResGIM <= 0.0) opt->_maxResGIM = 5.0;
     opt->_eleWgtCode  = (settings.value("PPP/eleWgtCode").toInt() != 0);
     opt->_eleWgtPhase = (settings.value("PPP/eleWgtPhase").toInt() != 0);
@@ -526,8 +526,9 @@
     // Some default values
     // -------------------
-    opt->_aprSigAmb       = 1000.0;
-    opt->_aprSigClk       = 1000.0;
-    opt->_aprSigIon       = 1000.0;
-    opt->_noiseIon        = 100.0;
+    opt->_aprSigAmb       = 300000.0;
+    opt->_aprSigClk       = 300000.0;
+    opt->_aprSigClkOff    = 300000.0;
+    opt->_aprSigIon       = 10000.0;
+    opt->_noiseIon        = 10000.0;
     opt->_aprSigCodeBias  = 100.0;
     opt->_noiseCodeBias   = 100.0;
Index: /trunk/BNC/src/pppOptions.h
===================================================================
--- /trunk/BNC/src/pppOptions.h	(revision 10255)
+++ /trunk/BNC/src/pppOptions.h	(revision 10256)
@@ -58,4 +58,5 @@
   ColumnVector            _aprSigCrd;
   double                  _aprSigClk;
+  double                  _aprSigClkOff;
   double                  _aprSigTrp;
   double                  _aprSigIon;
