Index: trunk/BNC/src/bnc.qrc
===================================================================
--- trunk/BNC/src/bnc.qrc	(revision 11175)
+++ trunk/BNC/src/bnc.qrc	(revision 11179)
@@ -51,4 +51,5 @@
     <file>IMG/Figure40.png</file>
     <file>IMG/Figure41.png</file>
+    <file>IMG/Figure42.png</file>
 </qresource>
 <qresource>
Index: trunk/BNC/src/bncbiassinex.cpp
===================================================================
--- trunk/BNC/src/bncbiassinex.cpp	(revision 11175)
+++ trunk/BNC/src/bncbiassinex.cpp	(revision 11179)
@@ -45,4 +45,14 @@
 ////////////////////////////////////////////////////////////////////////////
 bncBiasSinex::~bncBiasSinex() {
+  closeFile();
+}
+
+// Close File (write last lines)
+////////////////////////////////////////////////////////////////////////////
+void bncBiasSinex::closeFile() {
+  if (_out.is_open()) {
+    _out << "-BIAS/SOLUTION" << endl;
+    _out << "%=ENDBIA" << endl;
+  }
   bncoutf::closeFile();
 }
Index: trunk/BNC/src/bncbiassinex.h
===================================================================
--- trunk/BNC/src/bncbiassinex.h	(revision 11175)
+++ trunk/BNC/src/bncbiassinex.h	(revision 11179)
@@ -32,4 +32,5 @@
  private:
   virtual void writeHeader(const QDateTime& datTim);
+  virtual void closeFile();
   int     _sampl;
   QString _agency;
Index: trunk/BNC/src/bncclockrinex.cpp
===================================================================
--- trunk/BNC/src/bncclockrinex.cpp	(revision 11175)
+++ trunk/BNC/src/bncclockrinex.cpp	(revision 11179)
@@ -36,4 +36,7 @@
 ////////////////////////////////////////////////////////////////////////////
 bncClockRinex::~bncClockRinex() {
+  if (_lastEpoTime.valid()) {
+    writeEpoch(_lastEpoTime, _oStr.str()); // last epoch, otherwise printed with the next one
+  }
   bncoutf::closeFile();
 }
@@ -47,5 +50,5 @@
   _oStr.setf(ios::fixed);
 
-  if (reopen(GPSweek, GPSweeks) == success) {
+  if (_sampl == 0 || fmod(GPSweeks, _sampl) == 0.0) {
 
     bncTime epoTime(GPSweek, GPSweeks);
@@ -53,10 +56,8 @@
     if (epoTime != _lastEpoTime) {
 
-      // print out epoch before
+      // print out epoch before (complete now)
       if (_lastEpoTime.valid()) {
-        _out << _oStr.str();
-        if (_lastEpoTime.daysec() != 0.0) {
-          _oStr.str(std::string());
-        }
+        writeEpoch(_lastEpoTime, _oStr.str());
+        _oStr.str(std::string());
       }
 
Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 11175)
+++ trunk/BNC/src/bnccore.cpp	(revision 11179)
@@ -71,4 +71,6 @@
   _logFile     = 0;
   _logStream   = 0;
+  _logFileStructured  = 0;
+  _logFormatStructured = t_logRecord::json;
   _rawFile     = 0;
   _caster      = 0;
@@ -103,4 +105,5 @@
   qRegisterMetaType< QVector<double> >      ("QVector<double>");
   qRegisterMetaType<bncTime>                ("bncTime");
+  qRegisterMetaType<t_logRecord>            ("t_logRecord");
   qRegisterMetaType<t_ephGPS>               ("t_ephGPS");
   qRegisterMetaType<t_ephGlo>               ("t_ephGlo");
@@ -122,4 +125,5 @@
   delete _logStream; _logStream = 0;
   delete _logFile;   _logFile   = 0;
+  delete _logFileStructured; _logFileStructured = 0;
   qDeleteAll(_ephFiles);
   delete _serverEph;
@@ -144,22 +148,36 @@
     return;
   }
+  slotLogRecord(t_logRecord::fromMessage(msg), showOnScreen);
+}
+
+// Write a Program Message with structured fields (structured logfile);
+// the classic logfile and the screen get the text rec._msg
+////////////////////////////////////////////////////////////////////////////
+void t_bncCore::slotLogRecord(t_logRecord rec, bool showOnScreen) {
+  if (rec._msg.isEmpty()) {
+    return;
+  }
   QMutexLocker locker(&_mutexMessage);
 
-  messagePrivate(msg);
-  emit newMessage(msg, showOnScreen);
+  messagePrivate(rec);
+  emit newMessage(rec._msg, showOnScreen);
 }
 
 // Write a Program Message (private, no lock)
 ////////////////////////////////////////////////////////////////////////////
-void t_bncCore::messagePrivate(const QByteArray& msg) {
-
-  // First time resolve the log file name
-  // ------------------------------------
-  QDate currDate = currentDateAndTimeGPS().date();
+void t_bncCore::messagePrivate(const t_logRecord& rec) {
+
+  // First time resolve the log file names
+  // -------------------------------------
+  QDateTime currDateTime = currentDateAndTimeGPS();
+  QDate currDate = currDateTime.date();
   if (_logFileFlag == 0 || _fileDate != currDate) {
     delete _logStream; _logStream = 0;
     delete _logFile;   _logFile   = 0;
+    delete _logFileStructured; _logFileStructured = 0;
     _logFileFlag = 1;
+    _fileDate = currDate;
     bncSettings settings;
+    bool append = (Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked);
     QString logFileName = settings.value("logFile").toString();
     if ( !logFileName.isEmpty() ) {
@@ -167,6 +185,5 @@
       _logFile = new QFile(logFileName + "_" +
                           currDate.toString("yyMMdd").toLatin1().data());
-      _fileDate = currDate;
-      if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
+      if (append) {
         _logFile->open(QIODevice::WriteOnly | QIODevice::Append);
       }
@@ -177,16 +194,32 @@
       _logStream->setDevice(_logFile);
     }
+    QString structName = settings.value("logFileStructured").toString();
+    if ( !structName.isEmpty() ) {
+      expandEnvVar(structName);
+      _logFormatStructured = t_logRecord::formatFromString(
+                               settings.value("logFormatStructured").toString());
+      _logFileStructured = new QFile(structName + "_" + currDate.toString("yyMMdd"));
+      if (!_logFileStructured->open(append ? (QIODevice::WriteOnly | QIODevice::Append)
+                                           : QIODevice::WriteOnly)) {
+        delete _logFileStructured; _logFileStructured = 0;
+      }
+    }
   }
 
   if (_logStream) {
-    QByteArray msgLocal = msg;
-    if (msg.indexOf('\n') == 0) {
+    QByteArray msgLocal = rec._msg;
+    if (rec._msg.indexOf('\n') == 0) {
       *_logStream << "\r\n";
-      msgLocal = msg.mid(1);
-    }
-    *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").toLatin1().data();
+      msgLocal = rec._msg.mid(1);
+    }
+    *_logStream << currDateTime.toString("yy-MM-dd hh:mm:ss ").toLatin1().data();
     *_logStream << msgLocal.data() << "\r\n";
     _logStream->flush();
     _logFile->flush();
+  }
+
+  if (_logFileStructured) {
+    _logFileStructured->write(rec.encode(_logFormatStructured, currDateTime) + "\n");
+    _logFileStructured->flush();
   }
 }
@@ -199,20 +232,20 @@
 #ifdef BNC_DEBUG_BCE
   if (eph->checkState() == t_eph::unhealthy) {
-    messagePrivate(QString("%1: UNHEALTHY %2:%3")
+    messagePrivate(t_logRecord::fromMessage(QString("%1: UNHEALTHY %2:%3")
                    .arg(eph->receptStaID())
                    .arg(eph->typeStr(eph->type(), eph->prn(), 99.0))
-                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1());
+                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1()));
   }
   if (eph->checkState() == t_eph::bad) {
-    messagePrivate(QString("%1: WRONG %2:%3")
+    messagePrivate(t_logRecord::fromMessage(QString("%1: WRONG %2:%3")
                    .arg(eph->receptStaID())
                    .arg(eph->typeStr(eph->type(), eph->prn(), 99.0))
-                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1());
+                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1()));
   }
   if (eph->checkState() == t_eph::outdated) {
-    messagePrivate(QString("%1: OUTDATED %2:%3")
+    messagePrivate(t_logRecord::fromMessage(QString("%1: OUTDATED %2:%3")
                    .arg(eph->receptStaID())
                    .arg(eph->typeStr(eph->type(), eph->prn(), 99.0))
-                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1());
+                   .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1()));
   }
 #endif
Index: trunk/BNC/src/bnccore.h
===================================================================
--- trunk/BNC/src/bnccore.h	(revision 11175)
+++ trunk/BNC/src/bnccore.h	(revision 11179)
@@ -30,4 +30,5 @@
 #include "bncrawfile.h"
 #include "bncephuser.h"
+#include "bnclog.h"
 
 class bncComb;
@@ -91,4 +92,5 @@
  public slots:
   void slotMessage(QByteArray msg, bool showOnScreen);
+  void slotLogRecord(t_logRecord rec, bool showOnScreen);
   void slotNewGPSEph(t_ephGPS);
   void slotNewGlonassEph(t_ephGlo);
@@ -153,5 +155,5 @@
                        const QString& strV2, const QString& strV3,
                        const QString& strV4);
-  void  messagePrivate(const QByteArray& msg);
+  void  messagePrivate(const t_logRecord& rec);
 
   QSettings::SettingsMap _settings;
@@ -159,4 +161,6 @@
   QTextStream*           _logStream;
   int                    _logFileFlag;
+  QFile*                 _logFileStructured;
+  t_logRecord::e_format  _logFormatStructured;
   QMutex                 _mutex;
   QMutex                 _mutexMessage;
Index: trunk/BNC/src/bncgetthread.cpp
===================================================================
--- trunk/BNC/src/bncgetthread.cpp	(revision 11175)
+++ trunk/BNC/src/bncgetthread.cpp	(revision 11179)
@@ -131,4 +131,7 @@
   connect(this, SIGNAL(newMessage(QByteArray,bool)),
   BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
+  connect(this, SIGNAL(newLogRecord(t_logRecord,bool)),
+  BNC_CORE, SLOT(slotLogRecord(t_logRecord,bool)));
+  t_logRecord::registerStation(_staID);
 
   _isToBeDeleted = false;
@@ -330,10 +333,10 @@
       _format.indexOf("RTCM2")  != -1 ||
       _format.indexOf("RTCM 2") != -1) {
-    emit(newMessage(_staID + ": Get data in RTCM 2.x format", true));
+    emitFormat(": Get data in RTCM 2.x format", "RTCM2");
     _decoder = new RTCM2Decoder(_staID.data());
   } else if (_format.indexOf("RTCM_3") != -1 ||
       _format.indexOf("RTCM3")  != -1 ||
       _format.indexOf("RTCM 3") != -1) {
-    emit(newMessage(_staID + ": Get data in RTCM 3.x format", true));
+    emitFormat(": Get data in RTCM 3.x format", "RTCM3");
     RTCM3Decoder* newDecoder = new RTCM3Decoder(_staID, _rawFile);
     _decoder = newDecoder;
@@ -341,13 +344,13 @@
         this, SIGNAL(newMessage(QByteArray,bool)));
   } else if (_format == "ZERO") {
-    emit(newMessage(_staID + ": Forward data in original format", true));
+    emitFormat(": Forward data in original format", "ZERO");
     _decoder = new bncZeroDecoder(_staID, false);
   }
   else if (_format == "ZERO2FILE") {
-    emit(newMessage(_staID + ": Get data in original format and store it", true));
+    emitFormat(": Get data in original format and store it", "ZERO2FILE");
     _decoder = new bncZeroDecoder(_staID, true);
   }
   else if (_format.indexOf("RTNET") != -1) {
-    emit(newMessage(_staID + ": Get data in RTNet format", true));
+    emitFormat(": Get data in RTNet format", "RTNET");
     _decoder = new bncRtnetDecoder();
   } else {
@@ -481,4 +484,5 @@
         _format = _rawFile->format();
         _staID = _rawFile->staID();
+        t_logRecord::registerStation(_staID);
 
         QCoreApplication::processEvents();
@@ -508,5 +512,6 @@
           _latencyChecker->checkReconnect();
         }
