Index: trunk/BNC/src/PPP/ambres.cpp
===================================================================
--- trunk/BNC/src/PPP/ambres.cpp	(revision 11195)
+++ trunk/BNC/src/PPP/ambres.cpp	(revision 11196)
@@ -27,11 +27,18 @@
 //
 //////////////////////////////////////////////////////////////////////////////////////////
-bool AmbRes::isResolvable(const t_pppParam* amb) {
-  if ( amb->ambNumEpo() >= OPT->_ar._minNumEpo && amb->ambEleSat() >= OPT->_ar._minEle) {
-    return true;
-  }
-  else {
+bool AmbRes::isResolvable(const bncTime& epoTime, const t_pppParam* amb, std::ostream& msg) {
+
+  // Satellite not observed in the current epoch (parameter kept up to 60 s)
+  // -----------------------------------------------------------------------
+  if (amb->lastObsTime() != epoTime) {
+    msg << "  " << amb->prn().toString() << ' ' << amb->LC().toString()
+        << " not observed, not resolvable" << endl;
     return false;
   }
+
+  if ( amb->ambNumEpo() < OPT->_ar._minNumEpo || amb->ambEleSat() < OPT->_ar._minEle) {
+    return false;
+  }
+  return true;
 }
 
@@ -113,5 +120,5 @@
     for (const auto& par : params) {
       if (par->type() == t_pppParam::amb && par->prn().system() == system) {
-        if (isResolvable(par)) {
+        if (isResolvable(epoTime, par, msg)) {
           addToGroup(par);
         }
Index: trunk/BNC/src/PPP/ambres.h
===================================================================
--- trunk/BNC/src/PPP/ambres.h	(revision 11195)
+++ trunk/BNC/src/PPP/ambres.h	(revision 11196)
@@ -50,5 +50,5 @@
     };
 
-    static bool isResolvable(const t_pppParam* amb);
+    static bool isResolvable(const bncTime& epoTime, const t_pppParam* amb, std::ostream& msg);
     static bool isFixable(double xx, double sigma, bool* checked = 0);
 
Index: trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP/pppClient.cpp	(revision 11195)
+++ trunk/BNC/src/PPP/pppClient.cpp	(revision 11196)
@@ -406,4 +406,6 @@
   _output->_numSat = 0;
   _output->_hDop   = 0.0;
+  _output->_resRmsCode  = 0.0;
+  _output->_resRmsPhase = 0.0;
   _output->_error  = false;
 }
@@ -446,4 +448,6 @@
     _output->_numSat   = _filter->numSat();
     _output->_hDop     = _filter->HDOP();
+    _output->_resRmsCode  = _filter->resRmsCode();
+    _output->_resRmsPhase = _filter->resRmsPhase();
     _output->_error = false;
   }
Index: trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- trunk/BNC/src/PPP/pppFilter.cpp	(revision 11195)
+++ trunk/BNC/src/PPP/pppFilter.cpp	(revision 11196)
@@ -37,5 +37,9 @@
 ////////////////////////////////////////////////////////////////////////////
 t_pppFilter::t_pppFilter() {
-  _parlist = 0;
+  _parlist     = 0;
+  _numSat      = 0;
+  _fixRatio    = 0.0;
+  _resRmsCode  = 0.0;
+  _resRmsPhase = 0.0;
 }
 
@@ -50,5 +54,7 @@
 t_irc t_pppFilter::processEpoch(t_pppObsPool* obsPool) {
 
-  _numSat = 0;
+  _numSat      = 0;
+  _resRmsCode  = 0.0;
+  _resRmsPhase = 0.0;
   const double maxSolGap = 60.0;
   bool setNeuNoiseToZero = false;
@@ -112,4 +118,8 @@
   // ----------------------
   cmpDOP(allObs);
+
+  // Post-fit Residuals: RMS per epoch
+  // ---------------------------------
+  cmpResiduals(allObs);
 
   // Ambiguity Resolution
@@ -135,4 +145,39 @@
 
   return success;
+}
+
+// RMS of the post-fit residuals of the epoch (set in processSystem)
+////////////////////////////////////////////////////////////////////////////
+void t_pppFilter::cmpResiduals(const vector<t_pppSatObs*>& allObs) {
+
+  // RMS of code and phase residuals
+  // -------------------------------
+  double   sumCode  = 0.0;
+  double   sumPhase = 0.0;
+  unsigned numCode  = 0;
+  unsigned numPhase = 0;
+  for (const t_pppSatObs* obs : allObs) {
+    const vector<t_lc>& LCs = OPT->LCs(obs->prn().system());
+    for (const t_lc& LC : LCs) {
+      if (!obs->hasRes(LC)) {
+        continue;
+      }
+      double res = obs->getRes(LC);
+      if      (LC._type == t_lc::code  || LC._type == t_lc::codeIF) {
+        sumCode  += res * res;
+        numCode  += 1;
+      }
+      else if (LC._type == t_lc::phase || LC._type == t_lc::phaseIF) {
+        sumPhase += res * res;
+        numPhase += 1;
+      }
+    }
+  }
+  _resRmsCode  = (numCode  > 0) ? sqrt(sumCode  / numCode)  : 0.0;
+  _resRmsPhase = (numPhase > 0) ? sqrt(sumPhase / numPhase) : 0.0;
+
+  LOG << string(_epoTime) << " RMS code "
+      << setw(8) << setprecision(4) << _resRmsCode  << " (" << numCode  << ") phase "
+      << setw(8) << setprecision(4) << _resRmsPhase << " (" << numPhase << ")" << endl;
 }
 
Index: trunk/BNC/src/PPP/pppFilter.h
===================================================================
--- trunk/BNC/src/PPP/pppFilter.h	(revision 11195)
+++ trunk/BNC/src/PPP/pppFilter.h	(revision 11196)
@@ -31,4 +31,6 @@
   double GDOP() const {return _dop.G;}
   double fixRatio() const {return _fixRatio;}
+  double resRmsCode() const {return _resRmsCode;}
+  double resRmsPhase() const {return _resRmsPhase;}
   double trp() const {
     const std::vector<t_pppParam*>& par = _parlist->params();
@@ -74,4 +76,5 @@
   };
 
+  void  cmpResiduals(const std::vector<t_pppSatObs*>& allObs);
   t_irc processSystem(const std::vector<t_lc>& LCs,
                       const std::vector<t_pppSatObs*>& obsVector,
@@ -105,4 +108,6 @@
   bncTime         _lastEpoTimeOK;
   double          _fixRatio;
+  double          _resRmsCode;
+  double          _resRmsPhase;
 };
 
Index: trunk/BNC/src/PPP/pppSatObs.h
===================================================================
--- trunk/BNC/src/PPP/pppSatObs.h	(revision 11195)
+++ trunk/BNC/src/PPP/pppSatObs.h	(revision 11196)
@@ -48,4 +48,5 @@
     void                setRes(t_lc LC, double res);
     double              getRes(t_lc LC) const;
+    bool                hasRes(t_lc LC) const {return _res.find(LC) != _res.end();}
     bool                setPseudoObsIono(t_frequency::type freq, double stecRefSat);
     void                resetGIM() {_stecSat = 0.0;}
