Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 11187)
+++ trunk/BNC/src/bnccore.cpp	(revision 11215)
@@ -287,4 +287,26 @@
 t_irc t_bncCore::checkPrintEph(t_eph* eph) {
   QMutexLocker locker(&_mutex);
+
+  // Satellite outside the range supported by BNC (e.g. G39, test signal of
+  // NTS-3, not IS-GPS compliant): the ephemeris is neither written to RINEX
+  // nor passed on (upload, PPP, combination, SSR QC); each data set is
+  // logged once as RINEX record instead
+  if (eph->prn().toInt() == 0) {
+    QString key = QString("%1 %2 %3 %4").arg(eph->prn().toInternalString().c_str())
+                  .arg(eph->TOC().datestr().c_str()).arg(eph->TOC().timestr(0).c_str()).arg(eph->IOD());
+    if (!_ephOutOfRange.contains(key)) {
+      _ephOutOfRange.insert(key);
+      double version = (_rinexVers == 2) ? defaultRnxNavVersion2 :
+                       (_rinexVers == 4) ? defaultRnxNavVersion4 : defaultRnxNavVersion3;
+      messagePrivate(t_logRecord::message(t_logRecord::warning,
+                     QString("%1: ephemeris of satellite %2 outside the range supported by BNC - not used, RINEX %3 record:")
+                     .arg(eph->receptStaID()).arg(eph->prn().toString().c_str()).arg(version, 0, 'f', 2).toLatin1(), "bce"));
+      QStringList lines = eph->toString(version).split('\n', Qt::SkipEmptyParts);
+      for (int ii = 0; ii < lines.size(); ii++) {
+        messagePrivate(t_logRecord::message(t_logRecord::warning, lines[ii].toLatin1(), "bce"));
+      }
+    }
+    return failure;
+  }
   t_irc ircPut = _ephUser.putNewEph(eph, true);
 #ifdef BNC_DEBUG_BCE
