Index: trunk/BNC/CHANGELOG.md
===================================================================
--- trunk/BNC/CHANGELOG.md	(revision 11220)
+++ trunk/BNC/CHANGELOG.md	(revision 11221)
@@ -1,8 +1,11 @@
 # Changelog
 ## 2.13.9 (unreleased)
+- FIXED: **Combination: the orbit consistency correction dC_orb was always zero (since r10820, March 2026).** The radial difference between the orbit of an AC and the master orbit, which keeps the combined clocks consistent with the master orbit, was computed from broadcast positions without the SSR orbit corrections, i.e. identical for all ACs. Orbit differences between the ACs therefore remained in the combined product: IGS02/IGS03 R10 R20 R23 0.6-0.75 m SIS vs. the other ACs in most hours of 20-23 Nov 2026 (radial orbit corrections of the GLONASS master CHC00 0.33 m off for R23). The positions now include the orbit correction of each AC. Replay 21 Nov 2026 (IGS03 inputs, 13 min): R23 SIS vs. the ACs +0.30 -> -0.11 m; PPP with the combined product (combi_ppp) RMS N/E/U 1.1/4.2/10.2 -> 2.9/2.3/1.9 cm. References of combi, combi_refsig, combi_ppp, combi_bds_level, combi_multi updated
+- FIXED: **SSR VTEC: a repeated VTEC message added its layers to the model of its epoch again.** The layers of a VTEC message were appended to the record of its epoch until a newer epoch arrived, so every retransmission of the same epoch added the complete model once more. IONO01IGS0 (RTCM 1264, Nov 2026) repeats each epoch 5 to 400 times, partly out of order and with non-RTCM bytes between the frames: the model reached up to 170 identical layers, i.e. VTEC up to 3900 TECU in PPP, the .ssr files and the SSR QC (14 of 57 hours), while the messages themselves are correct (hand decode: CRC-valid, coefficients up to 22 TECU, identical to IONO01IGS1). A VTEC message now replaces the record of its epoch; only the continuation of a multi-message model (Multiple Message Indicator 1) appends. New test case ssr_vtec_repeat
 - CHANGED: **Upload Ephemeris vote: no replacement of an uploaded data set for receiver-dependent fields.** Once a data set is uploaded, a copy differing only in fields which differ legitimately between receivers (URA/URAI/SISA, GPS/QZSS L2 code, L2 P and fit flags, GLONASS Cn/A/P/P1/P3/FT/NA/N4, BDS AODE/AODC) no longer replaces it; receivers keep the first copy anyway, so these replacements only changed the uploaded content back and forth. Before the upload the majority still decides on all fields. Replay 20 Nov 2026 (8 h, 96 input streams): 447 instead of 751 replacements, GPS 43 instead of 329 (up to 8 per data set before, L2code/fit), all 46 health corrections (Bn, ln) unchanged
 - ADDED: **SSR QC: IOD switch delay.** Per stream and system the number of switches of the orbit corrections to a new data set and the delay of the first correction after the reception of the data set by BNC (min / 10 % / median / max), for BDS also after the TOC (full-hour issue); switches back to an older data set are listed per satellite. Shows e.g. Analysis Centers using a new IOD earlier than 60 s after its broadcast (CAS01 BDS, Nov 2026, found by hand before)
 - FIXED: **SSR QC: corrections with an epoch time far from their reception moved the report interval.** A GLONASS epoch of SSRA01SHA1/SSRC01GFZ1 encoded 11758 s ahead (22 Nov 2026 00:10, "differs by 11758 s ... erroneously encoded?") moved the interval to 03:00: no reports for 01 and 02 h, the 03 h report covered 00:10-04:00 with latency maxima of ~650 s, which looked like a caster outage. Corrections more than 900 s from their reception are no longer used and counted per stream in the report (code and phase biases only for a future epoch: Galileo HAS biases keep their reference time, hours before reception; new test ssr_qc_has)
 - FIXED: **Combination: bogus correction epochs.** A clock epoch hours ahead (the same SSRA00SHA1 GLONASS epoch) marked the AC as having delivered all epochs up to then, so that the combination no longer waited for it (its later clocks could be dropped as 'old correction'), and future orbits or biases replaced the stored ones. Clocks are now checked against the current time (60 s) before they count as delivered, orbits more than 900 s and biases more than 900 s in the future are not stored; also in raw file replay (900 s). Logged at most once per hour and AC
