Index: /trunk/BNC/RTCM/GPSDecoder.h
===================================================================
--- /trunk/BNC/RTCM/GPSDecoder.h	(revision 366)
+++ /trunk/BNC/RTCM/GPSDecoder.h	(revision 367)
@@ -45,4 +45,6 @@
     L1        = 0.0;
     L2        = 0.0;
+    S1        = 0.0;
+    S2        = 0.0;
     SNR1      = 0;
     SNR2      = 0;
@@ -61,6 +63,8 @@
   double L1;          // L1 carrier phase (cycles)
   double L2;          // L2 carrier phase (cycles)
-  int    SNR1;        // L1 signal-to noise ratio (RINEX convention)
-  int    SNR2;        // L2 signal-to noise ratio (RINEX convention)
+  double S1;          // L1 signal-to noise ratio
+  double S2;          // L2 signal-to noise ratio
+  int    SNR1;        // L1 signal-to noise ratio (mapped to integer)
+  int    SNR2;        // L2 signal-to noise ratio (mapped to integer)
 };
 
Index: /trunk/BNC/RTCM3/RTCM3Decoder.cpp
===================================================================
--- /trunk/BNC/RTCM3/RTCM3Decoder.cpp	(revision 366)
+++ /trunk/BNC/RTCM3/RTCM3Decoder.cpp	(revision 367)
@@ -90,5 +90,5 @@
         if (rr == 2) {
           std::cerr << "No valid RINEX! All values are modulo 299792.458!\n";
-//        exit(1); 
+          exit(1);
         }
 
@@ -148,4 +148,10 @@
               obs->SNR2 = _Parser.Data.snrL2[ii];
             }
+            else if (df & (GNSSDF_S1CDATA|GNSSDF_S1PDATA)) {
+              obs->S1   = _Parser.Data.measdata[ii][pos];
+            }
+            else if (df & (GNSSDF_S2CDATA|GNSSDF_S2PDATA)) {
+              obs->S2   = _Parser.Data.measdata[ii][pos];
+            }
           }
           }
Index: /trunk/BNC/RTCM3/rtcm3torinex.cpp
===================================================================
--- /trunk/BNC/RTCM3/rtcm3torinex.cpp	(revision 366)
+++ /trunk/BNC/RTCM3/rtcm3torinex.cpp	(revision 367)
@@ -1,5 +1,5 @@
 /*
   Converter for RTCM3 data to RINEX.
-  $Id: rtcm3torinex.c,v 1.16 2007/01/11 15:32:26 stoecker Exp $
+  $Id: rtcm3torinex.cpp,v 1.13 2007/01/17 15:17:20 mervart Exp $
   Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@euronik.eu>
 
@@ -51,5 +51,5 @@
 
 /* CVS revision and version */
-static char revisionstr[] = "$Revision: 1.16 $";
+static char revisionstr[] = "$Revision: 1.13 $";
 
 static uint32_t CRC24(long size, const unsigned char *buf)