-        emit(newMessage(_staID + ": Data timeout, reconnecting", true));
+        emit newLogRecord(t_logRecord(t_logRecord::warning, "stream", "stream_timeout", _staID,
+                                      _staID + ": Data timeout, reconnecting"), true);
         msleep(10000); //sleep 10 sec, G. Weber
         continue;
@@ -1143,2 +1148,11 @@
   }
 }
+
+// Message on the data format of the stream
+////////////////////////////////////////////////////////////////////////////
+void bncGetThread::emitFormat(const char* text, const char* decoder) {
+  t_logRecord rec(t_logRecord::info, "stream", "stream_format", _staID, _staID + text);
+  rec.add("decoder", QByteArray(decoder))
+     .add("format", _format);
+  emit newLogRecord(rec, true);
+}
Index: trunk/BNC/src/bncgetthread.h
===================================================================
--- trunk/BNC/src/bncgetthread.h	(revision 11175)
+++ trunk/BNC/src/bncgetthread.h	(revision 11179)
@@ -37,4 +37,5 @@
 #include "bncrawfile.h"
 #include "satObs.h"
+#include "bnclog.h"
 #include "rinex/rnxobsfile.h"
 
@@ -84,4 +85,5 @@
                   double hh, QByteArray antType);
    void newMessage(QByteArray msg, bool showOnScreen);
+   void newLogRecord(t_logRecord rec, bool showOnScreen);
    void newRTCMMessage(QByteArray staID, int msgID);
    void getThreadFinished(QByteArray staID);
@@ -100,4 +102,5 @@
    enum t_serialNMEA {NO_NMEA, MANUAL_NMEA, AUTO_NMEA};
    t_irc        initDecoder();
+   void         emitFormat(const char* text, const char* decoder);
    GPSDecoder* decoder();
 
Index: trunk/BNC/src/bnchelp.html
===================================================================
--- trunk/BNC/src/bnchelp.html	(revision 11175)
+++ trunk/BNC/src/bnchelp.html	(revision 11179)
@@ -2232,6 +2232,8 @@
     <li>Configuration File '21_CompareSp3.bnc'<br>
       Purpose: Compare two SP3 files to calculate RMS values for orbit and clock
-      differences. GPS satellite G05 and GLONASS satellite R18 are excluded from this
-      comparison. Comparison results are saved in a logfile.
+      differences: the IGS real-time combination of 15 October 2026 produced by BNC
+      (CMB0MGXRTS, thinned to 5 minutes) and the GFZ rapid product (GBM0MGXRAP). GLONASS
+      satellite R08 (GLONASS-K2, its antenna offsets were not yet used by all real-time
+      ACs) is excluded from this comparison. Comparison results are saved in a logfile.
     </li>
 
@@ -2324,8 +2326,8 @@
   <ol start="28">
     <li>Shell Script '28_CompareSp3.sh'<br>
-      Purpose: Equals configuration file example 'CompareSp3.bnc', compares two SP3
+      Purpose: Equals configuration file example '21_CompareSp3.bnc', compares two SP3
       files to calculate RMS values for orbit and clock differences. However, instead
-      of excluding GPS satellite G05 and GLONASS satellite R18 from the comparison as
-      specified in 'CompareSp3.bnc', GPS satellite G06 and all GLONASS satellites are
+      of excluding GLONASS satellite R08 from the comparison as
+      specified in '21_CompareSp3.bnc', GPS satellite G06 and all GLONASS satellites are
       excluded via command line option. BNC runs offline. Comparison results are saved
       in a logfile.
@@ -2384,4 +2386,5 @@
     <li>Real-time PPP: float, Quick-Start, ambiguity resolution with CNES and WHU corrections, two stations, Galileo
       HAS.</li>
+    <li>Structured logfile in JSON and logfmt, compared with each other and with the logfile.</li>
     <li>Combination of broadcast corrections, also with PPP using the combined corrections ('INTERNAL').</li>
     <li>Upload of broadcast corrections (encoded as IGS-SSR), of broadcast ephemerides and of raw streams to a local
@@ -2737,4 +2740,6 @@
     raw file output, and the ephemeris streams for the SSR processing.
   </p>
+  <p><img src="IMG/Figure08.png" width=800 /></p>
+  <p>Figure 8: BNC's 'General' panel, the SSR processing using the Broadcast Ephemeris of stream BCEP00BKG0 only</p>
 
   <p>
@@ -2778,4 +2783,61 @@
 </pre>
   </p>
+  <p>
+    <b>Structured logfile</b><br>
+    For log processing tools (e.g. Grafana Loki, Elasticsearch, Vector, jq), BNC can write the same records in
+    addition into a structured logfile: specify its path in the 'Structured logfile' field and select the format,
+    'json' for one JSON object per line (JSON Lines) or 'logfmt' for key=value pairs separated by blanks. As for the
+    logfile, the name is extended by '_YYMMDD'. The logfile itself remains unchanged, so existing scripts reading it
+    keep working. Default is an empty option field, meaning that no structured logfile is written.
+  </p>
+  <p>
+    Each record carries the following keys in this order:
+  </p>
+  <ul>
+    <li>'time': time of the record in UTC, ISO 8601 with 'Z', e.g. '2025-11-17T13:49:40.000Z',</li>
+    <li>'gpst': the same time in GPS Time (as the time stamps of the logfile), e.g. '2025-11-17T13:49:58.000',</li>
+    <li>'level': 'info', 'warning' or 'error',</li>
+    <li>'component': the part of BNC writing the record, e.g. 'stream', 'ppp', or 'bnc' for general messages,</li>
+    <li>'event': the kind of record, see below, or 'message' for general messages,</li>
+    <li>'station': the stream or PPP station, if known,</li>
+    <li>the fields of the event,</li>
+    <li>'msg': the text of the record in the logfile,</li>
+    <li>'v': the version of the record layout, currently 1.</li>
+  </ul>
+  <p>
+    Events with own fields (numbers in meters and seconds):
+  </p>
+  <ul>
+    <li>'ppp_position': 'epoch' (GPS Time), '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>
+    <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>
+    <li>'stream_outage_begin' (warning), 'stream_corrupted_begin' (warning): 'since' (UTC);
+        'stream_outage_end', 'stream_corrupted_end': 'ended' and 'since' (UTC),</li>
+    <li>'stream_latency': 'type' (e.g. Observations, RtcmSsrClock), 'mean', 'min', 'max', 'rms', 'epochs' and, if
+        available, 'gaps'.</li>
+  </ul>
+  <p>
+    All other messages are written with component 'bnc' and event 'message'. Their level is derived from keywords of
+    the text ('error', 'fail', 'cannot', ... give 'error'; 'warning', 'outage', 'corrupt', 'timeout', 'wrong',
+    'invalid', 'ignored', 'unknown', ... give 'warning'). Further events will follow; new keys may be added to a record
+    without changing its version, removed or renamed keys increase the version.
+  </p>
+  <p>
+    Example in JSON (one line per record):
+  </p>
+  <pre><p style="font-family:Monospace">
+{"time":"2025-11-17T13:48:51.000Z","gpst":"2025-11-17T13:49:09.000","level":"info","component":"stream","event":"stream_format","station":"BCEP00BKG0","decoder":"RTCM3","format":"RTCM_3.3","msg":"BCEP00BKG0: Get data in RTCM 3.x format","v":1}
+{"time":"2025-11-17T13:49:40.000Z","gpst":"2025-11-17T13:49:58.000","level":"info","component":"ppp","event":"ppp_position","station":"WTZR00DEU0","epoch":"2025-11-17T13:49:10.000","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":"2025-11-17_13:49:10.000 WTZR00DEU0 X = 4075580.2172 ...","v":1}
+</pre>
+  </p>
+  <p>
+    The same in logfmt:
+  </p>
+  <pre><p style="font-family:Monospace">
+time=2025-11-17T13:48:51.000Z gpst=2025-11-17T13:49:09.000 level=info component=stream event=stream_format station=BCEP00BKG0 decoder=RTCM3 format=RTCM_3.3 msg="BCEP00BKG0: Get data in RTCM 3.x format" v=1
+time=2025-11-17T13:49:40.000Z gpst=2025-11-17T13:49:58.000 level=info component=ppp event=ppp_position station=WTZR00DEU0 epoch=2025-11-17T13:49:10.000 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="2025-11-17_13:49:10.000 WTZR00DEU0 X = 4075580.2172 ..." v=1
+</pre>
+  </p>
 
   <p>
@@ -2927,6 +2989,6 @@
   </p>
 
-  <p><img src="IMG/Figure08.png" width=1000 /></p>
-  <p>Figure 8: BNC translating incoming RTCM Version 3 Observation streams to 15 min RINEX Version 4 Observation files
+  <p><img src="IMG/Figure09.png" width=1000 /></p>
+  <p>Figure 9: BNC translating incoming RTCM Version 3 Observation streams to 15 min RINEX Version 4 Observation files
   </p>
 
@@ -2988,5 +3050,5 @@
 
   <p>
-    Examples (Figure 8) for Mixed RINEX Version 4 GNSS observation filenames, files containing 15 minutes of data,
+    Examples (Figure 9) for Mixed RINEX Version 4 GNSS observation filenames, files containing 15 minutes of data,
     one observation every second, 'MO' standing for 'Mixed Observations':
   </p>
@@ -3529,6 +3591,6 @@
   </p>
 
-  <p><img src="IMG/Figure09.png" width=1000 /></p>
-  <p>Figure 9: BNC saving Broadcast Ephemeris received from an RTCM Version 3 stream in hourly RINEX Version 4 Navigation files</p>
+  <p><img src="IMG/Figure10.png" width=1000 /></p>
+  <p>Figure 10: BNC saving Broadcast Ephemeris received from an RTCM Version 3 stream in hourly RINEX Version 4 Navigation files</p>
 
   <p>
@@ -4083,16 +4145,16 @@
     An example configuration with plot results can be seen below.
   </p>
-  <p><img src="IMG/Figure10.png" width=1000 /></p>
-  <p>Figure 10: Example for creating RINEX quality check analysis graphics output with BNC</p>
-
   <p><img src="IMG/Figure11.png" width=1000 /></p>
-  <p>Figure 11: Example for satellite availability, elevation and PDOP plots as a result of a RINEX quality check
+  <p>Figure 11: Example for creating RINEX quality check analysis graphics output with BNC</p>
+
+  <p><img src="IMG/Figure12.png" width=1000 /></p>
+  <p>Figure 12: Example for satellite availability, elevation and PDOP plots as a result of a RINEX quality check
     analysis with BNC</p>
 
-  <p><img src="IMG/Figure12.png" width=1000 /></p>
-  <p>Figure 12: Sky plot examples for multipath, part of RINEX quality check analysis with BNC</p>
-
   <p><img src="IMG/Figure13.png" width=1000 /></p>
-  <p>Figure 13: Sky plot examples for signal-to-noise ratio, part of RINEX quality check analysis with BNC</p>
+  <p>Figure 13: Sky plot examples for multipath, part of RINEX quality check analysis with BNC</p>
+
+  <p><img src="IMG/Figure14.png" width=1000 /></p>
+  <p>Figure 14: Sky plot examples for signal-to-noise ratio, part of RINEX quality check analysis with BNC</p>
 
   <p>