+- FIXED: **Real-time PPP: bogus correction epochs.** The same SSRA00SHA1 GLONASS epoch 11758 s ahead made the affected satellites unusable until their next correction (age check), with 'Wait for clock corr.' discarded the observation epochs received until the next clock message (the last clock epoch was hours ahead) and with AR extrapolated the yaw angle over hours. Orbits, clocks and VTEC more than 900 s from the current time and biases more than 900 s in the future are no longer used (also in raw file replay, not in post-processing); logged at most once per hour and station
 - ADDED: **SSR QC: common outages of the input.** Periods in which at least 75 % (and 3) of the streams have a gap at the same time (caster or network outage) are listed once in each report and no longer counted as gaps of the single streams; the latencies during and up to 120 s after them are left out. New test case ssr_qc_outage
 - FIXED: **Combination (Kalman filter): jumps of the clock level of a system when a satellite is missing in one epoch.** The sum of the combined clocks was fixed to zero over the satellites of each epoch; a satellite not combined in an epoch (master AC without its correction, e.g. its correction referred to an ephemeris not yet received at the hourly BDS ephemeris change) shifted all other clocks of the system by its clock divided by the number of satellites and back at the next epoch. IGS03 20-23 Nov 2026: BDS jumps of 0.7-1.4 m in 22 of 57 hours, mostly at hh:01, once -4.9 m (15 satellites missing). Now the sum over the satellites also combined in the previous epoch keeps its value (previous clocks converted to the current ephemeris), relaxing to zero with a time constant of 1 h; after a gap > 60 s it is zero. Clocks relative to each other and orbits unchanged; replay 21 Nov 18:30-22:00: no common jumps, levels G/R/E within 0.15 m of before. New test case combi_bds_level, tool tests/tools/clkjumps.py
Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11220)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11221)
@@ -111,4 +111,6 @@
   _providerID[2] = -1;
 
+  _vTecMoreFollows = false;
+
   for (unsigned s = 0; s < CLOCKORBIT_SATNUM; s++) {
     _antennaReceived[s]    = false;
@@ -302,4 +304,10 @@
           emit newLogRecord(t_logRecord::message(t_logRecord::warning, "RTCM3coDecoder: _lastTime invalid: " + _staID.toLatin1()), true);
           retCode = failure;
+        }
+        // A VTEC message with Multiple Message Indicator 1 is continued by the
+        // next VTEC message of the same epoch (layers appended); any other
+        // VTEC message starts the record of its epoch anew (sendResults())
+        if (_vTEC.NumLayers > 0) {
+          _vTecMoreFollows = (irc == GCOBR_MESSAGEFOLLOWS);
         }
         // Keep _phaseBias intact: an Extended Phase Bias message (COBOFS_PBEXT)
