Index: trunk/BNC/src/ssrQc.cpp
===================================================================
--- trunk/BNC/src/ssrQc.cpp	(revision 11220)
+++ trunk/BNC/src/ssrQc.cpp	(revision 11227)
@@ -79,4 +79,5 @@
   const double VTEC_CMP_DELAY = 120.0;  // [s] VTEC epochs compared when data this much newer arrived
   const double VTEC_HIST      = 3600.0; // [s] VTEC models kept for the comparison
+  const double VTEC_RMS_MIN   = 0.05;   // [TECU] stated RMS below this is not used for normalized differences
   const double VTEC_GRID_LAT  = 10.0;   // [deg] grid of the VTEC evaluation, latitudes -80 ... 80
   const double VTEC_GRID_LON  = 15.0;   // [deg]
@@ -196,4 +197,6 @@
   connect(BNC_CORE, SIGNAL(newTec(t_vTec)),
           this, SLOT(slotNewTec(t_vTec)), Qt::DirectConnection);
+  connect(BNC_CORE, SIGNAL(newTecRms(t_vTec)),
+          this, SLOT(slotNewTecRms(t_vTec)), Qt::DirectConnection);
   // combined corrections (stream INTERNAL)
   if (bncComb::exists()) {
@@ -1612,4 +1615,26 @@
 }
 
+// RMS of the VTEC (IGS-SSR IM202, proposal of CAS, Dec 2025): kept for the
+// streams checked, compared with the actual differences in compareVtec()
+////////////////////////////////////////////////////////////////////////////
+void t_ssrQc::slotNewTecRms(t_vTec vTec) {
+  QMutexLocker locker(&_mutex);
+  if (vTec._layers.empty() || badEpoch(vTec._staID, vTec._time) || !selected(vTec._staID)) {
+    return;
+  }
+  QString sta = QString::fromStdString(vTec._staID);
+  QMap<double, t_vTec>& hist = _vtecRmsHist[sta];
+  hist[tKey(vTec._time)] = vTec;
+  while (!hist.isEmpty() && tKey(vTec._time) - hist.firstKey() > VTEC_HIST) {
+    hist.erase(hist.begin());
+  }
+  QStringList layers;
+  for (const t_vTecLayer& layer : vTec._layers) {
+    layers << QString("%1 km (degree/order %2/%3)").arg(layer._height / 1000.0, 0, 'f', 0)
+              .arg(layer._C.Nrows() - 1).arg(layer._C.Ncols() - 1);
+  }
+  _vtecStat[sta].rmsModel = QString("%1 layer(s): %2").arg(vTec._layers.size()).arg(layers.join(", "));
+}
+
 // VTEC [TECU] of a model at a geocentric latitude and longitude [rad] and
 // epoch: spherical harmonics in the sun-fixed frame as used in PPP, sum of
@@ -1720,4 +1745,25 @@
     st.numCmp += 1;
     st.numSol += perSol.size();
+
+    // RMS map of the model (IM202): latest one not newer than the comparison
+    // epoch and not older than the VTEC model used
+    QVector<double> rmsVal;
+    if (_vtecRmsHist.contains(staID)) {
+      const QMap<double, t_vTec>& hist = _vtecRmsHist[staID];
+      QMap<double, t_vTec>::const_iterator it = hist.upperBound(tk);
+      if (it != hist.constBegin()) {
+        --it;
+        if (it.key() >= tKey(models[staID]->_time)) {
+          rmsVal.resize(grid.size());
+          for (int ii = 0; ii < grid.size(); ii++) {
+            bool negative = false;
+            rmsVal[ii] = vtecAt(it.value(), grid[ii].first, grid[ii].second, tt, negative);
+            if (negative) st.numRmsNeg += 1;
+          }
+          st.numRmsCmp += 1;
+        }
+      }
+    }
+
     for (int ii = 0; ii < grid.size(); ii++) {
       QVector<double> solVal;
@@ -1732,4 +1778,20 @@
       st.sDiff2  += diff * diff;
       st.maxAbs   = max(st.maxAbs, fabs(diff));
+      if (!rmsVal.isEmpty()) {
+        double rr = rmsVal[ii];
+        if (st.numRms + st.numRmsZero == 0 || rr < st.minR) st.minR = rr;
+        if (st.numRms + st.numRmsZero == 0 || rr > st.maxR) st.maxR = rr;
+        st.sR2 += rr * rr;
+        st.sD2 += diff * diff;
+        if (rr > VTEC_RMS_MIN) {
+          st.numRms += 1;
+          st.sN2    += (diff / rr) * (diff / rr);
+          if (fabs(diff) <= rr)       st.in1 += 1;
+          if (fabs(diff) <= 2.0 * rr) st.in2 += 1;
+        }
+        else {
+          st.numRmsZero += 1;
+        }
+      }
     }
   }
@@ -1894,4 +1956,27 @@
           else {
             lines << "VTEC not compared: no other model available";
+          }
+          if (!vs.rmsModel.isEmpty()) {
+            lines << "VTEC RMS map (IGS-SSR 202): " + vs.rmsModel;
+          }
+          unsigned numR = vs.numRms + vs.numRmsZero;
+          if (numR) {
+            lines << QString("VTEC RMS map, %1 epochs: stated RMS %2 ... %3 TECU (RMS %4 TECU), "
+                             "actual RMS of the differences %5 TECU, negative (set to zero) %6 %")
+                     .arg(vs.numRmsCmp).arg(vs.minR, 0, 'f', 1).arg(vs.maxR, 0, 'f', 1)
+                     .arg(sqrt(vs.sR2 / numR), 0, 'f', 2).arg(sqrt(vs.sD2 / numR), 0, 'f', 2)
+                     .arg(100.0 * vs.numRmsNeg / numR, 0, 'f', 1);
+            if (vs.numRms) {
+              lines << QString("VTEC differences normalized by the stated RMS: RMS %1, "
+                               "|diff| <= RMS %2 %, <= 2 RMS %3 % (normal distribution: 68 %, 95 %)%4")
+                       .arg(sqrt(vs.sN2 / vs.numRms), 0, 'f', 2)
+                       .arg(100.0 * vs.in1 / vs.numRms, 0, 'f', 1)
+                       .arg(100.0 * vs.in2 / vs.numRms, 0, 'f', 1)
+                       .arg(vs.numRmsZero ? QString(", %1 grid values with RMS <= %2 TECU not normalized")
+                                            .arg(vs.numRmsZero).arg(VTEC_RMS_MIN) : QString());
+            }
+          }
+          else if (!vs.rmsModel.isEmpty()) {
+            lines << "VTEC RMS map not compared: no matching VTEC comparison";
           }
         }
@@ -2253,5 +2338,6 @@
   for (QMap<QString, t_vtecStat>::iterator it = _vtecStat.begin(); it != _vtecStat.end(); ++it) {
     t_vtecStat fresh;
-    fresh.model = it.value().model;
+    fresh.model    = it.value().model;
+    fresh.rmsModel = it.value().rmsModel;
     it.value() = fresh;
   }