@@ -4167,9 +4229,9 @@
   </p>
 
-  <p><img src="IMG/Figure14.png" width=500 /></p>
-  <p>Figure 14: Example for BNC's 'RINEX Editing Options' window</p>
-
-  <p><img src="IMG/Figure15.png" width=1000 /></p>
-  <p>Figure 15: Example for RINEX file concatenation with BNC</p>
+  <p><img src="IMG/Figure15.png" width=500 /></p>
+  <p>Figure 15: Example for BNC's 'RINEX Editing Options' window</p>
+
+  <p><img src="IMG/Figure16.png" width=1000 /></p>
+  <p>Figure 16: Example for RINEX file concatenation with BNC</p>
 
   <p>
@@ -4463,6 +4525,7 @@
     sampled files: comparing two daily files with 30-second sampling (2880 epochs) takes a few seconds.
   </p>
-  <p><img src="IMG/Figure16.png" width=800 /></p>
-  <p>Figure 16: Example for comparing two SP3 files with satellite orbit and clock data using BNC</p>
+  <p><img src="IMG/Figure17.png" width=800 /></p>
+  <p>Figure 17: Example for comparing two SP3 files with satellite orbit and clock data using BNC (IGS real-time
+    combination and GFZ rapid product of 15 October 2026)</p>
 
   <p>
@@ -4500,9 +4563,12 @@
   </p>
   <p>
-    The following is an example for a SP3 Comparison logfile:
+    The following is an example for a SP3 Comparison logfile, the comparison of the IGS real-time combination of
+    15 October 2026 produced by BNC with the GFZ rapid product (example configuration '21_CompareSp3.bnc', GLONASS
+    satellite R08 excluded). Shown are the Galileo satellites of one epoch and the Galileo part of the summary
+    followed by the summary lines of all systems:
   </p>
   <pre><p style="font-family:Monospace">
-! SP3 File 1: Input/CNE1MGXRTS_20222410000_01D_05S_ORB.SP3
-! SP3 File 2: Input/BKG1MGXRTS_20222410000_01D_05S_ORB.SP3
+! SP3 File 1: Input/CMB0MGXRTS_20262880000_01D_05M_ORB.SP3
+! SP3 File 2: Input/GBM0MGXRAP_20262880000_01D_05M_ORB.SP3
 !
 ! Clock residuals and orbit differences in [m]
@@ -4511,25 +4577,34 @@
 !  Epoch                PRN  radial   along   out        clk    clkRed   iPRN      SIS
 ! -------------------------------------------------------------------------------------
-2022-08-29_08:01:30.000 G01  0.0297 -0.0526 -0.0198    -0.0005 -0.0301     1   0.8412
+2026-10-15_08:00:00.000 G02 -0.0152  0.0067 -0.0277    -0.0331 -0.0179     2   0.1491
 ..
-2022-08-29_08:01:30.000 E02 -0.0023  0.1159 -0.0047     0.0187  0.0210    64   0.0135
-2022-08-29_08:01:30.000 E03 -0.0567 -0.0411  0.0146    -0.0093  0.0474    65  -0.0097
-2022-08-29_08:01:30.000 E04  0.0695 -0.0406  0.0880    -0.0219 -0.0914    66   0.0265
-2022-08-29_08:01:30.000 E05 -0.1042  0.1161 -0.0503    -0.0101  0.0942    67  -0.0869
-2022-08-29_08:01:30.000 E07  0.0354  0.0384 -0.0346     0.0134 -0.0219    69   0.1123
-2022-08-29_08:01:30.000 E08 -0.0312  0.0312 -0.0481     0.0130  0.0442    70   0.0575
-2022-08-29_08:01:30.000 E09 -0.0548  0.1941  0.0263    -0.0113  0.0436    71  -0.0135
-2022-08-29_08:01:30.000 E12  0.0402 -0.0023  0.0012    -0.0051 -0.0454    74   0.1628
-2022-08-29_08:01:30.000 E13  0.0420 -0.0608 -0.0525    -0.0006 -0.0427    75   0.1109
-2022-08-29_08:01:30.000 E15  0.0478  0.0348 -0.0353    -0.0122 -0.0600    77   0.0064
-2022-08-29_08:01:30.000 E21  0.0639  0.0033  0.0292    -0.0167 -0.0806    83   0.1190
-2022-08-29_08:01:30.000 E24  0.0900 -0.1113 -0.0385     0.0047 -0.0853    86  -0.0094
-2022-08-29_08:01:30.000 E25  0.0106  0.0340 -0.0564     0.0023 -0.0083    87  -0.0713
-2022-08-29_08:01:30.000 E26  0.0598  0.0506 -0.0983    -0.0011 -0.0609    88   0.0310
-2022-08-29_08:01:30.000 E27  0.0763 -0.0972 -0.0480     0.0041 -0.0722    89  -0.0293
-2022-08-29_08:01:30.000 E30  0.0385  0.0266  0.0028     0.0092 -0.0293    92  -0.0389
-2022-08-29_08:01:30.000 E31  0.1017 -0.1834 -0.0211     0.0021 -0.0997    93  -0.0114
-2022-08-29_08:01:30.000 E33  0.0827  0.0385 -0.0741    -0.0060 -0.0887    95   0.0877
-2022-08-29_08:01:30.000 E36  0.0099 -0.0769  0.0384     0.0269  0.0170    98   0.0620
+2026-10-15_08:00:00.000 E02 -0.0112 -0.0397 -0.0125    -0.0039  0.0074    64   0.0916
+2026-10-15_08:00:00.000 E03  0.0112 -0.0124  0.0274     0.0090 -0.0021    65   0.1746
+2026-10-15_08:00:00.000 E04  0.0063 -0.0358 -0.0017    -0.0006 -0.0069    66   0.1577
+2026-10-15_08:00:00.000 E05 -0.0057  0.0270 -0.0235     0.0191  0.0248    67   0.1017
+2026-10-15_08:00:00.000 E06  0.0005 -0.0069  0.0065    -0.0198 -0.0202    68   0.0128
+2026-10-15_08:00:00.000 E07 -0.0129  0.0170  0.0598    -0.0192 -0.0063    69   0.0507
+2026-10-15_08:00:00.000 E08  0.0040 -0.0084  0.0515    -0.0114 -0.0155    70   0.1237
+2026-10-15_08:00:00.000 E09  0.0038  0.0161  0.0107     0.0007 -0.0031    71  -0.0583
+2026-10-15_08:00:00.000 E10 -0.0212  0.0059 -0.0181    -0.0034  0.0178    72  -0.0134
+2026-10-15_08:00:00.000 E11 -0.0082  0.0119 -0.0273     0.0187  0.0268    73   0.1498
+2026-10-15_08:00:00.000 E12 -0.0392  0.0342 -0.0233    -0.0369  0.0023    74  -0.0305
+2026-10-15_08:00:00.000 E13 -0.0193  0.0405 -0.0440     0.0199  0.0392    75  -0.0210
+2026-10-15_08:00:00.000 E15 -0.0210  0.0090 -0.0067     0.0064  0.0274    77  -0.0141
+2026-10-15_08:00:00.000 E16 -0.0083  0.0337 -0.0397    -0.0014  0.0068    78  -0.1479
+2026-10-15_08:00:00.000 E19  0.0157 -0.0034 -0.0009    -0.0083 -0.0240    81   0.0610
+2026-10-15_08:00:00.000 E21 -0.0195  0.1034 -0.0660     0.0051  0.0246    83  -0.1508
+2026-10-15_08:00:00.000 E23  0.0328  0.0031 -0.0086     0.0132 -0.0196    85  -0.1854
+2026-10-15_08:00:00.000 E25  0.0064 -0.0035  0.0034    -0.0038 -0.0102    87  -0.0991
+2026-10-15_08:00:00.000 E26 -0.0111  0.0415 -0.0373    -0.0272 -0.0161    88   0.0156
+2026-10-15_08:00:00.000 E27 -0.0243  0.0547 -0.0037     0.0242  0.0485    89  -0.0749
+2026-10-15_08:00:00.000 E28  0.0305 -0.0921  0.0141    -0.0016 -0.0321    90  -0.1856
+2026-10-15_08:00:00.000 E29 -0.0140  0.0443  0.0768    -0.0077  0.0063    91   0.0349
+2026-10-15_08:00:00.000 E30 -0.0306  0.0095  0.0201     0.0158  0.0464    92  -0.1109
+2026-10-15_08:00:00.000 E31 -0.0136 -0.0576 -0.0028     0.0052  0.0188    93  -0.0022
+2026-10-15_08:00:00.000 E32  0.0183 -0.0248  0.0379     0.0027 -0.0156    94  -0.2392
+2026-10-15_08:00:00.000 E33 -0.0154  0.0152  0.0007    -0.0495 -0.0341    95   0.1444
+2026-10-15_08:00:00.000 E34 -0.0174  0.0154  0.0030     0.0136  0.0310    96   0.0063
+2026-10-15_08:00:00.000 E36  0.0219 -0.0136  0.0173     0.0408  0.0189    98   0.0672
 ..
 ! Summary
@@ -4540,31 +4615,37 @@
 ! -------------------------------------------------------------------------------------------------------------------------------------
 ..
