Index: trunk/BNC/CHANGELOG.md
===================================================================
--- trunk/BNC/CHANGELOG.md	(revision 11195)
+++ trunk/BNC/CHANGELOG.md	(revision 11196)
@@ -1,4 +1,6 @@
 # Changelog
 ## 2.13.8 (2026-11-04)
+- ADDED: **PPP post-fit residual RMS**: RMS of the code and of the phase post-fit residuals per epoch (observations used in the final filter update, outliers removed), written to the PPP logfile ('RMS code ... (n) phase ... (n)' after the residuals) and as fields 'res_rms_code' and 'res_rms_phase' of the structured 'ppp_position' record
+- FIXED: PPP ambiguity resolution: ambiguities of satellites not observed in the current epoch are left out of the search (listed as 'not observed' in the PPP logfile); before, an ambiguity parameter kept up to 60 s after the last observation (e.g. satellite set below the minimum elevation) was still searched and fixed with its last float value
 - FIXED: New RTCM-SSR upload with VTEC: the message number of the VTEC message was not initialised (the new RTCM-SSR has no VTEC message); no VTEC is encoded in this format now
 - FIXED: New RTCM-SSR Extended Phase Bias: the wide-lane indicators are only taken over if SSR IOD, provider ID and solution ID match the preceding Phase Bias message too (before only epoch and property ID)
Index: trunk/BNC/Example_Configs/29_PPPAR_CNES.bnc
===================================================================
--- trunk/BNC/Example_Configs/29_PPPAR_CNES.bnc	(revision 11195)
+++ trunk/BNC/Example_Configs/29_PPPAR_CNES.bnc	(revision 11196)
@@ -50,5 +50,5 @@
 proxyHost=
 proxyPort=
-rawOutFile=Output/raw.rtcm
+rawOutFile=
 reqcAction=
 reqcComment=
@@ -155,4 +155,5 @@
 arGalileo=2
 arMaxFrac=0.01
+arMaxRes=
 arMaxSig=0.001
 arMinEle=10
Index: trunk/BNC/Example_Configs/30_PPPAR_WHU.bnc
===================================================================
--- trunk/BNC/Example_Configs/30_PPPAR_WHU.bnc	(revision 11195)
+++ trunk/BNC/Example_Configs/30_PPPAR_WHU.bnc	(revision 11196)
@@ -51,5 +51,5 @@
 proxyHost=
 proxyPort=
-rawOutFile=Output/raw.rtcm
+rawOutFile=
 reqcAction=
 reqcComment=
@@ -122,5 +122,5 @@
 ssrQcStreams=ALL
 ssrRefSignals=
-startTab=12
+startTab=1
 statusTab=3
 trafo_dx=
@@ -156,4 +156,5 @@
 arGalileo=2
 arMaxFrac=0.01
+arMaxRes=
 arMaxSig=0.001
 arMinEle=10
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;}
Index: trunk/BNC/src/bnchelp.html
===================================================================
--- trunk/BNC/src/bnchelp.html	(revision 11195)
+++ trunk/BNC/src/bnchelp.html	(revision 11196)
@@ -2829,5 +2829,6 @@
   <ul>
     <li>'ppp_position': 'x', 'y', 'z', 'dn', 'de', 'du', 'trp0', 'trp', 'trp_stdev', 'num_sat',
-        'hdop', 'fixed' (true/false), 'fix_percent'; 'ppp_epoch_failed' (warning) if no solution was computed,</li>
+        'hdop', 'fixed' (true/false), 'fix_percent', 'res_rms_code' and 'res_rms_phase' (RMS of the post-fit code and
+        phase residuals of the epoch, 0 if there is none of that kind); 'ppp_epoch_failed' (warning) if no solution was computed,</li>
     <li>'stream_format': 'decoder' (RTCM2, RTCM3, ZERO, ZERO2FILE, RTNET) and 'format' (format entry of the stream),</li>
     <li>'stream_timeout' (warning): data timeout, BNC reconnects,</li>
@@ -2856,5 +2857,5 @@
   <pre><p style="font-family:Monospace">
 {"time":"2025-11-17T13:48:51.000Z","level":"info","component":"stream","event":"stream_format","mp":"BCEP00BKG0","decoder":"RTCM3","format":"RTCM_3.3","msg":"Get data in RTCM 3.x format","v":1}