@@ -670,4 +678,11 @@
   // -----------------
   if (_vTEC.NumLayers > 0) {
+    // A complete (re)transmission of an epoch already in the map must replace
+    // it, not add its layers again: IONO01IGS0 repeats each 1264 message up to
+    // 400 times (Nov 2026), which summed up to 3900 TECU in PPP and SSR QC.
+    // Only the continuation of a multi-message model (previous MMI 1) appends.
+    if (!_vTecMoreFollows) {
+      _vTecMap[_lastTime] = t_vTec();
+    }
     _vTecMap[_lastTime]._time  = _lastTime;
     _vTecMap[_lastTime]._updateInt =  _vTEC.UpdateInterval;
Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.h
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.h	(revision 11220)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.h	(revision 11221)
@@ -137,4 +137,5 @@
   unsigned int                          _phaseBiasSentEpoch[CLOCKORBIT_SATNUM];
   bool                                  _antennaReceived[CLOCKORBIT_SATNUM];
+  bool                                  _vTecMoreFollows; // last VTEC message had MMI 1: the next one continues its epoch
   unsigned int                          _antennaSentProviderID[CLOCKORBIT_COUNTSAT];
   unsigned int                          _antennaSentIOD[CLOCKORBIT_COUNTSAT];
Index: trunk/BNC/src/bnchelp.html
===================================================================
--- trunk/BNC/src/bnchelp.html	(revision 11220)
+++ trunk/BNC/src/bnchelp.html	(revision 11221)
@@ -7797,4 +7797,12 @@
   </p>
   <p>
+    In real-time PPP (also in the replay of a raw file), corrections with an epoch time more than 900 seconds from the
+    current time, e.g. an erroneously encoded GLONASS epoch hours ahead, are not used: they would make the satellites
+    unusable until the next correction and, with 'Wait for clock corr.', discard the observation epochs received in
+    the meantime. Code and phase biases are only rejected for a future epoch, as their epoch may legitimately be hours
+    old (Galileo HAS). Such an epoch is reported in the logfile at most once per hour, e.g. 'WTZR00DEU0: PPP:
+    SSRA00SHA1 orbit correction epoch ... is 11116 s from the current time, not used'.
+  </p>
+  <p>
     Default is an empty option field, meaning that you want BNC to process observations immediately after their arrival
     through applying the latest received clock correction.
@@ -8342,4 +8350,6 @@
  dC_frame = Orb_AC * (Orb_AC - Orb_MasterAC) / Range_sat
 </pre>
+  with Orb_AC and Orb_MasterAC the satellite positions of the broadcast ephemeris corrected by the SSR orbit
+  correction of the respective AC, i.e. the radial difference of the two orbits, which the clock of the AC absorbs.
   <pre>
  dC_att = (yawAngle_MasterAC - yawAngle_AC) / (2*PI) * wavelength(IF)
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 11220)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 11221)
@@ -2596,5 +2596,16 @@
         }
         else {
-          corr->_satPos = xc.Rows(1,3);
+          // Position with the AC's orbit correction (referred to ephLast by
+          // switchToLastEph): the broadcast position alone is the same for
+          // all ACs, so dC_orb was always zero (since r10820) and the clocks
+          // of the ACs were not made consistent with the master orbit, e.g.
+          // R23 of the GLONASS master CHC00 0.33 m radial off (Nov 2026)
+          ColumnVector xB     = xc.Rows(1,3);
+          ColumnVector vFrame = corr->_eph->ssrFrameVel(xc, vv); // GEO: inertial velocity
+          double       dtO    = corr->_time - corr->_orbCorr._time;
+          ColumnVector dRAO   = corr->_orbCorr._xr + corr->_orbCorr._dotXr * dtO;
+          ColumnVector dX(3);
+          RSW_to_XYZ(xB, vFrame, dRAO, dX);
+          corr->_satPos = xB - dX;  // SSR: corrected position = broadcast - correction
         }
       }
Index: trunk/BNC/src/pppRun.cpp
===================================================================
--- trunk/BNC/src/pppRun.cpp	(revision 11220)
+++ trunk/BNC/src/pppRun.cpp	(revision 11221)
@@ -500,4 +500,39 @@
 
 //
+// Real-time input (incl. raw file replay): true if the correction epoch is
+// more than MAX_EPOCH_OFFSET from the current time, e.g. an erroneously
+// encoded GLONASS epoch hours ahead (not used, as in the combination and the
+// SSR QC). It would make the satellites unusable (age check of the
+// corrections), discard observation epochs (correction wait time) and
+// extrapolate the yaw angle over hours until the next correction. Biases
+// (pastOk) are only rejected for a future epoch: their epoch may legitimately
+// be hours old (Galileo HAS). A warning at most once per hour.
+////////////////////////////////////////////////////////////////////////////
+bool t_pppRun::badEpoch(const bncTime& epoTime, const string& staID,
+                        const char* type, bool pastOk) {
+  const double MAX_EPOCH_OFFSET = 900.0; // [s]
+  if (!_opt->_realTime) {
+    return false;
+  }
+  int    currentWeek = 0;
+  double currentSec  = 0.0;
+  currentGPSWeeks(currentWeek, currentSec);
+  bncTime currentTime(currentWeek, currentSec);
+  double offset = epoTime - currentTime;
+  if (fabs(offset) <= MAX_EPOCH_OFFSET || (pastOk && offset < 0.0)) {
+    return false;
+  }
+  if (!_badEpochWarned.valid() || currentTime - _badEpochWarned >= 3600.0) {
+    _badEpochWarned = currentTime;
+    emit newLogRecord(t_logRecord::message(t_logRecord::warning, QByteArray(_opt->_roverName.c_str()) + ": PPP: " +
+                    QByteArray(staID.c_str()) + " " + type + " correction epoch " +
+                    QByteArray(epoTime.datestr().c_str()) + " " + epoTime.timestr().c_str() +
+                    QString(" is %1 s from the current time, not used").arg(offset, 0, 'f', 0).toLatin1() +
+                    " (further ones not reported within the next hour)"), true);
+  }
+  return true;
+}
+
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_pppRun::slotNewTec(t_vTec vTec) {
@@ -521,4 +556,7 @@
     }
   }