@@ -249,5 +249,7 @@
     switch(type)
     {
-    case 1001: case 1002: case 1003: case 1004:
+    // Modification of RTCM3TORINEX for BNC: ignore 1001 and 1003
+    //case 1001: case 1002: case 1003: case 1004:
+    case 1002:  case 1004:
       if(handle->GPSWeek)
       {
@@ -408,5 +410,7 @@
       }
       break;
-    case 1009: case 1010: case 1011: case 1012:
+    // Modification of RTCM3TORINEX for BNC: ignore 1009 and 1010
+    //case 1009: case 1010: case 1011: case 1012:
+    case 1010: case 1012:
       {
         int lastlockl1[64];
@@ -656,7 +660,5 @@
 #define NUMSTARTSKIP 1
 
-////////////////////////////////////////////////////////////////////
-// Aenderung Perlt - kein check auf vorhandene Daten 
-// Abgefragt werden : C1 C2 L1 L2 P1 P2 S1 S2
+// Modification of RTCM3TORINEX for BNC
 
 void HandleHeader(struct RTCM3ParserData *Parser)
@@ -722,5 +724,5 @@
 Parser->datapos2[data[RINEXENTRY_D2DATA]-1] = GNSSENTRY_D2PDATA; 
 }
-// Ende Aenderung Perlt - kein check auf vorhandene Daten 
+// End of RTCM3TORINEX modification for BNC
 
 
@@ -852,5 +854,5 @@
 
 #ifndef NO_RTCM3_MAIN
-static char datestr[]     = "$Date: 2007/01/11 15:32:26 $";
+static char datestr[]     = "$Date: 2007/01/17 15:17:20 $";
 
 /* The string, which is send as agent in HTTP request */
Index: /trunk/BNC/RTIGS/RTIGSDecoder.cpp
===================================================================
--- /trunk/BNC/RTIGS/RTIGSDecoder.cpp	(revision 366)
+++ /trunk/BNC/RTIGS/RTIGSDecoder.cpp	(revision 367)
@@ -115,4 +115,6 @@
       obs->L1       = _GPSTrans.DecObs.Obs[ii].p1_phase;
       obs->L2       = _GPSTrans.DecObs.Obs[ii].p2_phase;
+      obs->S1       = _GPSTrans.DecObs.Obs[ii].l1_sn;
+      obs->S2       = _GPSTrans.DecObs.Obs[ii].l2_sn;
       obs->SNR1     = int(ceil(_GPSTrans.DecObs.Obs[ii].l1_sn / 60.0 * 9.0));
       obs->SNR2     = int(ceil(_GPSTrans.DecObs.Obs[ii].l2_sn / 60.0 * 9.0));
Index: /trunk/BNC/bnccaster.cpp
===================================================================
--- /trunk/BNC/bnccaster.cpp	(revision 366)
+++ /trunk/BNC/bnccaster.cpp	(revision 367)
@@ -251,4 +251,8 @@
           _out->setFieldWidth(1); *_out << " ";
           _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->L2; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->S1; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->S2;
           _out->setFieldWidth(1); 
           *_out << " " << obs->SNR1 << " " << obs->SNR2 << endl;
Index: /trunk/BNC/bnchelp.html
===================================================================
--- /trunk/BNC/bnchelp.html	(revision 366)
+++ /trunk/BNC/bnchelp.html	(revision 367)
@@ -37,5 +37,5 @@
 <ul>
 <li>RTCM Version 2.x format containing message types 18 and 19 (GPS and GLONASS), </li> 
-<li>RTCM Version 3 format containing message types 1001, 1002, 1003, 1004 (GPS), and 1009, 1010, 1011, 1012 (GLONASS),</li>
+<li>RTCM Version 3 format containing message types 1002 or 1004 (GPS), and 1010 or 1012 (GLONASS),</li>
 <li>RTIGS format (only GPS).</li> 
 </ul>
@@ -117,6 +117,6 @@
 <p><a name="output"><h4>B - 4. Synchronized Output</h4></p>
 <p>
-BNC lets you output synchronized observations epoch by epoch. This output is made available in a plain ASCII format and in a binary format. The output comprises the following observations if available:</p>
-StatID, SVPRN, GPSWeek, GPSWeeks, C1, C2, P1, P2, L1, L2, SNR1, SNR2.
+BNC lets you output synchronized observations epoch by epoch. This output is made available in a plain ASCII format and in a binary format. The output comprises the following observations if available where SNR is the signal-to-noise ratio S mapped to integer numbers 1 to 9:</p>
+StatID, SVPRN, GPSWeek, GPSWeeks, C1, C2, P1, P2, L1, L2, S1, S2, SNR1, SNR2.
 </p>
 <p>
@@ -169,6 +169,8 @@
   double L1;          // L1 carrier phase (cycles)
   double L2;          // L2 carrier phase (cycles)
-  int    SNR1;        // L1 signal-to noise ratio (0.1 dB)
-  int    SNR2;        // L2 signal-to noise ratio (0.1 dB)
+  double S1;          // L1 signal-to noise ratio (dB-Hz)
+  double S2;          // L2 signal-to noise ratio (db-Hz)
+  int    SNR1;        // S1 mapped to integer numbers 1 to 9
+  int    SNR2;        // S2 mapped to integer numbers 1 to 9
 } ;
 </pre>
@@ -205,5 +207,5 @@
 </p>
 <p>
-BNC's RINEX observation files generally contain C1, C2, P1, P2, L1, L2, SNR1, and SNR3 observations. In case an observation is unavailable, its value is set to zero '0.000'. Note that even if a RINEX file does not contain GLONASS data, the 'RINEX TYPE' field in the RINEX file header may be set to 'M (MIXED)'.
+BNC's RINEX observation files generally contain C1, C2, P1, P2, L1, L2, S1, and S2 observations. In case an observation is unavailable, its value is set to zero '0.000'. Note that even if a RINEX file does not contain GLONASS data, the 'RINEX TYPE' field in the RINEX file header may be set to 'M (MIXED)'.
 </p>
 
@@ -317,5 +319,5 @@
 <p><a name="GetTable"><h4>B - 6.4 Get Table</h4></p>
 <p>
-Hit button 'Get Table' to download the source-table from the NTRIP broadcaster. Please pay attention to data fields 'format' and 'format-details'. Keep in mind that BNC can only decode and convert streams that come in RTCM 2.x, RTCM 3, or RTIGS formats. RTCM 2.x streams must contain message types 18 and 19 while RTCM 3 streams must contain message types 1001 or 1003, better 1003 or 1004 (GPS), 1009 or 1010, even better 1011 or 1012 (GLONASS), see data field 'format-details' for available message types and their repetition rates in brackets. Select your streams line by line, use +Shift and +Ctrl when necessary.
+Hit button 'Get Table' to download the source-table from the NTRIP broadcaster. Please pay attention to data fields 'format' and 'format-details'. Keep in mind that BNC can only decode and convert streams that come in RTCM 2.x, RTCM 3, or RTIGS formats. RTCM 2.x streams must contain message types 18 and 19 while RTCM 3 streams must contain GPS message types 1002 or 1004 and may contain GLONASS message types 1010 or 1012, see data field 'format-details' for available message types and their repetition rates in brackets. Select your streams line by line, use +Shift and +Ctrl when necessary.
 </p> 
 <p>