-{"time":"2025-11-17T13:49:40.000Z","epoch":"2025-11-17T13:49:10.000","level":"info","component":"ppp","event":"ppp_position","mp":"WTZR00DEU0","x":4075580.2172,"y":931854.1555,"z":4801568.3403,"dn":0.0000,"de":0.0000,"du":0.0001,"trp0":2.1833,"trp":0.0019,"trp_stdev":0.0993,"num_sat":17,"hdop":0.59,"fixed":false,"fix_percent":0,"msg":"PPP position","v":1}
+{"time":"2025-11-17T13:49:40.000Z","epoch":"2025-11-17T13:49:10.000","level":"info","component":"ppp","event":"ppp_position","mp":"WTZR00DEU0","x":4075580.2172,"y":931854.1555,"z":4801568.3403,"dn":0.0000,"de":0.0000,"du":0.0001,"trp0":2.1833,"trp":0.0019,"trp_stdev":0.0993,"num_sat":17,"hdop":0.59,"fixed":false,"fix_percent":0,"res_rms_code":0.4071,"res_rms_phase":0.0042,"msg":"PPP position","v":1}
 </pre>
   </p>
@@ -2864,5 +2865,5 @@
   <pre><p style="font-family:Monospace">
 time=2025-11-17T13:48:51.000Z level=info component=stream event=stream_format mp=BCEP00BKG0 decoder=RTCM3 format=RTCM_3.3 msg="Get data in RTCM 3.x format" v=1
-time=2025-11-17T13:49:40.000Z epoch=2025-11-17T13:49:10.000 level=info component=ppp event=ppp_position mp=WTZR00DEU0 x=4075580.2172 y=931854.1555 z=4801568.3403 dn=0.0000 de=0.0000 du=0.0001 trp0=2.1833 trp=0.0019 trp_stdev=0.0993 num_sat=17 hdop=0.59 fixed=false fix_percent=0 msg="PPP position" v=1
+time=2025-11-17T13:49:40.000Z epoch=2025-11-17T13:49:10.000 level=info component=ppp event=ppp_position mp=WTZR00DEU0 x=4075580.2172 y=931854.1555 z=4801568.3403 dn=0.0000 de=0.0000 du=0.0001 trp0=2.1833 trp=0.0019 trp_stdev=0.0993 num_sat=17 hdop=0.59 fixed=false fix_percent=0 res_rms_code=0.4071 res_rms_phase=0.0042 msg="PPP position" v=1
 </pre>
   </p>
@@ -7038,4 +7039,5 @@
 2026-07-28_15:12:14.000 RES lC6 C36   0.0020
 2026-07-28_15:12:14.000 RES lC6 C37  -0.0009
+2026-07-28_15:12:14.000 RMS code   0.1615 (68) phase   0.0034 (68)
 2026-07-28_15:12:14.000 Ambiguity Resolution (BIE)
   Group lC2
@@ -8002,5 +8004,6 @@
     <li>Ambiguities are grouped per system/LC into zero-difference sets if minimum number of tracked epochs (see <a
         href="#ppparmin">Min # Epo</a>) and the minimum elevation (see <a href=#pppmineleva>Minimum Elevation</a>) is
-      exceeded.</li>
+      exceeded, the satellite is observed in the current epoch (an ambiguity parameter is kept for 60 s after the last
+      observation).</li>
     <li>One reference ambiguity per group is hard-constrained to its rounded value with a tiny σ (sigCon = 1e-4 cycles,
       turning the rest into single-differences (SD).</li>
Index: trunk/BNC/src/pppInclude.h
===================================================================
--- trunk/BNC/src/pppInclude.h	(revision 11195)
+++ trunk/BNC/src/pppInclude.h	(revision 11196)
@@ -41,4 +41,6 @@
   std::string  _log;
   double       _fixRatio;
+  double       _resRmsCode;   // RMS of the code post-fit residuals [m]
+  double       _resRmsPhase;  // RMS of the phase post-fit residuals [m]
   bool         _error;
 };
Index: trunk/BNC/src/pppRun.cpp
===================================================================
--- trunk/BNC/src/pppRun.cpp	(revision 11195)
+++ trunk/BNC/src/pppRun.cpp	(revision 11196)
@@ -487,5 +487,7 @@
            .add("hdop", output._hDop, 2)
            .add("fixed", output._fixRatio > 0.0)
-           .add("fix_percent", int(100*output._fixRatio));
+           .add("fix_percent", int(100*output._fixRatio))
+           .add("res_rms_code", output._resRmsCode, 4)
+           .add("res_rms_phase", output._resRmsPhase, 4);
         emit newLogRecord(rec, true);
       }
