Index: trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 11043)
+++ trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 11047)
@@ -141,4 +141,5 @@
     flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
     CurrentObs._prn.set(sys, num, flag);
+    checkPrnRange(CurrentObs._prn);
 
     t_frqObs *frqObs = new t_frqObs;
@@ -723,4 +724,5 @@
           else
             CurrentObs._prn.set(sys, RTCM3_MSM_NUMSAT - i);
+          checkPrnRange(CurrentObs._prn);
           j = RTCM3_MSM_NUMSIG;
           while (!(sigmask & (1 << --j)))
@@ -954,7 +956,10 @@
     int flag = t_corrSSR::getSsrNavTypeFlag(sys, sv);
     CurrentObs._prn.set(sys, sv, flag);
+    checkPrnRange(CurrentObs._prn);
     GETBITS(code, 1)
     GETBITS(freq, 5)
-    GLOFreq[sv - 1] = 100 + freq - 7; /* store frequency for other users (MSM) */
+    if (sv >= 1) { /* 6-bit slot 1..63 fits GLOFreq[64]; 0 is invalid */
+      GLOFreq[sv - 1] = 100 + freq - 7; /* store frequency for other users (MSM) */
+    }
 
     t_frqObs *frqObs = new t_frqObs;
@@ -1066,4 +1071,5 @@
     }
     eph._prn.set('G', i);
+    checkPrnRange(eph._prn);
     GETBITS(week, 10)
     if (week < 0 || week > 1023) {
@@ -1185,4 +1191,5 @@
     }
     eph._prn.set('R', sv);
+    checkPrnRange(eph._prn);
 
     GETBITS(i, 5)
@@ -1373,4 +1380,5 @@
     }
     eph._prn.set('J', i);
+    checkPrnRange(eph._prn);
 
     GETBITS(i, 16)
@@ -1493,4 +1501,5 @@
     }
     eph._prn.set('I', i);
+    checkPrnRange(eph._prn);
     GETBITS(week, 10)
     if (week < 0 || week > 1023) {
@@ -1627,4 +1636,5 @@
     }
     eph._prn.set('S', 20 + i);
+    checkPrnRange(eph._prn);
     GETBITS(eph._IODN, 8)
     GETBITS(i, 13)
@@ -1716,4 +1726,5 @@
     }
     eph._prn.set('E', i, eph._inav ? t_eph::INAV : t_eph::FNAV);
+    checkPrnRange(eph._prn);
 
     GETBITS(week, 12) //FIXME: roll-over after week 4095!!
@@ -1863,4 +1874,5 @@
     }
     eph._prn.set('C', i);
+    checkPrnRange(eph._prn);
 
     GETBITS(week, 13)
@@ -2439,5 +2451,18 @@
 }
 
-
-
-
+// Satellite numbers on the wire can exceed BNC's supported range (e.g. 6-bit
+// IDs up to 63, while t_prn supports G01-G32). They are passed on unchanged,
+// but t_prn::toInt() maps them to the unused index 0, so they are not usable
+// for per-satellite processing - report that once per satellite.
+////////////////////////////////////////////////////////////////////////////
+void RTCM3Decoder::checkPrnRange(const t_prn& prn) {
+  if (prn.toInt() != 0) {
+    return;
+  }
+  QString prnStr = QString::fromStdString(prn.toString());
+  if (!_prnOutOfRangeLogged.contains(prnStr)) {
+    _prnOutOfRangeLogged.insert(prnStr);
+    emit newMessage(QString("%1: satellite %2 outside the range supported by BNC - not usable for processing")
+                    .arg(_staID).arg(prnStr).toLatin1(), true);
+  }
+}