@@ -369,11 +371,8 @@
 </li>
 <li>
-BNC's function is limited today to processing C1, C2, P1, P2, L1, L2, SNR1, and SNR2 observations. Which observables become available through a specific stream depends on the setup of the affected receiver and the applied data format. Note that RTCM Version 2.x streams can not transport signal-to-noise ratios (SNR) and RTCM Version 3 streams can only transport one code observable per frequency. Note further that signal-to-noise ratios SNR1 and SNR2 are mapped to integer numbers 1 to 9.
-</li>
-<li>
-Concerning RTCM Version 2.x, BNC handles only message types 18 and 19. Concerning RTCM Version 3, BNC handles only message types 1001, 1002, 1003, 1004, 1009, 1010, 1011, and 1012.
-</li>
-<li>
-If the ambiguity field is not set in RTCM Version 3 streams (i.e. when sending message type 1003 but no 1004), the BNC output will be no valid RINEX. All values will be stored modulo 299792.458. (It would be necessary to approximately calculate the range to fix the ambiguity, needing ephemeris/almanac and an easy positioning algorithm).
+BNC's function is limited today to processing C1, C2, P1, P2, L1, L2, S1, and S2 observations. Which observables become available through a specific stream depends on the setup of the affected receiver and the applied data format. Note that RTCM Version 2.x streams can not transport signal-to-noise ratios (S) and RTCM Version 3 streams can only transport one code observable per frequency. Note further that signal-to-noise ratios (S) are also made available mapped to integer numbers 1 to 9.
+</li>
+<li>
+Concerning RTCM Version 2.x, BNC handles only message types 18 and 19. Concerning RTCM Version 3, BNC handles only message types 1002, 1004, 1010, and 1012.
 </li>
 <li>
Index: /trunk/BNC/bncrinex.cpp
===================================================================
--- /trunk/BNC/bncrinex.cpp	(revision 366)
+++ /trunk/BNC/bncrinex.cpp	(revision 367)
@@ -334,6 +334,6 @@
       }
       else if (line.indexOf("# / TYPES OF OBSERV") != -1) {
-        _out << "     6    C1    C2    P1    P2    L1    L2"
-                "                  # / TYPES OF OBSERV"  << endl;
+        _out << "     8    C1    C2    P1    P2    L1    L2    S1    S2"
+                "      # / TYPES OF OBSERV"  << endl;
       }
       else if (line.indexOf("TIME OF FIRST OBS") != -1) {
@@ -380,5 +380,5 @@
          << "                  "                                     << "ANTENNA: DELTA H/E/N" << endl;
     _out << "     1     1                                                WAVELENGTH FACT L1/2" << endl;
-    _out << "     6    C1    C2    P1    P2    L1    L2                  # / TYPES OF OBSERV"  << endl;
+    _out << "     8    C1    C2    P1    P2    L1    L2    S1    S2      # / TYPES OF OBSERV"  << endl;
         _out << datTim.toString("  yyyy    MM    dd"
                                 "    hh    mm   ss.zzz0000").toAscii().data();
@@ -479,4 +479,6 @@
     _out << setw(14) << setprecision(3) << ob->L2 << lli
          << setw(1) << ob->SNR2;
+    _out << setw(14) << setprecision(3) << ob->S1 ;
+    _out << setw(16) << setprecision(3) << ob->S2 ;
     _out << endl;
 
Index: /trunk/BNC/bncwindow.cpp
===================================================================
--- /trunk/BNC/bncwindow.cpp	(revision 366)
+++ /trunk/BNC/bncwindow.cpp	(revision 367)
@@ -184,6 +184,5 @@
   while (it.hasNext()) {
     QStringList hlp = it.next().split(" ");
-    if (hlp.size() <= 1) continue;
-    if (hlp.size() == 2) continue; // For downward compatibility
+    if (hlp.size() < 5) continue; // Check number of parameters saved per mountpoint
     _mountPointsTable->insertRow(iRow);
 
Index: /trunk/BNC/test_bnc.cpp
===================================================================
--- /trunk/BNC/test_bnc.cpp	(revision 366)
+++ /trunk/BNC/test_bnc.cpp	(revision 367)
@@ -98,8 +98,11 @@
              << setw(10) << setprecision(2) << obs.GPSWeeks       << " "
              << setw(14) << setprecision(4) << obs.C1             << " "
+             << setw(14) << setprecision(4) << obs.C2             << " "
              << setw(14) << setprecision(4) << obs.P1             << " "
              << setw(14) << setprecision(4) << obs.P2             << " "
              << setw(14) << setprecision(4) << obs.L1             << " "
              << setw(14) << setprecision(4) << obs.L2             << " "
+             << setw(14) << setprecision(4) << obs.S1             << " "
+             << setw(14) << setprecision(4) << obs.S2             << " "
              << setw(4)                     << obs.SNR1           << " "
              << setw(4)                     << obs.SNR2           << endl;