-!     E02        7.2      116.0       26.7      119.2     165       0.04       0.05       0.05       165     -0.12       42.6      14.9
-!     E03       61.0       38.7       15.1       73.8     165       0.03       0.21       0.03       165     -0.13       25.3      10.2
-!     E04       83.0       61.9       81.9      132.0     165       0.04       0.28       0.02       165      0.22       18.4       4.8
-!     E05       96.6      119.3       41.8      159.1     165       0.02       0.32       0.01       165     -0.02       89.2       3.0
-!     E07       29.6       30.9       38.9       57.8     165       0.03       0.10       0.02       165     -0.30      119.6       5.3
-!     E08       37.1       19.3       42.4       59.5     165       0.03       0.12       0.02       165     -0.34       65.0       5.1
-!     E09       43.6      174.4       42.2      184.6     165       0.01       0.14       0.01       165     -0.10       13.7       4.1
-!     E12       49.0        3.3       10.7       50.2     165       0.01       0.16       0.01       165     -0.39      166.2       4.1
-!     E13       33.6       39.3       66.1       83.9     165       0.02       0.11       0.03       165     -0.23      101.7       8.5
-!     E15       54.8       27.3       37.5       71.8     165       0.02       0.18       0.01       165      0.18        3.7       3.6
-!     E21       66.7       11.6       30.1       74.2     165       0.03       0.22       0.02       165     -0.13      105.3       6.9
-!     E24       91.3      110.1       33.2      146.9     165       0.02       0.30       0.02       165      0.32        5.9       4.8
-!     E25        9.9       41.2       62.8       75.8     165       0.01       0.03       0.01       165      0.27       70.1       3.0
-!     E26       62.1       51.6       94.6      124.4     165       0.01       0.21       0.01       165      0.10       32.3       3.9
-!     E27       73.4       84.1       52.2      123.2     165       0.02       0.24       0.01       165      0.34       28.3       2.6
-!     E30       38.2       38.0        7.2       54.4     165       0.02       0.13       0.01       165      0.23       30.4       4.5
-!     E31       93.7      170.0       23.4      195.5     165       0.03       0.31       0.04       165      0.37       21.1      11.9
-!     E33       92.6       34.0       65.4      118.4     165       0.01       0.31       0.01       165      0.00       91.6       4.4
-!     E36        5.9       63.0       45.6       78.0     165       0.03       0.02       0.02       165     -0.26       83.4       6.0
+!     E02       27.4       43.3       25.9       57.5     288       0.06       0.07       0.07       288     -0.33       85.2      13.7
+!     E03        9.9       37.0       28.3       47.7     288       0.05       0.05       0.05       288     -0.58      179.4      13.4
+!     E04       14.5       29.1       20.4       38.3     288       0.08       0.04       0.04       288     -0.50      150.3      12.2
+!     E05       13.0       36.6       26.4       47.0     288       0.06       0.05       0.05       288     -0.42      126.3      15.6
+!     E06       12.6       26.8       20.2       35.9     288       0.06       0.05       0.05       288      0.02       16.9      13.6
+!     E07       13.1       25.1       29.0       40.5     288       0.03       0.05       0.05       288     -0.15       48.2      14.3
+!     E08        9.4       29.4       29.8       43.0     288       0.07       0.06       0.06       288     -0.36      112.8      18.9
+!     E09       16.3       28.0       20.0       38.1     288       0.06       0.05       0.05       288      0.20       66.3      13.1
+!     E10       16.6       45.9       32.4       58.6     288       0.07       0.06       0.06       288     -0.01       18.1      17.8
+!     E11       23.6       40.4       26.2       53.6     286       0.11       0.08       0.08       286     -0.59      166.4      21.0
+!     E12       23.8       41.7       32.2       57.8     286       0.10       0.07       0.07       286      0.09       38.1      20.6
+!     E13       16.2       30.4       25.8       43.0     286       0.06       0.06       0.06       286     -0.06       23.1      18.4
+!     E15       13.7       39.3       15.6       44.4     288       0.05       0.06       0.06       288     -0.04       21.5      17.5
+!     E16       27.2       59.7       40.9       77.4     288       0.08       0.07       0.07       288      0.47      151.6      19.4
+!     E19       12.5       25.7       16.3       32.9     288       0.08       0.07       0.07       288     -0.12       50.2      20.2
+!     E21       26.2       58.3       42.1       76.5     288       0.06       0.07       0.07       288      0.42      137.4      20.1
+!     E23       23.0       39.9       22.0       51.1     282       0.06       0.06       0.06       282      0.68      204.6      17.1
+!     E25       19.5       45.1       24.9       55.1     288       0.06       0.05       0.05       288      0.36      108.5      13.8
+!     E26       19.9       29.7       29.3       46.2     288       0.09       0.05       0.05       288      0.00       14.2      13.9
+!     E27       25.0       45.4       39.0       64.8     288       0.07       0.08       0.08       288      0.09       46.2      16.8
+!     E28       18.7       49.2       27.4       59.3     288       0.06       0.06       0.06       288      0.73      209.5      16.0
+!     E29       12.1       34.4       36.4       51.5     288       0.04       0.05       0.05       288     -0.14       36.9      14.5
+!     E30       31.7       59.3       40.4       78.5     288       0.08       0.06       0.06       288      0.22       76.0      14.6
+!     E31       15.9       43.2       27.1       53.4     288       0.05       0.05       0.05       288     -0.06       13.8      11.3
+!     E32       13.6       49.3       37.6       63.4     288       0.08       0.08       0.07       288      0.85      248.9      21.4
+!     E33       18.9       24.8       36.8       48.3     288       0.10       0.07       0.07       288     -0.37      119.9      18.1
+!     E34       20.3       31.5       19.7       42.3     288       0.06       0.06       0.06       288     -0.12       35.3      17.3
+!     E36       16.7       43.2       28.6       54.4     288       0.07       0.05       0.05       288     -0.29       84.5      13.4
 ..
-!       E       61.4       81.5       48.6      113.1    3135       0.02       0.21       0.18      3135                 73.3       6.7
-!       G       37.6       60.0       40.9       81.8    4620       0.02       0.13       0.13      4620                816.9       5.5
-!       R       71.0      127.0      114.0      184.8    2640       0.04       0.24       0.24      2640                820.2      15.0
 </p>
 </pre>
   <p>
-    The first part of this output following string 'following string' uses the following abbreviations:
+    The first part of this output (one line per epoch and satellite) uses the following abbreviations:
   </p>
 
@@ -4672,7 +4753,9 @@
   </table>
   <br>
-  <p><img src="IMG/Figure17.png" width=1000 /></p>
-  <p>Figure 17: Graphical results from an example comparison of two SP3 files with satellite orbit and clock data using
-    BNC</p>
+  <p><img src="IMG/Figure18.png" width=1000 /></p>
+  <p>Figure 18: Graphical results from an example comparison of two SP3 files with satellite orbit and clock data using
+    BNC: Galileo orbit and clock differences between the IGS real-time combination and the GFZ rapid product on
+    15 October 2026 (plotted with 'scripts/compareSP3Plot.pl'). The signal-in-space differences 'SIS' (bottom)
+    contain the constant satellite-specific clock offsets, which are removed in the clock residuals.</p>
 
   <p>
@@ -5195,6 +5278,6 @@
   </p>
 
-  <p><img src="IMG/Figure18.png" width=1000 /></p>
-  <p>Figure 18: Example for pulling, saving and output of Broadcast Corrections using BNC</p>
+  <p><img src="IMG/Figure19.png" width=1000 /></p>
+  <p>Figure 19: Example for pulling, saving and output of Broadcast Corrections using BNC</p>
 
   <p>
@@ -5685,6 +5768,6 @@
     to feed a GNSS engine via IP port output.
   </p>
-  <p><img src="IMG/Figure19.png" width=1000 /></p>
-  <p>Figure 19: Synchronized BNC output via IP port to feed a GNSS real-time engine</p>
+  <p><img src="IMG/Figure20.png" width=1000 /></p>
+  <p>Figure 20: Synchronized BNC output via IP port to feed a GNSS real-time engine</p>
 
   <p>
@@ -5799,6 +5882,6 @@
   </p>
 
-  <p><img src="IMG/Figure20.png" width=1000 /></p>
-  <p>Figure 20: Flowcharts, BNC forwarding a stream to a serially connected receiver; sending NMEA sentences is
+  <p><img src="IMG/Figure21.png" width=1000 /></p>
+  <p>Figure 21: Flowcharts, BNC forwarding a stream to a serially connected receiver; sending NMEA sentences is
     mandatory for VRS streams</p>
 
@@ -5809,6 +5892,6 @@
   </p>
 
-  <p><img src="IMG/Figure21.png" width=1000 /></p>
-  <p>Figure 21: BNC pulling a RTCM Version 3 stream to feed a serial connected receiver with observations from a nearby
+  <p><img src="IMG/Figure22.png" width=1000 /></p>
+  <p>Figure 22: BNC pulling a RTCM Version 3 stream to feed a serial connected receiver with observations from a nearby
     reference station for conventional RTK</p>
 
@@ -6102,6 +6185,6 @@
     recorded every 2 seconds.
   </p>
-  <p><img src="IMG/Figure22.png" width=1000 /></p>
-  <p>Figure 22: RTCM message numbers, latencies and observation types logged by BNC</p>
+  <p><img src="IMG/Figure23.png" width=1000 /></p>
+  <p>Figure 23: RTCM message numbers, latencies and observation types logged by BNC</p>
 
 
@@ -6303,6 +6386,6 @@
     post processing PPP.
   </p>
-  <p><img src="IMG/Figure23.png" width=1000 /></p>
-  <p>Figure 23: Real-time Precise Point Positioning with BNC, PPP Panel 1</p>
+  <p><img src="IMG/Figure24.png" width=1000 /></p>
+  <p>Figure 24: Real-time Precise Point Positioning with BNC, PPP Panel 1</p>
 
   <p>
@@ -7433,6 +7516,6 @@
   </p>
 
-  <p><img src="IMG/Figure24.png" width=1000 /></p>
-  <p>Figure 24: Precise Point Positioning with BNC, PPP Panel 2</p>
+  <p><img src="IMG/Figure25.png" width=1000 /></p>
+  <p>Figure 25: Precise Point Positioning with BNC, PPP Panel 2</p>
 
   <p>
@@ -7957,6 +8040,6 @@
   </p>
 
-  <p><img src="IMG/Figure25.png" width=1000 /></p>
-  <p>Figure 25: Precise Point Positioning with BNC, PPP Panel 3</p>
+  <p><img src="IMG/Figure26.png" width=1000 /></p>
+  <p>Figure 26: Precise Point Positioning with BNC, PPP Panel 3</p>
 
   <p>
@@ -8105,9 +8188,9 @@
   </p>
 
-  <p><img src="IMG/Figure26.png" width=1000 /></p>
-  <p>Figure 26: Real-time Precise Point Positioning with BNC with track of positions using OpenStreetMap, PPP Panel 4</p>
-
   <p><img src="IMG/Figure27.png" width=1000 /></p>
-  <p>Figure 27: Precise Point Positioning with BNC in post processing mode with track of positions using OpenStreetMap, PPP Panel 4</p>
+  <p>Figure 27: Real-time Precise Point Positioning with BNC with track of positions using OpenStreetMap, PPP Panel 4</p>
+
+  <p><img src="IMG/Figure28.png" width=1000 /></p>
+  <p>Figure 28: Precise Point Positioning with BNC in post processing mode with track of positions using OpenStreetMap, PPP Panel 4</p>
 
 
@@ -8276,6 +8359,6 @@
     The following screenshot shows an example setup of BNC when combining several Broadcast Correction streams.
   </p>
-  <p><img src="IMG/Figure28.png" width=1000 /></p>
-  <p>Figure 28: BNC combining Broadcast Correction streams</p>
+  <p><img src="IMG/Figure29.png" width=1000 /></p>
+  <p>Figure 29: BNC combining Broadcast Correction streams</p>
 
   <p>
@@ -8470,6 +8553,6 @@
     domain.
   </p>
-  <p><img src="IMG/Figure29.png" width=1000 /></p>
-  <p>Figure 29: 'INTERNAL' PPP with BNC using a combination of Broadcast Corrections</p>
+  <p><img src="IMG/Figure30.png" width=1000 /></p>
+  <p>Figure 30: 'INTERNAL' PPP with BNC using a combination of Broadcast Corrections</p>
 
   <p>
@@ -9083,6 +9166,6 @@
     Required Broadcast Ephemeris are received via stream 'BCEP00BKG0'.
   </p>
-  <p><img src="IMG/Figure30.png" width=1000 /></p>
-  <p>Figure 30: BNC producing Broadcast Corrections from incoming precise orbits and clocks and uploading them to an
+  <p><img src="IMG/Figure31.png" width=1000 /></p>
+  <p>Figure 31: BNC producing Broadcast Corrections from incoming precise orbits and clocks and uploading them to an
     Ntrip Broadcaster</p>
 
@@ -9359,6 +9442,6 @@
     IGS20/ITRF2020 into your own target system.
   </p>
-  <p><img src="IMG/Figure31.png" width=700 /></p>
-  <p>Figure 31: Setting BNC's Custom Transformation Parameters window</p>
+  <p><img src="IMG/Figure32.png" width=700 /></p>
+  <p>Figure 32: Setting BNC's Custom Transformation Parameters window</p>
 
   <p>
@@ -9838,6 +9921,6 @@
     received via stream 'BCEP00BKG0'.
   </p>
-  <p><img src="IMG/Figure32.png" width=1000 /></p>
-  <p>Figure 32: BNC uploading a combined Broadcast Correction stream</p>
+  <p><img src="IMG/Figure33.png" width=1000 /></p>
+  <p>Figure 33: BNC uploading a combined Broadcast Correction stream</p>
   <p></p>
 
@@ -9927,6 +10010,6 @@
   every 5 seconds.
   </p>