+  if (badEpoch(vTec._time, vTec._staID, "VTEC")) {
+    return;
+  }
   _pppClient->putTec(&vTec);
 }
@@ -553,5 +591,10 @@
   vector<t_orbCorr*> corrections;
   for (int ii = 0; ii < orbCorr.size(); ii++) {
-    corrections.push_back(new t_orbCorr(orbCorr[ii]));
+    if (!badEpoch(orbCorr[ii]._time, orbCorr[ii]._staID, "orbit")) {
+      corrections.push_back(new t_orbCorr(orbCorr[ii]));
+    }
+  }
+  if (corrections.empty()) {
+    return;
   }
 
@@ -577,6 +620,11 @@
   vector<t_clkCorr*> corrections;
   for (int ii = 0; ii < clkCorr.size(); ii++) {
-    corrections.push_back(new t_clkCorr(clkCorr[ii]));
-    _lastClkCorrTime = clkCorr[ii]._time;
+    if (!badEpoch(clkCorr[ii]._time, clkCorr[ii]._staID, "clock")) {
+      corrections.push_back(new t_clkCorr(clkCorr[ii]));
+      _lastClkCorrTime = clkCorr[ii]._time;
+    }
+  }
+  if (corrections.empty()) {
+    return;
   }
   _pppClient->putClkCorrections(corrections);
@@ -611,5 +659,10 @@
   vector<t_satCodeBias*> biases;
   for (int ii = 0; ii < codeBiases.size(); ii++) {
-    biases.push_back(new t_satCodeBias(codeBiases[ii]));
+    if (!badEpoch(codeBiases[ii]._time, codeBiases[ii]._staID, "code bias", true)) {
+      biases.push_back(new t_satCodeBias(codeBiases[ii]));
+    }
+  }
+  if (biases.empty()) {
+    return;
   }
 
@@ -672,5 +725,10 @@
   vector<t_satPhaseBias*> biases;
   for (int ii = 0; ii < phaseBiases.size(); ii++) {
-    biases.push_back(new t_satPhaseBias(phaseBiases[ii]));
+    if (!badEpoch(phaseBiases[ii]._time, phaseBiases[ii]._staID, "phase bias", true)) {
+      biases.push_back(new t_satPhaseBias(phaseBiases[ii]));
+    }
+  }
+  if (biases.empty()) {
+    return;
   }
 
Index: trunk/BNC/src/pppRun.h
===================================================================
--- trunk/BNC/src/pppRun.h	(revision 11220)
+++ trunk/BNC/src/pppRun.h	(revision 11221)
@@ -55,4 +55,5 @@
 
  private:
+  bool badEpoch(const bncTime& epoTime, const std::string& staID, const char* type, bool pastOk = false);
   class t_epoData {
    public:
@@ -75,4 +76,5 @@
   std::deque<t_epoData*> _epoData;
   bncTime                _lastClkCorrTime;
+  bncTime                _badEpochWarned;   // last bad-epoch warning (current time)
   t_rnxObsFile*          _rnxObsFile;
   t_rnxNavFile*          _rnxNavFile;
Index: trunk/BNC/tests/cases/ssr_vtec_repeat/case.json
===================================================================
--- trunk/BNC/tests/cases/ssr_vtec_repeat/case.json	(revision 11221)
+++ trunk/BNC/tests/cases/ssr_vtec_repeat/case.json	(revision 11221)
@@ -0,0 +1,10 @@
+{
+  "description": "03_BrdcCorr replay: IONO01IGS0 (RTCM 1264, each epoch repeated up to 82 times, non-RTCM bytes between the frames) and IONO01IGS1 (IGS-SSR 201/202); a repeated VTEC message must replace its epoch, not add its layers again (each .ssr VTEC record has 1 layer)",
+  "config": "Example_Configs/03_BrdcCorr.bnc",
+  "raw": "data/ssr_vtec_repeat_261121_3min.raw",
+  "exit_code": 5,
+  "timeout": 300,
+  "outputs": [
+    "Output/*.ssr"
+  ]
+}
