Index: /trunk/BNC/src/RTCM/GPSDecoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM/GPSDecoder.cpp	(revision 4402)
+++ /trunk/BNC/src/RTCM/GPSDecoder.cpp	(revision 4403)
@@ -92,9 +92,8 @@
 // 
 //////////////////////////////////////////////////////////////////////////////
-void t_obs::setMeasdata(const QString& rnxStr, double value) {
-  int iEntry = -1;
-  measdata(rnxStr, &iEntry);
-  if (iEntry != -1) {
-    _measdata[iEntry] = value;
+void t_obs::setMeasdata(const QString& rnxStr, float rnxVers, double value) {
+  int ie = iEntry(rnxStr, rnxVers);
+  if (ie != -1) {
+    _measdata[ie] = value;
   }
 }
@@ -102,37 +101,49 @@
 // 
 //////////////////////////////////////////////////////////////////////////////
-double t_obs::measdata(const QString& rnxStr, int* p_iEntry) const {
-
-  int iEntry = -1;
+double t_obs::measdata(const QString& rnxStr, float rnxVers) const {
+  int ie = iEntry(rnxStr, rnxVers);
+  if (ie != -1) {
+    return _measdata[ie];
+  }
+  else {
+    return 0.0;
+  }
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+int t_obs::iEntry(const QString& rnxStr, float rnxVers) const {
+
+  int retVal = -1;
 
   // GPS
   // ---
   if (satSys == 'G') {
-    if      (rnxStr == "C1")                      iEntry = GNSSENTRY_C1NDATA; 
-    else if (rnxStr == "C1C")                     iEntry = GNSSENTRY_C1DATA;  
-    else if (rnxStr == "C1P" || rnxStr == "C1W")  iEntry = GNSSENTRY_P1DATA;  
-    else if (rnxStr == "L1")                      iEntry = GNSSENTRY_L1NDATA; 
-    else if (rnxStr == "L1C")                     iEntry = GNSSENTRY_L1CDATA; 
-    else if (rnxStr == "L1P" || rnxStr == "L1W")  iEntry = GNSSENTRY_L1PDATA; 
-    else if (rnxStr == "D1")                      iEntry = GNSSENTRY_D1NDATA; 
-    else if (rnxStr == "D1C")                     iEntry = GNSSENTRY_D1CDATA; 
-    else if (rnxStr == "D1P" || rnxStr == "D1W")  iEntry = GNSSENTRY_D1PDATA; 
-    else if (rnxStr == "S1")                      iEntry = GNSSENTRY_S1NDATA; 
-    else if (rnxStr == "S1C")                     iEntry = GNSSENTRY_S1CDATA; 
-    else if (rnxStr == "S1P" || rnxStr == "S1W")  iEntry = GNSSENTRY_S1PDATA; 
-
-    else if (rnxStr == "C2"  || rnxStr == "C2X")  iEntry = GNSSENTRY_C2DATA;  
-    else if (rnxStr == "C2P" || rnxStr == "C2W")  iEntry = GNSSENTRY_P2DATA;  
-    else if (rnxStr == "L2"  || rnxStr == "L2X")  iEntry = GNSSENTRY_L2CDATA; 
-    else if (rnxStr == "L2P" || rnxStr == "L2W")  iEntry = GNSSENTRY_L2PDATA; 
-    else if (rnxStr == "D2"  || rnxStr == "D2X")  iEntry = GNSSENTRY_D2CDATA; 
-    else if (rnxStr == "D2P" || rnxStr == "D2W")  iEntry = GNSSENTRY_D2PDATA; 
-    else if (rnxStr == "S2"  || rnxStr == "S2X")  iEntry = GNSSENTRY_S2CDATA; 
-    else if (rnxStr == "S2P" || rnxStr == "S2W")  iEntry = GNSSENTRY_S2PDATA; 
-
-    else if (rnxStr == "C5")                      iEntry = GNSSENTRY_C5DATA;  
-    else if (rnxStr == "D5")                      iEntry = GNSSENTRY_D5DATA;  
-    else if (rnxStr == "L5")                      iEntry = GNSSENTRY_L5DATA;  
-    else if (rnxStr == "S5")                      iEntry = GNSSENTRY_S5DATA;  
+    if      (rnxStr == "C1")                      retVal = GNSSENTRY_C1NDATA; 
+    else if (rnxStr == "C1C")                     retVal = GNSSENTRY_C1DATA;  
+    else if (rnxStr == "C1P" || rnxStr == "C1W")  retVal = GNSSENTRY_P1DATA;  
+    else if (rnxStr == "L1")                      retVal = GNSSENTRY_L1NDATA; 
+    else if (rnxStr == "L1C")                     retVal = GNSSENTRY_L1CDATA; 
+    else if (rnxStr == "L1P" || rnxStr == "L1W")  retVal = GNSSENTRY_L1PDATA; 
+    else if (rnxStr == "D1")                      retVal = GNSSENTRY_D1NDATA; 
+    else if (rnxStr == "D1C")                     retVal = GNSSENTRY_D1CDATA; 
+    else if (rnxStr == "D1P" || rnxStr == "D1W")  retVal = GNSSENTRY_D1PDATA; 
+    else if (rnxStr == "S1")                      retVal = GNSSENTRY_S1NDATA; 
+    else if (rnxStr == "S1C")                     retVal = GNSSENTRY_S1CDATA; 
+    else if (rnxStr == "S1P" || rnxStr == "S1W")  retVal = GNSSENTRY_S1PDATA; 
+
+    else if (rnxStr == "C2"  || rnxStr == "C2X")  retVal = GNSSENTRY_C2DATA;  
+    else if (rnxStr == "C2P" || rnxStr == "C2W")  retVal = GNSSENTRY_P2DATA;  
+    else if (rnxStr == "L2"  || rnxStr == "L2X")  retVal = GNSSENTRY_L2CDATA; 
+    else if (rnxStr == "L2P" || rnxStr == "L2W")  retVal = GNSSENTRY_L2PDATA; 
+    else if (rnxStr == "D2"  || rnxStr == "D2X")  retVal = GNSSENTRY_D2CDATA; 
+    else if (rnxStr == "D2P" || rnxStr == "D2W")  retVal = GNSSENTRY_D2PDATA; 
+    else if (rnxStr == "S2"  || rnxStr == "S2X")  retVal = GNSSENTRY_S2CDATA; 
+    else if (rnxStr == "S2P" || rnxStr == "S2W")  retVal = GNSSENTRY_S2PDATA; 
+
+    else if (rnxStr == "C5")                      retVal = GNSSENTRY_C5DATA;  
+    else if (rnxStr == "D5")                      retVal = GNSSENTRY_D5DATA;  
+    else if (rnxStr == "L5")                      retVal = GNSSENTRY_L5DATA;  
+    else if (rnxStr == "S5")                      retVal = GNSSENTRY_S5DATA;  
   }
 
@@ -140,21 +151,21 @@
   // -------
   else if (satSys == 'R') {
-    if      (rnxStr == "C1C") iEntry = GNSSENTRY_C1DATA;  
-    else if (rnxStr == "C1P") iEntry = GNSSENTRY_P1DATA;  
-    else if (rnxStr == "L1C") iEntry = GNSSENTRY_L1CDATA; 
-    else if (rnxStr == "L1P") iEntry = GNSSENTRY_L1PDATA; 
-    else if (rnxStr == "D1C") iEntry = GNSSENTRY_D1CDATA; 
-    else if (rnxStr == "D1P") iEntry = GNSSENTRY_D1PDATA; 
-    else if (rnxStr == "S1C") iEntry = GNSSENTRY_S1CDATA; 
-    else if (rnxStr == "S1P") iEntry = GNSSENTRY_S1PDATA; 
-
-    else if (rnxStr == "C2C") iEntry = GNSSENTRY_C2DATA;  
-    else if (rnxStr == "C2P") iEntry = GNSSENTRY_P2DATA;  
-    else if (rnxStr == "L2C") iEntry = GNSSENTRY_L2CDATA; 
-    else if (rnxStr == "L2P") iEntry = GNSSENTRY_L2PDATA; 
-    else if (rnxStr == "D2C") iEntry = GNSSENTRY_D2CDATA; 
-    else if (rnxStr == "D2P") iEntry = GNSSENTRY_D2PDATA; 
-    else if (rnxStr == "S2C") iEntry = GNSSENTRY_S2CDATA; 
-    else if (rnxStr == "S2P") iEntry = GNSSENTRY_S2PDATA; 
+    if      (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA;  
+    else if (rnxStr == "C1P") retVal = GNSSENTRY_P1DATA;  
+    else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA; 
+    else if (rnxStr == "L1P") retVal = GNSSENTRY_L1PDATA; 
+    else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA; 
+    else if (rnxStr == "D1P") retVal = GNSSENTRY_D1PDATA; 
+    else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA; 
+    else if (rnxStr == "S1P") retVal = GNSSENTRY_S1PDATA; 
+
+    else if (rnxStr == "C2C") retVal = GNSSENTRY_C2DATA;  
+    else if (rnxStr == "C2P") retVal = GNSSENTRY_P2DATA;  
+    else if (rnxStr == "L2C") retVal = GNSSENTRY_L2CDATA; 
+    else if (rnxStr == "L2P") retVal = GNSSENTRY_L2PDATA; 
+    else if (rnxStr == "D2C") retVal = GNSSENTRY_D2CDATA; 
+    else if (rnxStr == "D2P") retVal = GNSSENTRY_D2PDATA; 
+    else if (rnxStr == "S2C") retVal = GNSSENTRY_S2CDATA; 
+    else if (rnxStr == "S2P") retVal = GNSSENTRY_S2PDATA; 
   }
 
@@ -162,28 +173,28 @@
   // -------
   else if (satSys == 'E') {
-    if      (rnxStr == "C1") iEntry = GNSSENTRY_C1DATA;   
-    else if (rnxStr == "L1") iEntry = GNSSENTRY_L1CDATA;  
-    else if (rnxStr == "D1") iEntry = GNSSENTRY_D1CDATA;  
-    else if (rnxStr == "S1") iEntry = GNSSENTRY_S1CDATA;  
-
-    else if (rnxStr == "C5") iEntry = GNSSENTRY_C5DATA;   
-    else if (rnxStr == "L5") iEntry = GNSSENTRY_L5DATA;   
-    else if (rnxStr == "D5") iEntry = GNSSENTRY_D5DATA;   
-    else if (rnxStr == "S5") iEntry = GNSSENTRY_S5DATA;   
-    else if (rnxStr == "C6") iEntry = GNSSENTRY_C6DATA;   
-
-    else if (rnxStr == "L6") iEntry = GNSSENTRY_L6DATA;   
-    else if (rnxStr == "D6") iEntry = GNSSENTRY_D6DATA;   
-    else if (rnxStr == "S6") iEntry = GNSSENTRY_S6DATA;   
-
-    else if (rnxStr == "C7") iEntry = GNSSENTRY_C5BDATA;  
-    else if (rnxStr == "L7") iEntry = GNSSENTRY_L5BDATA;  
-    else if (rnxStr == "D7") iEntry = GNSSENTRY_D5BDATA;  
-    else if (rnxStr == "S7") iEntry = GNSSENTRY_S5BDATA;  
-
-    else if (rnxStr == "C8") iEntry = GNSSENTRY_C5ABDATA; 
-    else if (rnxStr == "L8") iEntry = GNSSENTRY_L5ABDATA; 
-    else if (rnxStr == "D8") iEntry = GNSSENTRY_D5ABDATA; 
-    else if (rnxStr == "S8") iEntry = GNSSENTRY_S5ABDATA; 
+    if      (rnxStr == "C1") retVal = GNSSENTRY_C1DATA;   
+    else if (rnxStr == "L1") retVal = GNSSENTRY_L1CDATA;  
+    else if (rnxStr == "D1") retVal = GNSSENTRY_D1CDATA;  
+    else if (rnxStr == "S1") retVal = GNSSENTRY_S1CDATA;  
+
+    else if (rnxStr == "C5") retVal = GNSSENTRY_C5DATA;   
+    else if (rnxStr == "L5") retVal = GNSSENTRY_L5DATA;   
+    else if (rnxStr == "D5") retVal = GNSSENTRY_D5DATA;   
+    else if (rnxStr == "S5") retVal = GNSSENTRY_S5DATA;   
+    else if (rnxStr == "C6") retVal = GNSSENTRY_C6DATA;   
+
+    else if (rnxStr == "L6") retVal = GNSSENTRY_L6DATA;   
+    else if (rnxStr == "D6") retVal = GNSSENTRY_D6DATA;   
+    else if (rnxStr == "S6") retVal = GNSSENTRY_S6DATA;   
+
+    else if (rnxStr == "C7") retVal = GNSSENTRY_C5BDATA;  
+    else if (rnxStr == "L7") retVal = GNSSENTRY_L5BDATA;  
+    else if (rnxStr == "D7") retVal = GNSSENTRY_D5BDATA;  
+    else if (rnxStr == "S7") retVal = GNSSENTRY_S5BDATA;  
+
+    else if (rnxStr == "C8") retVal = GNSSENTRY_C5ABDATA; 
+    else if (rnxStr == "L8") retVal = GNSSENTRY_L5ABDATA; 
+    else if (rnxStr == "D8") retVal = GNSSENTRY_D5ABDATA; 
+    else if (rnxStr == "S8") retVal = GNSSENTRY_S5ABDATA; 
   }
 
@@ -191,31 +202,31 @@
   // ----
   else if (satSys == 'J') {
-    if      (rnxStr == "C1" ) iEntry = GNSSENTRY_C1NDATA;   
-    else if (rnxStr == "C1C") iEntry = GNSSENTRY_C1DATA;    
-    else if (rnxStr == "C1Z") iEntry = GNSSENTRY_CSAIFDATA; 
-    else if (rnxStr == "L1" ) iEntry = GNSSENTRY_L1NDATA;   
-    else if (rnxStr == "L1C") iEntry = GNSSENTRY_L1CDATA;   
-    else if (rnxStr == "L1Z") iEntry = GNSSENTRY_LSAIFDATA; 
-    else if (rnxStr == "D1" ) iEntry = GNSSENTRY_D1NDATA;   
-    else if (rnxStr == "D1C") iEntry = GNSSENTRY_D1CDATA;   
-    else if (rnxStr == "D1Z") iEntry = GNSSENTRY_DSAIFDATA; 
-    else if (rnxStr == "S1" ) iEntry = GNSSENTRY_S1NDATA;   
-    else if (rnxStr == "S1C") iEntry = GNSSENTRY_S1CDATA;   
-    else if (rnxStr == "S1Z") iEntry = GNSSENTRY_SSAIFDATA; 
-
-    else if (rnxStr == "C2" ) iEntry = GNSSENTRY_C2DATA;    
-    else if (rnxStr == "L2" ) iEntry = GNSSENTRY_L2CDATA;   
-    else if (rnxStr == "D2" ) iEntry = GNSSENTRY_D2CDATA;   
-    else if (rnxStr == "S2" ) iEntry = GNSSENTRY_S2CDATA;   
-
-    else if (rnxStr == "C5" ) iEntry = GNSSENTRY_C5DATA;    
-    else if (rnxStr == "L5" ) iEntry = GNSSENTRY_L5DATA;    
-    else if (rnxStr == "D5" ) iEntry = GNSSENTRY_D5DATA;    
-    else if (rnxStr == "S5" ) iEntry = GNSSENTRY_S5DATA;    
-
-    else if (rnxStr == "C6" ) iEntry = GNSSENTRY_C6DATA;    
-    else if (rnxStr == "D6" ) iEntry = GNSSENTRY_D6DATA;    
-    else if (rnxStr == "L6" ) iEntry = GNSSENTRY_L6DATA;    
-    else if (rnxStr == "S6" ) iEntry = GNSSENTRY_S6DATA;    
+    if      (rnxStr == "C1" ) retVal = GNSSENTRY_C1NDATA;   
+    else if (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA;    
+    else if (rnxStr == "C1Z") retVal = GNSSENTRY_CSAIFDATA; 
+    else if (rnxStr == "L1" ) retVal = GNSSENTRY_L1NDATA;   
+    else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA;   
+    else if (rnxStr == "L1Z") retVal = GNSSENTRY_LSAIFDATA; 
+    else if (rnxStr == "D1" ) retVal = GNSSENTRY_D1NDATA;   
+    else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA;   
+    else if (rnxStr == "D1Z") retVal = GNSSENTRY_DSAIFDATA; 
+    else if (rnxStr == "S1" ) retVal = GNSSENTRY_S1NDATA;   
+    else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA;   
+    else if (rnxStr == "S1Z") retVal = GNSSENTRY_SSAIFDATA; 
+
+    else if (rnxStr == "C2" ) retVal = GNSSENTRY_C2DATA;    
+    else if (rnxStr == "L2" ) retVal = GNSSENTRY_L2CDATA;   
+    else if (rnxStr == "D2" ) retVal = GNSSENTRY_D2CDATA;   
+    else if (rnxStr == "S2" ) retVal = GNSSENTRY_S2CDATA;   
+
+    else if (rnxStr == "C5" ) retVal = GNSSENTRY_C5DATA;    
+    else if (rnxStr == "L5" ) retVal = GNSSENTRY_L5DATA;    
+    else if (rnxStr == "D5" ) retVal = GNSSENTRY_D5DATA;    
+    else if (rnxStr == "S5" ) retVal = GNSSENTRY_S5DATA;    
+
+    else if (rnxStr == "C6" ) retVal = GNSSENTRY_C6DATA;    
+    else if (rnxStr == "D6" ) retVal = GNSSENTRY_D6DATA;    
+    else if (rnxStr == "L6" ) retVal = GNSSENTRY_L6DATA;    
+    else if (rnxStr == "S6" ) retVal = GNSSENTRY_S6DATA;    
   }
 
@@ -223,17 +234,17 @@
   // ----
   else if (satSys == 'S') {
-    if      (rnxStr == "C1C") iEntry = GNSSENTRY_C1DATA;  
-    else if (rnxStr == "C1W") iEntry = GNSSENTRY_P1DATA;  
-    else if (rnxStr == "L1C") iEntry = GNSSENTRY_L1CDATA; 
-    else if (rnxStr == "L1W") iEntry = GNSSENTRY_L1PDATA; 
-    else if (rnxStr == "D1C") iEntry = GNSSENTRY_D1CDATA; 
-    else if (rnxStr == "D1W") iEntry = GNSSENTRY_D1PDATA; 
-    else if (rnxStr == "S1C") iEntry = GNSSENTRY_S1CDATA; 
-    else if (rnxStr == "S1W") iEntry = GNSSENTRY_S1PDATA; 
-
-    else if (rnxStr == "C5" ) iEntry = GNSSENTRY_C5DATA;  
-    else if (rnxStr == "L5" ) iEntry = GNSSENTRY_L5DATA;  
-    else if (rnxStr == "D5" ) iEntry = GNSSENTRY_D5DATA;  
-    else if (rnxStr == "S5" ) iEntry = GNSSENTRY_S5DATA;  
+    if      (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA;  
+    else if (rnxStr == "C1W") retVal = GNSSENTRY_P1DATA;  
+    else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA; 
+    else if (rnxStr == "L1W") retVal = GNSSENTRY_L1PDATA; 
+    else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA; 
+    else if (rnxStr == "D1W") retVal = GNSSENTRY_D1PDATA; 
+    else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA; 
+    else if (rnxStr == "S1W") retVal = GNSSENTRY_S1PDATA; 
+
+    else if (rnxStr == "C5" ) retVal = GNSSENTRY_C5DATA;  
+    else if (rnxStr == "L5" ) retVal = GNSSENTRY_L5DATA;  
+    else if (rnxStr == "D5" ) retVal = GNSSENTRY_D5DATA;  
+    else if (rnxStr == "S5" ) retVal = GNSSENTRY_S5DATA;  
   }
 
@@ -241,34 +252,21 @@
   // -------
   else if (satSys == 'C') {
-    if      (rnxStr == "C2I") iEntry = GNSSENTRY_CB1DATA;
-    else if (rnxStr == "L2I") iEntry = GNSSENTRY_LB1DATA;
-    else if (rnxStr == "D2I") iEntry = GNSSENTRY_DB1DATA;
-    else if (rnxStr == "S2I") iEntry = GNSSENTRY_SB1DATA;
-
-    else if (rnxStr == "C6I") iEntry = GNSSENTRY_CB3DATA;
-    else if (rnxStr == "L6I") iEntry = GNSSENTRY_LB3DATA;
-    else if (rnxStr == "D6I") iEntry = GNSSENTRY_DB3DATA;
-    else if (rnxStr == "S6I") iEntry = GNSSENTRY_SB3DATA;
-
-    else if (rnxStr == "C7I") iEntry = GNSSENTRY_CB2DATA;
-    else if (rnxStr == "L7I") iEntry = GNSSENTRY_LB2DATA;
-    else if (rnxStr == "D7I") iEntry = GNSSENTRY_DB2DATA;
-    else if (rnxStr == "S7I") iEntry = GNSSENTRY_SB2DATA;
-  }
-
-  // Set iEntry pointer if required
-  // ------------------------------
-  if (p_iEntry) {
-    *p_iEntry = iEntry;
-  }
-
-  // Return the value if found
-  // -------------------------
-  if (iEntry != -1) {
-    return _measdata[iEntry];
-  }
-  else {
-    return 0.0;
-  }
-}
-
+    if      (rnxStr == "C2I") retVal = GNSSENTRY_CB1DATA;
+    else if (rnxStr == "L2I") retVal = GNSSENTRY_LB1DATA;
+    else if (rnxStr == "D2I") retVal = GNSSENTRY_DB1DATA;
+    else if (rnxStr == "S2I") retVal = GNSSENTRY_SB1DATA;
+
+    else if (rnxStr == "C6I") retVal = GNSSENTRY_CB3DATA;
+    else if (rnxStr == "L6I") retVal = GNSSENTRY_LB3DATA;
+    else if (rnxStr == "D6I") retVal = GNSSENTRY_DB3DATA;
+    else if (rnxStr == "S6I") retVal = GNSSENTRY_SB3DATA;
+
+    else if (rnxStr == "C7I") retVal = GNSSENTRY_CB2DATA;
+    else if (rnxStr == "L7I") retVal = GNSSENTRY_LB2DATA;
+    else if (rnxStr == "D7I") retVal = GNSSENTRY_DB2DATA;
+    else if (rnxStr == "S7I") retVal = GNSSENTRY_SB2DATA;
+  }
+
+  return retVal;
+}
+
Index: /trunk/BNC/src/RTCM/GPSDecoder.h
===================================================================
--- /trunk/BNC/src/RTCM/GPSDecoder.h	(revision 4402)
+++ /trunk/BNC/src/RTCM/GPSDecoder.h	(revision 4403)
@@ -50,7 +50,7 @@
     _dataflags  = 0;
     _dataflags2 = 0;
-    for (int iEntry = 0; iEntry < GNSSENTRY_NUMBER; iEntry++) {
-      _measdata[iEntry] = 0.0;
-      _codetype[iEntry] = 0;
+    for (int ie = 0; ie < GNSSENTRY_NUMBER; ie++) {
+      _measdata[ie] = 0.0;
+      _codetype[ie] = 0;
     }
     slip_cnt_L1 = -1;
@@ -61,6 +61,6 @@
   ~t_obs() {}
 
-  double measdata(const QString& rnxStr, int* iEntry = 0) const;
-  void   setMeasdata(const QString& rnxStr, double value);
+  double measdata(const QString& rnxStr, float rnxVer) const;
+  void   setMeasdata(const QString& rnxStr, float rnxVer, double value);
 
   char   StatID[20+1]; // Station ID
@@ -79,4 +79,7 @@
   unsigned int       _dataflags2;                  // GNSSDF2_xxx */
   const char*        _codetype[GNSSENTRY_NUMBER];
+
+ private:
+  int iEntry(const QString& rnxStr, float rnxVer) const;
 };
 
Index: /trunk/BNC/src/RTCM/RTCM2Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 4402)
+++ /trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 4403)
@@ -148,9 +148,9 @@
           obs.GPSWeek       = epochWeek;
           obs.GPSWeeks      = epochSecs;
-          obs.setMeasdata("C1", _ObsBlock.rng_C1[iSat]);
-          obs.setMeasdata("P1", _ObsBlock.rng_P1[iSat]);
-          obs.setMeasdata("P2", _ObsBlock.rng_P2[iSat]);
-          obs.setMeasdata("L1", _ObsBlock.resolvedPhase_L1(iSat));
-          obs.setMeasdata("L2", _ObsBlock.resolvedPhase_L2(iSat));
+          obs.setMeasdata("C1", 2.0, _ObsBlock.rng_C1[iSat]);
+          obs.setMeasdata("P1", 2.0, _ObsBlock.rng_P1[iSat]);
+          obs.setMeasdata("P2", 2.0, _ObsBlock.rng_P2[iSat]);
+          obs.setMeasdata("L1", 2.0, _ObsBlock.resolvedPhase_L1(iSat));
+          obs.setMeasdata("L2", 2.0, _ObsBlock.resolvedPhase_L2(iSat));
 	  obs.slip_cnt_L1   = _ObsBlock.slip_L1[iSat];
 	  obs.slip_cnt_L2   = _ObsBlock.slip_L2[iSat];
@@ -368,22 +368,22 @@
 	switch (ii) {
 	case 0: // --- L1 ---
-          new_obs->setMeasdata("L1", *obsVal / LAMBDA_1);
+          new_obs->setMeasdata("L1", 2.0, *obsVal / LAMBDA_1);
 	  new_obs->slip_cnt_L1   = corr->lock1;
 	  break;
 	case 1: // --- L2 ---
-          new_obs->setMeasdata("L2", *obsVal / LAMBDA_2);
+          new_obs->setMeasdata("L2", 2.0, *obsVal / LAMBDA_2);
 	  new_obs->slip_cnt_L2   = corr->lock2;
 	  break;
 	case 2: // --- C1 / P1 ---
 	  if ( corr->Pind1 )
-            new_obs->setMeasdata("P1", *obsVal);
+            new_obs->setMeasdata("P1", 2.0, *obsVal);
 	  else
-            new_obs->setMeasdata("C1", *obsVal);
+            new_obs->setMeasdata("C1", 2.0, *obsVal);
 	  break;
 	case 3: // --- C2 / P2 ---
 	  if ( corr->Pind2 )
-            new_obs->setMeasdata("P2", *obsVal);
+            new_obs->setMeasdata("P2", 2.0, *obsVal);
 	  else
-            new_obs->setMeasdata("C2", *obsVal);
+            new_obs->setMeasdata("C2", 2.0, *obsVal);
 	  break;
 	default:
Index: /trunk/BNC/src/bncpppclient.cpp
===================================================================
--- /trunk/BNC/src/bncpppclient.cpp	(revision 4402)
+++ /trunk/BNC/src/bncpppclient.cpp	(revision 4403)
@@ -160,27 +160,22 @@
   // --------------------
   if      (obs.satSys == 'G') {
-    double C1C = obs.measdata("C1C");
-    double C1P = obs.measdata("C1P");
-    double C2C = obs.measdata("C2C");
-    double C2P = obs.measdata("C2P");
-    double L1  = obs.measdata("L1");
-    double L2  = obs.measdata("L2");
-    if ( (C1P || C1C) && (C2P || C2C) && L1 && L2 ) {
+    double C1 = obs.measdata("C1", 2.0);
+    double P1 = obs.measdata("P1", 2.0);
+    double P2 = obs.measdata("P2", 2.0);
+    double L1 = obs.measdata("L1", 2.0);
+    double L2 = obs.measdata("L2", 2.0);
+    if ( (C1 || P1) && P2 && L1 && L2 ) {
       double f1 = t_CST::freq1;
       double f2 = t_CST::freq2;
       double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
       double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
-      if (C1P) {
-        satData->P1 = C1P + (bb ? bb->p1 : 0.0);
+      if (P1) {
+        satData->P1 = P1 + (bb ? bb->p1 : 0.0);
       }
       else {
-        satData->P1 = C1C + (bb ? bb->c1 : 0.0);
-      }
-      if (C2P) {
-        satData->P2 = C2P + (bb ? bb->p2 : 0.0);
-      }
-      else {
-        satData->P2 = C2C;
-      }
+        satData->P1 = C1 + (bb ? bb->c1 : 0.0);
+      }
+      satData->P2 = P2 + (bb ? bb->p2 : 0.0);
+
       satData->L1      = L1 * t_CST::c / f1;
       satData->L2      = L2 * t_CST::c / f2;
@@ -199,26 +194,26 @@
   // ------------------------
   else if (obs.satSys == 'R') {
-    double C1C = obs.measdata("C1C");
-    double C1P = obs.measdata("C1P");
-    double C2C = obs.measdata("C2C");
-    double C2P = obs.measdata("C2P");
-    double L1  = obs.measdata("L1");
-    double L2  = obs.measdata("L2");
-    if ( (C1P || C1C) && (C2P || C2C) && L1 && L2 ) {
+    double C1 = obs.measdata("C1", 2.0);
+    double P1 = obs.measdata("P1", 2.0);
+    double C2 = obs.measdata("C2", 2.0);
+    double P2 = obs.measdata("P2", 2.0);
+    double L1 = obs.measdata("L1", 2.0);
+    double L2 = obs.measdata("L2", 2.0);
+    if ( (P1 || C1) && (P2 || P2) && L1 && L2 ) {
       double f1 = t_CST::f1(obs.satSys, obs.slotNum); 
       double f2 = t_CST::f2(obs.satSys, obs.slotNum); 
       double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
       double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
-      if (C1P) {
-        satData->P1 = C1P + (bb ? bb->p1 : 0.0);
+      if (P1) {
+        satData->P1 = P1 + (bb ? bb->p1 : 0.0);
       }
       else {
-        satData->P1 = C1C + (bb ? bb->c1 : 0.0);
-      }
-      if (C2P) {
-        satData->P2 = C2P + (bb ? bb->p2 : 0.0);
+        satData->P1 = C1 + (bb ? bb->c1 : 0.0);
+      }
+      if (P2) {
+        satData->P2 = P2 + (bb ? bb->p2 : 0.0);
       }
       else {
-        satData->P2 = C2C;
+        satData->P2 = C2;
       }
       satData->L1      = L1 * t_CST::c / f1;
@@ -238,8 +233,8 @@
   // ------------------------
   else if (obs.satSys == 'E') {
-    double C1 = obs.measdata("C1");
-    double L1 = obs.measdata("L1");
-    double C5 = obs.measdata("C5");
-    double L5 = obs.measdata("L5");
+    double C1 = obs.measdata("C1", 3.0);
+    double L1 = obs.measdata("L1", 3.0);
+    double C5 = obs.measdata("C5", 3.0);
+    double L5 = obs.measdata("L5", 3.0);
     if ( C1 && C5 && L1 && L5) {
       double f1 = t_CST::freq1;
Index: /trunk/BNC/src/bncrinex.cpp
===================================================================
--- /trunk/BNC/src/bncrinex.cpp	(revision 4402)
+++ /trunk/BNC/src/bncrinex.cpp	(revision 4403)
@@ -698,12 +698,12 @@
     // ---------------
     else {
-      _out << setw(14) << setprecision(3) << obs.measdata("C1")  << ' '  << ' '
-           << setw(14) << setprecision(3) << obs.measdata("P1")  << ' '  << ' '
-           << setw(14) << setprecision(3) << obs.measdata("L1")  << lli1 << ' '
-           << setw(14) << setprecision(3) << obs.measdata("S1")  << ' '  << ' '
-           << setw(14) << setprecision(3) << obs.measdata("C2")  << ' '  << ' ' << endl
-           << setw(14) << setprecision(3) << obs.measdata("P2")  << ' '  << ' ' 
-           << setw(14) << setprecision(3) << obs.measdata("L2")  << lli2 << ' '
-           << setw(14) << setprecision(3) << obs.measdata("S2")  << endl;
+      _out << setw(14) << setprecision(3) << obs.measdata("C1", _rinexVers)  << ' '  << ' '
+           << setw(14) << setprecision(3) << obs.measdata("P1", _rinexVers)  << ' '  << ' '
+           << setw(14) << setprecision(3) << obs.measdata("L1", _rinexVers)  << lli1 << ' '
+           << setw(14) << setprecision(3) << obs.measdata("S1", _rinexVers)  << ' '  << ' '
+           << setw(14) << setprecision(3) << obs.measdata("C2", _rinexVers)  << ' '  << ' ' << endl
+           << setw(14) << setprecision(3) << obs.measdata("P2", _rinexVers)  << ' '  << ' ' 
+           << setw(14) << setprecision(3) << obs.measdata("L2", _rinexVers)  << lli2 << ' '
+           << setw(14) << setprecision(3) << obs.measdata("S2", _rinexVers)  << endl;
     }
   }
@@ -743,5 +743,5 @@
   const QVector<QString>& types = _rnxTypes[obs.satSys];
   for (int ii = 0; ii < types.size(); ii++) {
-    str << setw(14) << setprecision(3) << obs.measdata(types[ii]) << ' ';
+    str << setw(14) << setprecision(3) << obs.measdata(types[ii], _rinexVers) << ' ';
   }
 
@@ -779,75 +779,71 @@
   }
 
+  float rnxVers = 3.0;
+
   if      (obs.satSys == 'G') { // GPS
     str << "  1C " 
-        << obsToStr(obs.measdata("C1C")) << ' '  
-        << obsToStr(obs.measdata("L1C")) << ' '
-        << obsToStr(obs.measdata("D1C")) << ' '
-        << obsToStr(obs.measdata("S1C"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C1C", rnxVers)) << ' '  
+        << obsToStr(obs.measdata("L1C", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D1C", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S1C", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L1;
-    str << "  1W "
-        << obsToStr(obs.measdata("C1W")) << ' '  
-        << obsToStr(obs.measdata("L1W")) << ' '
-        << obsToStr(obs.measdata("D1W")) << ' '
-        << obsToStr(obs.measdata("S1W"), 8, 3) << ' '
+    str << "  1P " 
+        << obsToStr(obs.measdata("C1P", rnxVers)) << ' '  
+        << obsToStr(obs.measdata("L1P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D1P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S1P", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L1;
     str << "  2P "
-        << obsToStr(obs.measdata("C2P")) << ' '
-        << obsToStr(obs.measdata("L2P")) << ' '
-        << obsToStr(obs.measdata("D2P")) << ' '
-        << obsToStr(obs.measdata("S2P"), 8, 3) << ' '
-        << setw(2)  << obs.slip_cnt_L2;
-    str << "  2X "
-        << obsToStr(obs.measdata("C2X")) << ' '  
-        << obsToStr(obs.measdata("L2X")) << ' '
-        << obsToStr(obs.measdata("D2X")) << ' ' 
-        << obsToStr(obs.measdata("S2X"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C2P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("L2P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D2P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S2P", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L2;
     str << "  5C "
-        << obsToStr(obs.measdata("C5")) << ' '
-        << obsToStr(obs.measdata("L5")) << ' '
-        << obsToStr(obs.measdata("D5")) << ' '
-        << obsToStr(obs.measdata("S5"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C5", rnxVers)) << ' '
+        << obsToStr(obs.measdata("L5", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D5", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S5", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L5;
   }
   else if (obs.satSys == 'R') { // Glonass
     str << "  1C "
-        << obsToStr(obs.measdata("C1C")) << ' '  
-        << obsToStr(obs.measdata("L1C")) << ' '
-        << obsToStr(obs.measdata("D1C")) << ' '
-        << obsToStr(obs.measdata("S1C"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C1C", rnxVers)) << ' '  
+        << obsToStr(obs.measdata("L1C", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D1C", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S1C", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L1;
     str << "  1P "
-        << obsToStr(obs.measdata("C1P")) << ' '  
-        << obsToStr(obs.measdata("L1P")) << ' '
-        << obsToStr(obs.measdata("D1P")) << ' '
-        << obsToStr(obs.measdata("S1P"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C1P", rnxVers)) << ' '  
+        << obsToStr(obs.measdata("L1P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D1P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S1P", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L1;
     str << "  2P "
-        << obsToStr(obs.measdata("C2P")) << ' '
-        << obsToStr(obs.measdata("L2P")) << ' '
-        << obsToStr(obs.measdata("D2P")) << ' '
-        << obsToStr(obs.measdata("S2P"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C2P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("L2P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D2P", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S2P", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L2;
     str << "  2C "
-        << obsToStr(obs.measdata("C2C")) << ' '  
-        << obsToStr(obs.measdata("L2C")) << ' '
-        << obsToStr(obs.measdata("D2C")) << ' ' 
-        << obsToStr(obs.measdata("S2C"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C2C", rnxVers)) << ' '  
+        << obsToStr(obs.measdata("L2C", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D2C", rnxVers)) << ' ' 
+        << obsToStr(obs.measdata("S2C", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L2;
   }
   else if (obs.satSys == 'E') { // Galileo
     str << " 1C "
-        << obsToStr(obs.measdata("C1")) << ' '  
-        << obsToStr(obs.measdata("L1")) << ' '
-        << obsToStr(obs.measdata("D1")) << ' '
-        << obsToStr(obs.measdata("S1"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C1", rnxVers)) << ' '  
+        << obsToStr(obs.measdata("L1", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D1", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S1", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L1;
 
     str << "  5C "
-        << obsToStr(obs.measdata("C5")) << ' '        
-        << obsToStr(obs.measdata("L5")) << ' '
-        << obsToStr(obs.measdata("D5")) << ' '
-        << obsToStr(obs.measdata("S5"), 8, 3) << ' '
+        << obsToStr(obs.measdata("C5", rnxVers)) << ' '        
+        << obsToStr(obs.measdata("L5", rnxVers)) << ' '
+        << obsToStr(obs.measdata("D5", rnxVers)) << ' '
+        << obsToStr(obs.measdata("S5", rnxVers), 8, 3) << ' '
         << setw(2)  << obs.slip_cnt_L5;
   }
Index: /trunk/BNC/src/rinex/bncpostprocess.cpp
===================================================================
--- /trunk/BNC/src/rinex/bncpostprocess.cpp	(revision 4402)
+++ /trunk/BNC/src/rinex/bncpostprocess.cpp	(revision 4403)
@@ -119,5 +119,5 @@
   for (int iType = 0; iType < rnxObsFile->nTypes(obs.satSys); iType++) {
     QString type = rnxObsFile->obsType(obs.satSys,iType).toAscii();
-    obs.setMeasdata(type, rnxSat.obs[iType]);
+    obs.setMeasdata(type, rnxObsFile->version(), rnxSat.obs[iType]);
     // TOOD: handle slip flags
   }
Index: /trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- /trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4402)
+++ /trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4403)
@@ -237,6 +237,6 @@
   // Compute the Multipath
   // ----------------------
-  double L1 = obs.measdata("L1");
-  double L2 = obs.measdata("L2");
+  double L1 = obs.measdata("L1", 2.0);
+  double L2 = obs.measdata("L2", 2.0);
   if (L1 != 0.0 && L2 != 0.0) {
     double f1 = t_CST::f1(obs.satSys, obs.slotNum);
@@ -246,5 +246,5 @@
     L2 = L2 * t_CST::c / f2;
 
-    double P1 = obs.measdata("P1");
+    double P1 = obs.measdata("P1", 2.0);
     if (P1 != 0.0) {
       newObs->_MP1 = P1 - L1 - 2.0*f2*f2/(f1*f1-f2*f2) * (L1 - L2);
@@ -258,5 +258,5 @@
       //// end test
     }
-    double P2 = obs.measdata("P2");
+    double P2 = obs.measdata("P2", 2.0);
     if (P2 != 0.0) {
       newObs->_MP2 = P2 - L2 - 2.0*f1*f1/(f1*f1-f2*f2) * (L1 - L2);