-  <p><img src="IMG/Figure33.png" width=1000 /></p>
-  <p>Figure 33: BNC producing Broadcast Ephemeris streams from globally distributed RTCM streams; upload in RTCM format
+  <p><img src="IMG/Figure34.png" width=1000 /></p>
+  <p>Figure 34: BNC producing Broadcast Ephemeris streams from globally distributed RTCM streams; upload in RTCM format
     to an Ntrip Broadcaster</p>
 
@@ -10140,6 +10223,6 @@
     The following figure shows an example for the bandwidth consumption of incoming streams.
   </p>
-  <p><img src="IMG/Figure34.png" width=1000 /></p>
-  <p>Figure 34: Bandwidth consumption of RTCM streams received by BNC</p>
+  <p><img src="IMG/Figure35.png" width=1000 /></p>
+  <p>Figure 35: Bandwidth consumption of RTCM streams received by BNC</p>
   <p>
   <h4 id="latency">2.19.3 Latency</h4>
@@ -10152,6 +10235,6 @@
     of incoming streams.
   </p>
-  <p><img src="IMG/Figure35.png" width=1000 /></p>
-  <p>Figure 35: Latency of RTCM streams received by BNC</p>
+  <p><img src="IMG/Figure36.png" width=1000 /></p>
+  <p>Figure 36: Latency of RTCM streams received by BNC</p>
 
   <p>
@@ -10169,6 +10252,6 @@
     coordinate displacements.
   </p>
-  <p><img src="IMG/Figure36.png" width=1000 /></p>
-  <p>Figure 36: Example for time series plot of displacements produced by BNC</p>
+  <p><img src="IMG/Figure37.png" width=1000 /></p>
+  <p>Figure 37: Example for time series plot of displacements produced by BNC</p>
 
   <p>
@@ -10180,6 +10263,6 @@
     to select one of several input communication links, see figure below.
   </p>
-  <p><img src="IMG/Figure37.png" width=400 /></p>
-  <p>Figure 37: Steam input communication links accepted by BNC</p>
+  <p><img src="IMG/Figure38.png" width=400 /></p>
+  <p>Figure 38: Steam input communication links accepted by BNC</p>
 
   <p>
@@ -10219,6 +10302,6 @@
     A window opens which allows selecting a broadcaster for stream retrieval, see figure below.
   </p>
-  <p><img src="IMG/Figure38.png" width=1000 /></p>
-  <p>Figure 38: BNC's 'Select Broadcaster' table</p>
+  <p><img src="IMG/Figure39.png" width=1000 /></p>
+  <p>Figure 39: BNC's 'Select Broadcaster' table</p>
 
   <p>
@@ -10363,6 +10446,6 @@
     retrieving streams from different casters.
   </p>
-  <p><img src="IMG/Figure39.png" width=1000 /></p>
-  <p>Figure 39: Broadcaster source-table shown by BNC</p>
+  <p><img src="IMG/Figure40.png" width=1000 /></p>
+  <p>Figure 40: Broadcaster source-table shown by BNC</p>
 
   <p>
@@ -10423,6 +10506,6 @@
     Left button: draw a rectangle to zoom, right button: zoom out, middle button: zoom back.
   </p>
-  <p><img src="IMG/Figure40.png" width=1000 /></p>
-  <p>Figure 40: Stream distribution map shown by BNC as derived from Ntrip Broadcaster source-table</p>
+  <p><img src="IMG/Figure41.png" width=1000 /></p>
+  <p>Figure 41: Stream distribution map shown by BNC as derived from Ntrip Broadcaster source-table</p>
 
   <p>
@@ -10536,6 +10619,6 @@
     The following figure shows a BNC example setup for pulling a stream via serial port on a Windows operating system.
   </p>
-  <p><img src="IMG/Figure41.png" width=400 /></p>
-  <p>Figure 41: BNC configuration for pulling a stream via serial port</p>
+  <p><img src="IMG/Figure42.png" width=400 /></p>
+  <p>Figure 42: BNC configuration for pulling a stream via serial port</p>
 
   <p>
@@ -11063,4 +11146,6 @@
 General Panel keys:
    logFile          {Logfile, full path [character string]}
+   logFileStructured {Structured logfile in addition to the logfile, full path [character string]}
+   logFormatStructured {Format of the structured logfile [character string: json|logfmt]}
    rnxAppend        {Append files [integer number: 0=no,2=yes]}
    onTheFlyInterval {Configuration reload interval [character string: no|1 day|1 hour|5 min|1 min]}
Index: trunk/BNC/src/bnclog.cpp
===================================================================
--- trunk/BNC/src/bnclog.cpp	(revision 11179)
+++ trunk/BNC/src/bnclog.cpp	(revision 11179)
@@ -0,0 +1,273 @@
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Client
+ * -------------------------------------------------------------------------
+ *
+ * Class:      t_logRecord
+ *
+ * Purpose:    Record of the structured logfile (JSON Lines or logfmt)
+ *
+ * Created:    04-Nov-2026
+ *
+ * Changes:
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <cmath>
+
+#include <QMutex>
+#include <QSet>
+#include <QString>
+
+#include "bnclog.h"
+#include "bncutils.h"
+
+namespace {
+
+QMutex          stationMutex;
+QSet<QByteArray> stations;
+
+// text as UTF-8 (BNC's messages are Latin-1)
+QByteArray utf8(const QByteArray& latin1) {
+  return QString::fromLatin1(latin1).toUtf8();
+}
+
+QByteArray jsonString(const QByteArray& latin1) {
+  QByteArray in = utf8(latin1);
+  QByteArray out = "\"";
+  for (char c : in) {
+    unsigned char u = static_cast<unsigned char>(c);
+    switch (c) {
+      case '"':  out += "\\\""; break;
+      case '\\': out += "\\\\"; break;
+      case '\n': out += "\\n";  break;
+      case '\r': out += "\\r";  break;
+      case '\t': out += "\\t";  break;
+      default:
+        if (u < 0x20) {
+          out += QByteArray("\\u00") + QByteArray::number(u, 16).rightJustified(2, '0');
+        }
+        else {
+          out += c;
+        }
+    }
+  }
+  return out + "\"";
+}
+
+QByteArray logfmtValue(const QByteArray& latin1) {
+  QByteArray in = utf8(latin1);
+  bool quote = in.isEmpty();
+  for (char c : in) {
+    unsigned char u = static_cast<unsigned char>(c);
+    if (u <= 0x20 || c == '=' || c == '"' || c == '\\') {
+      quote = true;
+      break;
+    }
+  }
+  if (!quote) {
+    return in;
+  }
+  QByteArray out = "\"";
+  for (char c : in) {
+    unsigned char u = static_cast<unsigned char>(c);
+    switch (c) {
+      case '"':  out += "\\\""; break;
+      case '\\': out += "\\\\"; break;
+      case '\n': out += "\\n";  break;
+      case '\r': out += "\\r";  break;
+      case '\t': out += "\\t";  break;
+      default:
+        if (u < 0x20) {
+          out += QByteArray("\\u00") + QByteArray::number(u, 16).rightJustified(2, '0');
+        }
+        else {
+          out += c;
+        }
+    }
+  }
+  return out + "\"";
+}
+
+bool containsWord(const QByteArray& lower, const char* word) {
+  return lower.contains(word);
+}
+
+}
+
+// Envelope of a plain text message
+////////////////////////////////////////////////////////////////////////////
+t_logRecord t_logRecord::fromMessage(const QByteArray& msg) {
+  t_logRecord rec(info, "bnc", "message", "", msg);
+
+  // station: first token of the text, if it is a known station name
+  int end = 0;
+  while (end < msg.size() && msg[end] != ':' && msg[end] != ' ' && msg[end] != '(') {
+    ++end;
+  }
+  if (end > 0) {
+    QByteArray token = msg.left(end);
+    QMutexLocker locker(&stationMutex);
+    if (stations.contains(token)) {
+      rec._station = token;
+    }
+  }
+
+  // level from keywords
+  QByteArray lower = msg.toLower();
+  static const char* errorWords[] = {"error", "fail", "cannot", "can't", "could not",
+                                     "unable", "exception", 0};
+  static const char* warningWords[] = {"warning", "outage", "corrupt", "timeout",
+                                       "wrong", "invalid", "ignored", "refused",
+                                       "unauthorized", "not found", "missing",
+                                       "unknown", 0};
+  for (int ii = 0; errorWords[ii]; ii++) {
+    if (containsWord(lower, errorWords[ii])) {
+      rec._level = error;
+      return rec;
+    }
+  }
+  for (int ii = 0; warningWords[ii]; ii++) {
+    if (containsWord(lower, warningWords[ii])) {
+      rec._level = warning;
+      return rec;
+    }
+  }
+  return rec;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+t_logRecord& t_logRecord::add(const char* key, double value, int precision) {
+  t_field ff;
+  ff._key      = key;
+  ff._isString = false;
+  if (std::isfinite(value)) {
+    ff._value = QByteArray::number(value, 'f', precision);   // C locale
+  }
+  else {
+    ff._value = "null";
+  }
+  _fields.append(ff);
+  return *this;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+t_logRecord& t_logRecord::add(const char* key, int value) {
+  t_field ff;
+  ff._key      = key;
+  ff._value    = QByteArray::number(value);
+  ff._isString = false;
+  _fields.append(ff);
+  return *this;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+t_logRecord& t_logRecord::add(const char* key, bool value) {
+  t_field ff;
+  ff._key      = key;
+  ff._value    = value ? "true" : "false";
+  ff._isString = false;
+  _fields.append(ff);
+  return *this;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+t_logRecord& t_logRecord::add(const char* key, const QByteArray& value) {
+  t_field ff;
+  ff._key      = key;
+  ff._value    = value;
+  ff._isString = true;
+  _fields.append(ff);
+  return *this;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+t_logRecord& t_logRecord::addTime(const char* key, const QDateTime& utc) {
+  QDateTime tt = utc.toUTC();
+  return add(key, tt.toString("yyyy-MM-ddThh:mm:ss.zzzZ").toLatin1());
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+const char* t_logRecord::levelString(e_level level) {
+  switch (level) {
+    case warning: return "warning";
+    case error:   return "error";
+    default:      return "info";
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+t_logRecord::e_format t_logRecord::formatFromString(const QString& str) {
+  return (str.trimmed().toLower() == "logfmt") ? logfmt : json;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void t_logRecord::registerStation(const QByteArray& station) {
+  if (station.isEmpty()) {
+    return;
+  }
+  QMutexLocker locker(&stationMutex);
+  stations.insert(station);
+}
+
+// One line of the structured logfile
+////////////////////////////////////////////////////////////////////////////
+QByteArray t_logRecord::encode(e_format format, const QDateTime& gpst) const {
+
+  // UTC = GPS time - leap seconds
+  QDate dd = gpst.date();
+  QDateTime utc = gpst.addSecs(-gnumleap(dd.year(), dd.month(), dd.day()));
+
+  QByteArray msg = _msg;
+  while (msg.startsWith('\n')) {
+    msg.remove(0, 1);
+  }
+
+  QVector<t_field> all;
+  auto put = [&all](const char* key, const QByteArray& value, bool isString) {
+    t_field ff;
+    ff._key = key; ff._value = value; ff._isString = isString;
+    all.append(ff);
+  };
+  put("time",      utc.toString("yyyy-MM-ddThh:mm:ss.zzz").toLatin1() + "Z", true);
+  put("gpst",      gpst.toString("yyyy-MM-ddThh:mm:ss.zzz").toLatin1(), true);
+  put("level",     levelString(_level), true);
+  put("component", _component, true);
+  put("event",     _event, true);
+  if (!_station.isEmpty()) {
+    put("station", _station, true);
+  }
+  all += _fields;
+  put("msg", msg, true);
+  put("v",   QByteArray::number(version), false);
+
+  QByteArray line;
+  if (format == logfmt) {
+    for (int ii = 0; ii < all.size(); ii++) {
+      if (ii) {
+        line += ' ';
+      }
+      line += all[ii]._key + '=';
+      line += all[ii]._isString ? logfmtValue(all[ii]._value) : all[ii]._value;
+    }
+  }
+  else {
+    line = "{";
+    for (int ii = 0; ii < all.size(); ii++) {
+      if (ii) {
+        line += ',';
+      }
+      line += '"' + all[ii]._key + "\":";
+      line += all[ii]._isString ? jsonString(all[ii]._value) : all[ii]._value;
+    }
+    line += '}';
+  }
+  return line;
+}
Index: trunk/BNC/src/bnclog.h
===================================================================
--- trunk/BNC/src/bnclog.h	(revision 11179)
+++ trunk/BNC/src/bnclog.h	(revision 11179)
@@ -0,0 +1,95 @@
+// Part of BNC, a utility for retrieving decoding and
+// converting GNSS data streams from NTRIP broadcasters.
+//
+// Copyright (C) 2007
+// German Federal Agency for Cartography and Geodesy (BKG)
+// http://www.bkg.bund.de
+// Czech Technical University Prague, Department of Geodesy
+// http://www.fsv.cvut.cz
+//
+// Email: euref-ip@bkg.bund.de
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation, version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#ifndef BNCLOG_H
+#define BNCLOG_H
+
+#include <QByteArray>
+#include <QDateTime>
+#include <QMetaType>
+#include <QVector>
+
+// One record of the structured logfile (option logFileStructured).
+//
+// The classic logfile gets the plain text _msg as before. The structured
+// logfile gets one line per record, JSON (JSON Lines) or logfmt:
+//
+//   time gpst level component event [station] [fields ...] msg v
+//
+// Messages that are still emitted as plain text (newMessage(QByteArray,bool))
+// become records with component "bnc" and event "message"; the station is
+// taken from the text prefix if it is a known stream or PPP station, the
+// level from keywords of the text (fromMessage()).
+////////////////////////////////////////////////////////////////////////////
+class t_logRecord {
+ public:
+  enum e_level {info, warning, error};
+  enum e_format {json, logfmt};
+
+  // version of the record layout, field "v"
+  static const int version = 1;
+
+  t_logRecord() : _level(info) {}
+  t_logRecord(e_level level, const QByteArray& component, const QByteArray& event,
+              const QByteArray& station, const QByteArray& msg)
+    : _level(level), _component(component), _event(event), _station(station), _msg(msg) {}
+
+  // envelope of a plain text message
+  static t_logRecord fromMessage(const QByteArray& msg);
+
+  // fields in the order added; numbers are written with the C locale
+  t_logRecord& add(const char* key, double value, int precision);
+  t_logRecord& add(const char* key, int value);
+  t_logRecord& add(const char* key, bool value);
+  t_logRecord& add(const char* key, const QByteArray& value);
+  t_logRecord& addTime(const char* key, const QDateTime& utc);   // ISO 8601, "Z"
+
+  // one line without line end; gpst: time of the record in GPS time
+  QByteArray encode(e_format format, const QDateTime& gpst) const;
+
+  static e_format formatFromString(const QString& str);
+  static const char* levelString(e_level level);
+
+  // station names known for the prefix of plain text messages (thread safe)
+  static void registerStation(const QByteArray& station);
+
+  e_level    _level;
+  QByteArray _component;
+  QByteArray _event;
+  QByteArray _station;
+  QByteArray _msg;
+
+ private:
+  class t_field {
+   public:
+    QByteArray _key;
+    QByteArray _value;      // text, numbers already formatted
+    bool       _isString;
+  };
+  QVector<t_field> _fields;
+};
+
+Q_DECLARE_METATYPE(t_logRecord)
+
+#endif
Index: trunk/BNC/src/bncmain.cpp
===================================================================
--- trunk/BNC/src/bncmain.cpp	(revision 11175)
+++ trunk/BNC/src/bncmain.cpp	(revision 11179)
@@ -147,4 +147,6 @@
         "General Panel keys:\n"
         "   logFile          {Logfile, full path [character string]}\n"
+        "   logFileStructured {Structured logfile in addition to the logfile, full path [character string]}\n"
+        "   logFormatStructured {Format of the structured logfile [character string: json|logfmt]}\n"
         "   rnxAppend        {Append files [integer number: 0=no,2=yes]}\n"
         "   onTheFlyInterval {Configuration reload interval [character string: no|1 day|1 hour|5 min|1 min]}\n"
Index: trunk/BNC/src/bncoutf.cpp
===================================================================
--- trunk/BNC/src/bncoutf.cpp	(revision 11175)
+++ trunk/BNC/src/bncoutf.cpp	(revision 11179)
@@ -187,15 +187,7 @@
   QString newFileName = resolveFileName(GPSweek, datTim);
 
-  bool wait = false;
-  if (isProductFile() &&
-      datTim.time().hour()   == 0 &&
-      datTim.time().minute() == 0 &&
-      (datTim.time().second() == 0.0 ||  datTim.time().second() == _sampl)) {
-    wait = true;
-  }
-
   // Close the file
   // --------------
-  if (newFileName != _fName && !wait) {
+  if (newFileName != _fName) {
     closeFile();
     _headerWritten = false;
@@ -206,17 +198,39 @@
   // --------------------------
   if (!_headerWritten) {
+    _out.clear();
+    _out.width(0);
     _out.setf(ios::showpoint | ios::fixed);
-    if (_append && QFile::exists(_fName)) {
-      _out.open(_fName.toLatin1().data(), ios::out | ios::app);
-    }
-    else {
-      _out.open(_fName.toLatin1().data());
+    bool appended = _append && QFile::exists(_fName);
+    _out.open(_fName.toLatin1().data(), appended ? ios::out | ios::app : ios::out);
+    if (!_out.is_open()) {
+      return failure;
+    }
+    if (!appended) {
       writeHeader(datTim);
     }
-    if (_out.is_open()) {
-      _headerWritten = true;
-    }
-  }
-
+    _headerWritten = true;
+  }
+
+  return success;
+}
+
+// Write a complete epoch (product files): an epoch at the start of a file
+// period (e.g. 00:00:00 for daily files) is written as last epoch into the
+// file of the period before, too
+////////////////////////////////////////////////////////////////////////////
+t_irc bncoutf::writeEpoch(const bncTime& epoTime, const std::string& str) {
+  if (_out.is_open() && isProductFile()) {
+    bncTime   before   = epoTime - 1.0;
+    QDateTime datTim   = dateAndTimeFromGPSweek(epoTime.gpsw(), epoTime.gpssec());
+    QDateTime datTimBf = dateAndTimeFromGPSweek(before.gpsw(), before.gpssec());
+    if (resolveFileName(epoTime.gpsw(), datTim) != _fName &&
+        resolveFileName(before.gpsw(), datTimBf) == _fName) {
+      _out << str;
+    }
+  }
+  if (reopen(epoTime.gpsw(), epoTime.gpssec()) != success) {
+    return failure;
+  }
+  _out << str;
   return success;
 }
Index: trunk/BNC/src/bncoutf.h
===================================================================
--- trunk/BNC/src/bncoutf.h	(revision 11175)
+++ trunk/BNC/src/bncoutf.h	(revision 11179)
@@ -7,4 +7,5 @@
 
 #include "bncutils.h"
+#include "bnctime.h"
 #include <iostream>
 
@@ -19,4 +20,5 @@
  protected:
   virtual t_irc reopen(int GPSweek, double GPSweeks);
+  t_irc         writeEpoch(const bncTime& epoTime, const std::string& str);
   virtual void  writeHeader(const QDateTime& /* datTim */) {}
   virtual void  closeFile();
Index: trunk/BNC/src/bncsettings.cpp
===================================================================
--- trunk/BNC/src/bncsettings.cpp	(revision 11175)
+++ trunk/BNC/src/bncsettings.cpp	(revision 11179)
@@ -78,4 +78,6 @@
         // General
         setValue_p("logFile", "");
+        setValue_p("logFileStructured", "");
+        setValue_p("logFormatStructured", "json");
         setValue_p("rnxAppend", "0");
         setValue_p("onTheFlyInterval", "no");
Index: trunk/BNC/src/bncsinextro.cpp
===================================================================
--- trunk/BNC/src/bncsinextro.cpp	(revision 11175)
+++ trunk/BNC/src/bncsinextro.cpp	(revision 11179)
@@ -256,6 +256,8 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncSinexTro::closeFile() {
-  _out << "-TROP/SOLUTION" << endl;
-  _out << "%=ENDTROP" << endl;
+  if (_out.is_open()) {
+    _out << "-TROP/SOLUTION" << endl;
+    _out << "%=ENDTROP" << endl;
+  }
   bncoutf::closeFile();
 }
Index: trunk/BNC/src/bncsp3.cpp
===================================================================
--- trunk/BNC/src/bncsp3.cpp	(revision 11175)
+++ trunk/BNC/src/bncsp3.cpp	(revision 11179)
@@ -58,4 +58,8 @@
 ////////////////////////////////////////////////////////////////////////////
 bncSP3::~bncSP3() {
+  if (_inpOut == output && _lastEpoTime.valid()) {
+    writeEpoch(_lastEpoTime, _oStr.str()); // last epoch, otherwise printed with the next one
+    closeFile();
+  }
   delete _currEpoch;
   delete _prevEpoch;
@@ -70,50 +74,46 @@
   _oStr.setf(ios::fixed);
 
-  if (reopen(GPSweek, GPSweeks) == success) {
-
-    bncTime epoTime(GPSweek, GPSweeks);
-
-    if (epoTime != _lastEpoTime) {
-
-      // print out epoch before
-      if (_lastEpoTime.valid()) {
-        _out << _oStr.str();
-        if (_lastEpoTime.daysec() != 0.0) {
-          _oStr.str(std::string());
-        }
-        // Check the sampling interval (print empty epochs)
-        // ------------------------------------------------
-        if (_sampl > 0) {
-          for (bncTime ep = _lastEpoTime +_sampl; ep < epoTime; ep = ep +_sampl) {
-            _oStr << "\n*  " << ep.datestr(' ') << ' ' << ep.timestr(8, ' ');
-          }
+  if (_sampl != 0 && fmod(GPSweeks, _sampl) != 0.0) {
+    return failure;
+  }
+
+  bncTime epoTime(GPSweek, GPSweeks);
+
+  if (epoTime != _lastEpoTime) {
+
+    // print out epoch before (complete now)
+    if (_lastEpoTime.valid()) {
+      writeEpoch(_lastEpoTime, _oStr.str());
+      _oStr.str(std::string());
+      // Check the sampling interval (print empty epochs)
+      // ------------------------------------------------
+      if (_sampl > 0) {
+        for (bncTime ep = _lastEpoTime +_sampl; ep < epoTime; ep = ep +_sampl) {
+          _oStr << "\n*  " << ep.datestr(' ') << ' ' << ep.timestr(8, ' ');
         }
       }
-
-      // Print the new epoch
-      // -------------------
-      _oStr << "\n*  " << epoTime.datestr(' ') << ' ' << epoTime.timestr(8, ' ');
-
-      _lastEpoTime = epoTime;
-    }
-
-    _oStr << "\nP" << prn.toLatin1().data()
-         << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km]
-         << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km]
-         << setw(14) << setprecision(6) << xCoM(3) / 1000.0 // [km]
-         << setw(14) << setprecision(6) << sp3Clk * 1e6;     // microseconds
-
-    if (sp3ClkRate) {
-      _oStr << "\nV" << prn.toLatin1().data()
-           << setw(14) << setprecision(6) << v(1) * 10.0      // [dm/s]
-           << setw(14) << setprecision(6) << v(2) * 10.0      // [dm/s]
-           << setw(14) << setprecision(6) << v(3) * 10.0      // [dm/s]
-           << setw(14) << setprecision(6) << sp3ClkRate * 1e2; // 10^⁻4 microseconds/sec
-    }
-    return success;
-  }
-  else {
-    return failure;
-  }
+    }
+
+    // Print the new epoch
+    // -------------------
+    _oStr << "\n*  " << epoTime.datestr(' ') << ' ' << epoTime.timestr(8, ' ');
+
+    _lastEpoTime = epoTime;
+  }
+
+  _oStr << "\nP" << prn.toLatin1().data()
+       << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km]
+       << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km]
+       << setw(14) << setprecision(6) << xCoM(3) / 1000.0 // [km]
+       << setw(14) << setprecision(6) << sp3Clk * 1e6;     // microseconds
+
+  if (sp3ClkRate) {
+    _oStr << "\nV" << prn.toLatin1().data()
+         << setw(14) << setprecision(6) << v(1) * 10.0      // [dm/s]
+         << setw(14) << setprecision(6) << v(2) * 10.0      // [dm/s]
+         << setw(14) << setprecision(6) << v(3) * 10.0      // [dm/s]
+         << setw(14) << setprecision(6) << sp3ClkRate * 1e2; // 10^-4 microseconds/sec
+  }
+  return success;
 }
 
@@ -121,5 +121,7 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncSP3::closeFile() {
-  _out << "\nEOF" << endl;
+  if (_out.is_open()) {
+    _out << "\nEOF" << endl;
+  }
   bncoutf::closeFile();
 }
Index: trunk/BNC/src/bncwindow.cpp
===================================================================
--- trunk/BNC/src/bncwindow.cpp	(revision 11175)
+++ trunk/BNC/src/bncwindow.cpp	(revision 11179)
@@ -199,4 +199,12 @@
   // ---------------
   _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
+  _logFileStructuredLineEdit = new QLineEdit(settings.value("logFileStructured").toString());
+  _logFormatStructuredComboBox = new QComboBox();
+  _logFormatStructuredComboBox->setEditable(false);
+  _logFormatStructuredComboBox->addItems(QString("json,logfmt").split(","));
+  int kLogFmt = _logFormatStructuredComboBox->findText(settings.value("logFormatStructured").toString());
+  if (kLogFmt != -1) {
+    _logFormatStructuredComboBox->setCurrentIndex(kLogFmt);
+  }
   _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
   _ephMountLineEdit = new QLineEdit(settings.value("ephMount").toString());
@@ -846,16 +854,20 @@
   gLayout->addWidget(new QLabel("Logfile (full path)"), 1, 0);
   gLayout->addWidget(_logFileLineEdit, 1, 1, 1, 20);
-  gLayout->addWidget(new QLabel("Append files"), 2, 0);
-  gLayout->addWidget(_rnxAppendCheckBox, 2, 1);
-  gLayout->addWidget(new QLabel("Reread configuration"), 3, 0);
-  gLayout->addWidget(_onTheFlyComboBox, 3, 1);
-  gLayout->addWidget(new QLabel("Auto start"), 4, 0);
-  gLayout->addWidget(_autoStartCheckBox, 4, 1);
-  gLayout->addWidget(new QLabel("Raw output file (full path)"), 5, 0);
-  gLayout->addWidget(_rawOutFileLineEdit, 5, 1, 1, 20);
-  gLayout->addWidget(new QLabel("Ephemeris streams"), 6, 0);
-  gLayout->addWidget(_ephMountLineEdit, 6, 1, 1, 20);
-  gLayout->addWidget(new QLabel(""), 7, 1);
-  gLayout->setRowStretch(7, 999);
+  gLayout->addWidget(new QLabel("Structured logfile"), 2, 0);
+  gLayout->addWidget(_logFileStructuredLineEdit, 2, 1, 1, 15);
+  gLayout->addWidget(new QLabel("  Format"), 2, 16, Qt::AlignRight);
+  gLayout->addWidget(_logFormatStructuredComboBox, 2, 17, 1, 4);
+  gLayout->addWidget(new QLabel("Append files"), 3, 0);
+  gLayout->addWidget(_rnxAppendCheckBox, 3, 1);
+  gLayout->addWidget(new QLabel("Reread configuration"), 4, 0);
+  gLayout->addWidget(_onTheFlyComboBox, 4, 1);
+  gLayout->addWidget(new QLabel("Auto start"), 5, 0);
+  gLayout->addWidget(_autoStartCheckBox, 5, 1);
+  gLayout->addWidget(new QLabel("Raw output file (full path)"), 6, 0);
+  gLayout->addWidget(_rawOutFileLineEdit, 6, 1, 1, 20);
+  gLayout->addWidget(new QLabel("Ephemeris streams"), 7, 0);
+  gLayout->addWidget(_ephMountLineEdit, 7, 1, 1, 20);
+  gLayout->addWidget(new QLabel(""), 8, 1);
+  gLayout->setRowStretch(8, 999);
 
   ggroup->setLayout(gLayout);
@@ -1568,4 +1580,6 @@
   // ------------------
   _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab on the bottom of this window. They can be saved into a file when a valid path for that is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date. <i>[key: logFile]</i></p>"));
+  _logFileStructuredLineEdit->setWhatsThis(tr("<p>In addition to the logfile, BNC can write the same records as a structured logfile for log processing tools: one record per line, either JSON (JSON Lines) or logfmt (key=value pairs separated by blanks). Each record carries the time in UTC ('time', ISO 8601 with 'Z') and in GPS time ('gpst'), a level (info, warning, error), the component (e.g. stream, ppp), the event (e.g. ppp_position, stream_outage_begin), the station if known, the event's fields, the text of the classic logfile ('msg') and the record version ('v').</p><p>Messages without own event are written with component 'bnc' and event 'message'; their level is derived from keywords of the text. The logfile itself remains unchanged.</p><p>The file name will automatically be extended by a string '_YYMMDD' carrying the current date. Default is an empty option field, meaning that no structured logfile is written. <i>[key: logFileStructured]</i></p>"));
+  _logFormatStructuredComboBox->setWhatsThis(tr("<p>Select the format of the structured logfile: 'json' for one JSON object per line (JSON Lines), 'logfmt' for key=value pairs. Default is 'json'. <i>[key: logFormatStructured]</i></p>"));
   _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and file content already available under the same name will be overwritten. However, users might want to append already existing files following a regular restart or a crash of BNC or its platform.</p><p>Tick 'Append files' to continue with existing files and keep what has been recorded so far. <i>[key: rnxAppend]</i></p>"));
   _onTheFlyComboBox->setWhatsThis(tr("<p>When operating BNC online in 'no window' mode, some configuration parameters can be changed on-the-fly without interrupting the running process. For that BNC rereads parts of its configuration in pre-defined intervals. The default entry is 'no' that means the reread function is switched of. <p></p>Select '1 min', '5 min', '1 hour', or '1 day' to force BNC to reread its configuration every full minute, five minutes, hour, or day and let in between edited configuration options become effective on-the-fly without terminating uninvolved threads.</p><p>Note that when operating BNC in window mode, on-the-fly changeable configuration options become effective immediately via button 'Save & Reread Configuration'. <i>[key: onTheFlyInterval]</i></p>"));
@@ -1881,4 +1895,6 @@
   delete _credentialsFileLineEdit;
   delete _logFileLineEdit;
+  delete _logFileStructuredLineEdit;
+  delete _logFormatStructuredComboBox;
   delete _rawOutFileLineEdit;
   delete _ephMountLineEdit;
@@ -2414,4 +2430,6 @@
   // General
   settings.setValue("logFile", _logFileLineEdit->text());
+  settings.setValue("logFileStructured", _logFileStructuredLineEdit->text());
+  settings.setValue("logFormatStructured", _logFormatStructuredComboBox->currentText());
   settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
   settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
Index: trunk/BNC/src/bncwindow.h
===================================================================
--- trunk/BNC/src/bncwindow.h	(revision 11175)
+++ trunk/BNC/src/bncwindow.h	(revision 11179)
@@ -184,4 +184,6 @@
     QLineEdit* _rnxScrpLineEdit;
     QLineEdit* _logFileLineEdit;
+    QLineEdit* _logFileStructuredLineEdit;
+    QComboBox* _logFormatStructuredComboBox;
     QLineEdit* _rawOutFileLineEdit;
     QLineEdit* _ephMountLineEdit;
Index: trunk/BNC/src/latencychecker.cpp
===================================================================
--- trunk/BNC/src/latencychecker.cpp	(revision 11175)
+++ trunk/BNC/src/latencychecker.cpp	(revision 11179)
@@ -62,4 +62,6 @@
   connect(this, SIGNAL(newMessage(QByteArray,bool)),
           BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
+  connect(this, SIGNAL(newLogRecord(t_logRecord,bool)),
+          BNC_CORE, SLOT(slotLogRecord(t_logRecord,bool)));
 
   bncSettings settings;
@@ -177,6 +179,10 @@
       _begDateOut = _endDateTimeOut.toUTC().date().toString("yy-MM-dd");
       _begTimeOut = _endDateTimeOut.toUTC().time().toString("hh:mm:ss");
-      emit(newMessage((_staID + ": Failure threshold exceeded, outage since "
-                    + _begDateOut + " " + _begTimeOut + " UTC").toLatin1(), true));
+      _outageSince = _endDateTimeOut.toUTC();
+      t_logRecord rec(t_logRecord::warning, "stream", "stream_outage_begin", _staID,
+                      (_staID + ": Failure threshold exceeded, outage since "
+                       + _begDateOut + " " + _begTimeOut + " UTC").toLatin1());
+      rec.addTime("since", _outageSince);
+      emit newLogRecord(rec, true);
       callScript(("Begin_Outage "
                     + _begDateOut + " " + _begTimeOut + " UTC").toLatin1());
@@ -256,6 +262,10 @@
           _begDateCorr = _endDateTimeCorr.toUTC().date().toString("yy-MM-dd");
           _begTimeCorr = _endDateTimeCorr.toUTC().time().toString("hh:mm:ss");
-          emit(newMessage((_staID + ": Failure threshold exceeded, corrupted since "
-                    + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1(), true));
+          _corruptSince = _endDateTimeCorr.toUTC();
+          t_logRecord rec(t_logRecord::warning, "stream", "stream_corrupted_begin", _staID,
+                          (_staID + ": Failure threshold exceeded, corrupted since "
+                           + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1());
+          rec.addTime("since", _corruptSince);
+          emit newLogRecord(rec, true);
           callScript(("Begin_Corrupted "
                     + _begDateCorr + " " + _begTimeCorr + " UTC").toLatin1());
@@ -276,6 +286,12 @@
             _endDateCorr = _begDateTimeCorr.toUTC().date().toString("yy-MM-dd");
             _endTimeCorr = _begDateTimeCorr.toUTC().time().toString("hh:mm:ss");
-            emit(newMessage((_staID + ": Recovery threshold exceeded, corruption ended "
-                        + _endDateCorr + " " + _endTimeCorr + " UTC").toLatin1(), true));
+            t_logRecord rec(t_logRecord::info, "stream", "stream_corrupted_end", _staID,
+                            (_staID + ": Recovery threshold exceeded, corruption ended "
+                             + _endDateCorr + " " + _endTimeCorr + " UTC").toLatin1());
+            rec.addTime("ended", _begDateTimeCorr);
+            if (_corruptSince.isValid()) {
+              rec.addTime("since", _corruptSince);
+            }
+            emit newLogRecord(rec, true);
             callScript(("End_Corrupted "
                         + _endDateCorr + " " + _endTimeCorr + " UTC Begin was "
@@ -304,6 +320,12 @@
       _endDateOut = _begDateTimeOut.toUTC().date().toString("yy-MM-dd");
       _endTimeOut = _begDateTimeOut.toUTC().time().toString("hh:mm:ss");
-      emit(newMessage((_staID + ": Recovery threshold exceeded, outage ended "
-                    + _endDateOut + " " + _endTimeOut + " UTC").toLatin1(), true));
+      t_logRecord rec(t_logRecord::info, "stream", "stream_outage_end", _staID,
+                      (_staID + ": Recovery threshold exceeded, outage ended "
+                       + _endDateOut + " " + _endTimeOut + " UTC").toLatin1());
+      rec.addTime("ended", _begDateTimeOut);
+      if (_outageSince.isValid()) {
+        rec.addTime("since", _outageSince);
+      }
+      emit newLogRecord(rec, true);
       callScript(("End_Outage "
                     + _endDateOut + " " + _endTimeOut + " UTC Begin was "
@@ -331,29 +353,6 @@
         if (l._newSec % (_miscIntr * 10) < l._oldSec % (_miscIntr * 10)) {
           if (l._numLat > 0) {
-            if (l._meanDiff > 0.0) {
-              if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
-                emit( newMessage(QString("%1 %2: Mean latency %3 sec, min %4, max %5, rms %6, %7 epochs, %8 gaps")
-                  .arg(_staID.data())
-                  .arg(l._type.data())
-                  .arg(int(l._sumLat/l._numLat*100)/100., 4, 'f', 2)
-                  .arg(int(l._minLat*100)/100., 4, 'f', 2)
-                  .arg(int(l._maxLat*100)/100., 4, 'f', 2)
-                  .arg(int((sqrt(l._sumLatQ / l._numLat))*100)/100., 4, 'f', 2)
-                  .arg(l._numLat)
-                  .arg(l._numGaps)
-                  .toLatin1(), true) );
-              }
-            } else {
-              if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
-                emit( newMessage(QString("%1 %2: Mean latency %3 sec, min %4, max %5, rms %6, %7 epochs")
-                  .arg(_staID.data())
-                  .arg(l._type.data())
-                  .arg(int(l._sumLat/l._numLat*100)/100., 4, 'f', 2)
-                  .arg(int(l._minLat*100)/100., 4, 'f', 2)
-                  .arg(int(l._maxLat*100)/100., 4, 'f', 2)
-                  .arg(int((sqrt(l._sumLatQ / l._numLat))*100)/100., 4, 'f', 2)
-                  .arg(l._numLat)
-                  .toLatin1(), true) );
-              }
+            if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
+              emitLatency(l);
             }
             l._meanDiff  = l._diffSec / l._numLat;
@@ -456,29 +455,6 @@
       if (int(l._newSec) % _miscIntr < int(l._oldSec) % _miscIntr) {
         if (l._numLat>0) {
-          QString late;
-          if (l._meanDiff>0.) {
-            late = QString(" %1: Mean latency %2 sec, min %3, max %4, rms %5, %6 epochs, %7 gaps")
-            .arg(l._type.data())
-            .arg(int(l._sumLat/l._numLat*100)/100., 4, 'f', 2)
-            .arg(int(l._minLat*100)/100., 4, 'f', 2)
-            .arg(int(l._maxLat*100)/100., 4, 'f', 2)
-            .arg(int((sqrt(l._sumLatQ / l._numLat))*100)/100., 4, 'f', 2)
-            .arg(l._numLat)
-            .arg(l._numGaps);
-            if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
-              emit(newMessage(QString(_staID + late ).toLatin1(), true) );
-            }
-          }
-          else {
-            late = QString(" %1: Mean latency %2 sec, min %3, max %4, rms %5, %6 epochs")
-            .arg(l._type.data())
-            .arg(int(l._sumLat/l._numLat*100)/100., 4, 'f', 2)
-            .arg(int(l._minLat*100)/100., 4, 'f', 2)
-            .arg(int(l._maxLat*100)/100., 4, 'f', 2)
-            .arg(int((sqrt(l._sumLatQ / l._numLat))*100)/100., 4, 'f', 2)
-            .arg(l._numLat);
-            if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
-            emit(newMessage(QString(_staID + late ).toLatin1(), true) );
-            }
+          if ( _checkMountPoint == _staID || _checkMountPoint == "ALL" ) {
+            emitLatency(l);
           }
         }
@@ -568,2 +544,34 @@
   }
 }
+
+// Mean latency message of one interval (classic text unchanged)
+//////////////////////////////////////////////////////////////////////////////
+void latencyChecker::emitLatency(const t_latency& l) {
+  double mean = int(l._sumLat/l._numLat*100)/100.;
+  double min  = int(l._minLat*100)/100.;
+  double max  = int(l._maxLat*100)/100.;
+  double rms  = int((sqrt(l._sumLatQ / l._numLat))*100)/100.;
+  bool   gaps = (l._meanDiff > 0.0);
+  QString text = QString("%1 %2: Mean latency %3 sec, min %4, max %5, rms %6, %7 epochs")
+    .arg(_staID.data())
+    .arg(l._type.data())
+    .arg(mean, 4, 'f', 2)
+    .arg(min, 4, 'f', 2)
+    .arg(max, 4, 'f', 2)
+    .arg(rms, 4, 'f', 2)
+    .arg(l._numLat);
+  if (gaps) {
+    text += QString(", %1 gaps").arg(l._numGaps);
+  }
+  t_logRecord rec(t_logRecord::info, "stream", "stream_latency", _staID, text.toLatin1());
+  rec.add("type", l._type)
+     .add("mean", mean, 2)
+     .add("min", min, 2)
+     .add("max", max, 2)
+     .add("rms", rms, 2)
+     .add("epochs", int(l._numLat));
+  if (gaps) {
+    rec.add("gaps", int(l._numGaps));
+  }
+  emit newLogRecord(rec, true);
+}
Index: trunk/BNC/src/latencychecker.h
===================================================================
--- trunk/BNC/src/latencychecker.h	(revision 11175)
+++ trunk/BNC/src/latencychecker.h	(revision 11179)
@@ -28,4 +28,5 @@
 #include <QDateTime>
 #include "satObs.h"
+#include "bnclog.h"
 
 class latencyChecker : public QObject {
@@ -114,7 +115,11 @@
  signals:
   void newMessage(QByteArray msg, bool showOnScreen);
+  void newLogRecord(t_logRecord rec, bool showOnScreen);
 
  private:
   void callScript(const char* comment);
+  void emitLatency(const t_latency& l);
+  QDateTime  _outageSince;
+  QDateTime  _corruptSince;
   int        _inspSegm;
   int        _adviseFail;
Index: trunk/BNC/src/pppRun.cpp
===================================================================
--- trunk/BNC/src/pppRun.cpp	(revision 11175)
+++ trunk/BNC/src/pppRun.cpp	(revision 11179)
@@ -70,4 +70,7 @@
   connect(this, SIGNAL(newMessage(QByteArray,bool)),
           BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
+  connect(this, SIGNAL(newLogRecord(t_logRecord,bool)),
+          BNC_CORE, SLOT(slotLogRecord(t_logRecord,bool)));
+  t_logRecord::registerStation(QByteArray(_opt->_roverName.c_str()));
 
   connect(this,     SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
@@ -463,5 +466,28 @@
         }
       }
-      emit newMessage(QByteArray(log.str().c_str()), true);
+      if (output._error) {
+        emit newLogRecord(t_logRecord(t_logRecord::warning, "ppp", "ppp_epoch_failed",
+                                      staID, QByteArray(log.str().c_str())), true);
+      }
+      else {
+        t_logRecord rec(t_logRecord::info, "ppp", "ppp_position", staID,
+                        QByteArray(log.str().c_str()));
+        rec.add("epoch", QByteArray((output._epoTime.datestr() + 'T' +
+                                     output._epoTime.timestr(3)).c_str()))
+           .add("x", output._xyzRover[0], 4)
+           .add("y", output._xyzRover[1], 4)
+           .add("z", output._xyzRover[2], 4)
+           .add("dn", output._neu[0], 4)
+           .add("de", output._neu[1], 4)
+           .add("du", output._neu[2], 4)
+           .add("trp0", output._trp0, 4)
+           .add("trp", output._trp, 4)
+           .add("trp_stdev", output._trpStdev, 4)
+           .add("num_sat", output._numSat)
+           .add("hdop", output._hDop, 2)
+           .add("fixed", output._fixRatio > 0.0)
+           .add("fix_percent", int(100*output._fixRatio));
+        emit newLogRecord(rec, true);
+      }
     }
     else {
Index: trunk/BNC/src/pppRun.h
===================================================================
--- trunk/BNC/src/pppRun.h	(revision 11175)
+++ trunk/BNC/src/pppRun.h	(revision 11179)
@@ -9,4 +9,5 @@
 #include "pppOptions.h"
 #include "pppClient.h"
+#include "bnclog.h"
 
 class t_rnxObsFile;
@@ -30,4 +31,5 @@
  signals:
   void newMessage(QByteArray msg, bool showOnScreen);
+  void newLogRecord(t_logRecord rec, bool showOnScreen);
   void newPosition(QByteArray staID, bncTime time, QVector<double> xx);
   void newNMEAstr(QByteArray staID, QByteArray str);
Index: trunk/BNC/src/src.pri
===================================================================
--- trunk/BNC/src/src.pri	(revision 11175)
+++ trunk/BNC/src/src.pri	(revision 11179)
@@ -69,5 +69,5 @@
           bncoutf.h bncclockrinex.h bncsp3.h bncsinextro.h            \
           bncbiassinex.h                                              \
-          bncbytescounter.h bncsslconfig.h bnccredentials.h reqcdlg.h                  \
+          bncbytescounter.h bncsslconfig.h bnccredentials.h bnclog.h reqcdlg.h                 \
           ephemeris.h t_prn.h satObs.h                                \
           upload/bncrtnetdecoder.h upload/bncuploadcaster.h           \
@@ -112,5 +112,5 @@
           bncbiassinex.cpp                                            \
           ephemeris.cpp t_prn.cpp satObs.cpp                          \
-          bncbytescounter.cpp bncsslconfig.cpp bnccredentials.cpp reqcdlg.cpp            \
+          bncbytescounter.cpp bncsslconfig.cpp bnccredentials.cpp bnclog.cpp reqcdlg.cpp           \
           upload/bncrtnetdecoder.cpp upload/bncuploadcaster.cpp       \
           upload/bncrawuploadcaster.cpp                               \
Index: trunk/BNC/src/upload/bncrtnetdecoder.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetdecoder.cpp	(revision 11175)
+++ trunk/BNC/src/upload/bncrtnetdecoder.cpp	(revision 11179)
@@ -88,4 +88,5 @@
 bncRtnetDecoder::~bncRtnetDecoder() {
   for (int ic = 0; ic < _casters.size(); ic++) {
+    _casters[ic]->closeFiles();
     _casters[ic]->deleteSafely();
   }
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 11175)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 11179)
@@ -287,4 +287,15 @@
     delete _usedEph;
     delete _ssrCorr;
+}
+
+// Close the SP3, clock RINEX and Bias-SINEX files: done here, since the
+// destructor may run only after the end of the event loop (deleteLater),
+// i.e. not at all at the end of BNC
+////////////////////////////////////////////////////////////////////////////
+void bncRtnetUploadCaster::closeFiles() {
+  QMutexLocker locker(&_mutex);
+  delete _rnx; _rnx = 0;
+  delete _sp3; _sp3 = 0;
+  delete _bsx; _bsx = 0;
 }
 
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.h
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 11175)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 11179)
@@ -33,4 +33,5 @@
         int PID, int SID, int IOD, int iRow);
     void decodeRtnetStream(char* buffer, int bufLen);
+    void closeFiles();
 protected:
     virtual ~bncRtnetUploadCaster();
