Index: /trunk/BNC/src/GPSDecoder.h
===================================================================
--- /trunk/BNC/src/GPSDecoder.h	(revision 10691)
+++ /trunk/BNC/src/GPSDecoder.h	(revision 10692)
@@ -62,9 +62,9 @@
   struct t_typeInfo {
     t_typeInfo() {
-      type = 0;
-      size = 0;
+      _type = 0;
+      _size = 0;
     };
-    int    type;
-    size_t size;
+    int    _type;
+    size_t _size;
   };
 
@@ -74,17 +74,17 @@
 
     t_antRefPoint() {
-      xx = yy = zz = height = 0.0;
-      type = ARP;
-      height_f = false;
-      message  = 0;
+      _xx = _yy = _zz = _height = 0.0;
+      _type = ARP;
+      _height_f = false;
+      _message  = 0;
     };
 
-    double xx;
-    double yy;
-    double zz;
-    t_type type;
-    double height;
-    bool   height_f;
-    int    message;
+    double _xx;
+    double _yy;
+    double _zz;
+    t_type _type;
+    double _height;
+    bool   _height_f;
+    int    _message;
   };
 
@@ -92,6 +92,6 @@
     t_antInfo() {
     };
-    char descriptor[256];
-    char serialnumber[256];
+    char _descriptor[256];
+    char _serialnumber[256];
   };
 
@@ -99,7 +99,7 @@
     t_recInfo() {
     };
-    char descriptor[256];
-    char serialnumber[256];
-    char firmware[256];
+    char _descriptor[256];
+    char _serialnumber[256];
+    char _firmware[256];
   };
 
@@ -107,58 +107,64 @@
   public:
     t_GloBiasInfo() {
-      clear();
+      init();
     };
-    bool operator==(const t_GloBiasInfo& biasInfo2) const {
-      if (staID     == biasInfo2.staID &&
-          indicator == biasInfo2.indicator &&
-          L1C_value == biasInfo2.L1C_value &&
-          L1P_value == biasInfo2.L1P_value &&
-          L2C_value == biasInfo2.L2C_value &&
-          L2P_value == biasInfo2.L2P_value  ) {
+    bool operator!=(const t_GloBiasInfo& gloBiasInfo2) {
+
+      if (_staID     != gloBiasInfo2._staID     ||
+          _indicator != gloBiasInfo2._indicator ||
+          (fabs(_L1C_value - gloBiasInfo2._L1C_value) > 0.000000000001 ) ||
+          (fabs(_L1P_value - gloBiasInfo2._L1P_value) > 0.000000000001 ) ||
+          (fabs(_L2C_value - gloBiasInfo2._L2C_value) > 0.000000000001 ) ||
+          (fabs(_L2P_value - gloBiasInfo2._L2P_value) > 0.000000000001 )  ) {
+        setChanged(true);
         return true;
       }
       else {
+        setChanged(false);
         return false;
       }
     }
 
-    void set(const t_GloBiasInfo& biasInfo) {
-      staID     = biasInfo.staID;
-      indicator = biasInfo.indicator;
-      L1C_value = biasInfo.L1C_value;
-      L1P_value = biasInfo.L1P_value;
-      L2C_value = biasInfo.L2C_value;
-      L2P_value = biasInfo.L2P_value;
-      changed = true;
+    void set(const t_GloBiasInfo& gloBiasInfo) {
+      _staID     = gloBiasInfo._staID;
+      _indicator = gloBiasInfo._indicator;
+      _L1C_value = gloBiasInfo._L1C_value;
+      _L1P_value = gloBiasInfo._L1P_value;
+      _L2C_value = gloBiasInfo._L2C_value;
+      _L2P_value = gloBiasInfo._L2P_value;
     }
-
-    void clear() {
-      staID = 0;
-      indicator = 0;
-      L1C_value = 0.0;
-      L1P_value = 0.0;
-      L2C_value = 0.0;
-      L2P_value = 0.0;
-      changed = false;
+    void setChanged(bool changed) {
+      _changed = changed;
+    }
+    bool changed() {return _changed;};
+    void init() {
+      _staID = 0;
+      _indicator = 1;
+      _L1C_value = 0.0;
+      _L1P_value = 0.0;
+      _L2C_value = 0.0;
+      _L2P_value = 0.0;
+      _changed = false;
     }
     QString toString() {
-      QString biasIndicator =  (indicator == 1) ? QString("aligned") : QString("unaligned");
+      QString biasIndicator =  (_indicator == 1) ? QString("aligned") : QString("unaligned");
       QString biasesStr =
           QString(": GLONASS L1/L2 Code-Phase Biases: staID=%1 indicator=%2 L1C=%3 L1P=%4 L2C=%5 L2P=%6")
-          .arg(staID).arg(biasIndicator)
-          .arg(L1C_value, 0, 'f', 2)
-          .arg(L1P_value, 0, 'f', 2)
-          .arg(L2C_value, 0, 'f', 2)
-          .arg(L2P_value, 0, 'f', 2);
+          .arg(_staID).arg(biasIndicator)
+          .arg(_L1C_value, 0, 'f', 2)
+          .arg(_L1P_value, 0, 'f', 2)
+          .arg(_L2C_value, 0, 'f', 2)
+          .arg(_L2P_value, 0, 'f', 2);
 
       return biasesStr;
     }
-    int      staID;
-    int      indicator;
-    double   L1C_value;
-    double   L1P_value;
-    double   L2C_value;
-    double   L2P_value;
-    bool     changed;
+
+    int      _staID;
+    int      _indicator;
+    double   _L1C_value;
+    double   _L1P_value;
+    double   _L2C_value;
+    double   _L2P_value;
+    bool     _changed;
 
 
@@ -175,5 +181,5 @@
   QList<t_rtcmCrs>        _rtcmCrs;            // RTCM CRS
   QString                 _gloFrq;             // GLONASS slot
-  t_GloBiasInfo           _gloBiases;          // RTCM GLO bias information message
+  t_GloBiasInfo           _gloBiasInfo;          // RTCM GLO bias information message
   bncRinex*               _rnx;                // RINEX writer
 };
Index: /trunk/BNC/src/RTCM/RTCM2Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 10691)
+++ /trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 10692)
@@ -118,7 +118,7 @@
     }
 
-    // Store message number
+    // Store _message number
     _typeList.push_back(t_typeInfo());
-    _typeList.back().type = _PP.ID();
+    _typeList.back()._type = _PP.ID();
     //_typeList.back().size = 0;
 
@@ -210,8 +210,8 @@
         _antList.push_back(t_antRefPoint());
 
-        this->getStaCrd(_antList.back().xx, _antList.back().yy, _antList.back().zz);
-
-        _antList.back().type = t_antRefPoint::APC;
-        _antList.back().message = _PP.ID();
+        this->getStaCrd(_antList.back()._xx, _antList.back()._yy, _antList.back()._zz);
+
+        _antList.back()._type = t_antRefPoint::APC;
+        _antList.back()._message = _PP.ID();
       }
     } else if (_PP.ID() == 23) {
@@ -220,11 +220,11 @@
         int serlen = strlen(_msg23.antSN.c_str());
         if ((antlen) &&
-            (_antType.empty() || strncmp(_antType.back().descriptor, _msg23.antType.c_str(), antlen) != 0)) {
+            (_antType.empty() || strncmp(_antType.back()._descriptor, _msg23.antType.c_str(), antlen) != 0)) {
           _antType.push_back(t_antInfo());
-          memcpy(_antType.back().descriptor, _msg23.antType.c_str(), antlen);
-          _antType.back().descriptor[antlen] = 0;
+          memcpy(_antType.back()._descriptor, _msg23.antType.c_str(), antlen);
+          _antType.back()._descriptor[antlen] = 0;
           if (serlen) {
-            memcpy(_antType.back().serialnumber,  _msg23.antSN.c_str(), serlen);
-            _antType.back().serialnumber[serlen] = 0;
+            memcpy(_antType.back()._serialnumber,  _msg23.antSN.c_str(), serlen);
+            _antType.back()._serialnumber[serlen] = 0;
           }
         }
@@ -234,13 +234,13 @@
         _antList.push_back(t_antRefPoint());
 
-        _antList.back().xx = _msg24.x;
-        _antList.back().yy = _msg24.y;
-        _antList.back().zz = _msg24.z;
-
-        _antList.back().height_f = true;
-        _antList.back().height = _msg24.h;
-
-        _antList.back().type = t_antRefPoint::ARP;
-        _antList.back().message = _PP.ID();
+        _antList.back()._xx = _msg24.x;
+        _antList.back()._yy = _msg24.y;
+        _antList.back()._zz = _msg24.z;
+
+        _antList.back()._height_f = true;
+        _antList.back()._height = _msg24.h;
+
+        _antList.back()._type = t_antRefPoint::ARP;
+        _antList.back()._message = _PP.ID();
       }
     }
@@ -265,5 +265,5 @@
   currentGPSWeeks(refWeek, refSecs);
 
-  // Resolve receiver time of measurement (see RTCM 2.3, page 4-42, Message 18, Note 1)
+  // Resolve receiver time of measurement (see RTCM 2.3, page 4-42, message 18, Note 1)
   // ----------------------------------------------------------------------------------
   double hoursec_est = _msg2021.hoursec();      // estimated time of measurement
Index: /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 10691)
+++ /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 10692)
@@ -1958,5 +1958,5 @@
   char *antserialnum;
   char *receiver;
-  char *recfirmware;
+  char *rec_firmware;
   char *recserialnum;
   int type;
@@ -1975,8 +1975,8 @@
   GETSTRING(antnum, antenna)
   if ((antnum > -1 && antnum < 265) &&
-      (_antType.empty() || strncmp(_antType.back().descriptor, antenna, recnum) != 0)) {
+      (_antType.empty() || strncmp(_antType.back()._descriptor, antenna, recnum) != 0)) {
     _antType.push_back(t_antInfo());
-    memcpy(_antType.back().descriptor, antenna, antnum);
-    _antType.back().descriptor[antnum] = 0;
+    memcpy(_antType.back()._descriptor, antenna, antnum);
+    _antType.back()._descriptor[antnum] = 0;
   }
   SKIPBITS(8) /* antenna setup ID */
@@ -1984,6 +1984,6 @@
     GETSTRING(antsernum, antserialnum)
     if ((antsernum > -1 && antsernum < 265)) {
-      memcpy(_antType.back().serialnumber, antserialnum, antsernum);
-      _antType.back().serialnumber[antsernum] = 0;
+      memcpy(_antType.back()._serialnumber, antserialnum, antsernum);
+      _antType.back()._serialnumber[antsernum] = 0;
     }
   }
@@ -1991,18 +1991,18 @@
   if (type == 1033) {
     GETSTRING(recnum, receiver)
-    GETSTRING(recfirnum, recfirmware)
+    GETSTRING(recfirnum, rec_firmware)
     GETSTRING(recsernum, recserialnum)
     if ((recnum > -1 && recnum < 265) &&
-        (_recType.empty() || strncmp(_recType.back().descriptor, receiver, recnum) != 0)) {
+        (_recType.empty() || strncmp(_recType.back()._descriptor, receiver, recnum) != 0)) {
       _recType.push_back(t_recInfo());
-      memcpy(_recType.back().descriptor, receiver, recnum);
-      _recType.back().descriptor[recnum] = 0;
+      memcpy(_recType.back()._descriptor, receiver, recnum);
+      _recType.back()._descriptor[recnum] = 0;
       if (recfirnum > -1 && recfirnum < 265) {
-        memcpy(_recType.back().firmware, recfirmware, recfirnum);
-        _recType.back().firmware[recfirnum] = 0;
+        memcpy(_recType.back()._firmware, rec_firmware, recfirnum);
+        _recType.back()._firmware[recfirnum] = 0;
       }
       if (recsernum > -1 && recsernum < 265) {
-        memcpy(_recType.back().serialnumber, recserialnum, recsernum);
-        _recType.back().serialnumber[recsernum] = 0;
+        memcpy(_recType.back()._serialnumber, recserialnum, recsernum);
+        _recType.back()._serialnumber[recsernum] = 0;
       }
     }
@@ -2023,21 +2023,21 @@
   GETBITS(type, 12)
   _antList.push_back(t_antRefPoint());
-  _antList.back().type = t_antRefPoint::ARP;
+  _antList.back()._type = t_antRefPoint::ARP;
   SKIPBITS(22)
   GETBITSSIGN(x, 38)
-  _antList.back().xx = x * 1e-4;
+  _antList.back()._xx = x * 1e-4;
   SKIPBITS(2)
   GETBITSSIGN(y, 38)
-  _antList.back().yy = y * 1e-4;
+  _antList.back()._yy = y * 1e-4;
   SKIPBITS(2)
   GETBITSSIGN(z, 38)
-  _antList.back().zz = z * 1e-4;
+  _antList.back()._zz = z * 1e-4;
   if (type == 1006) {
     double h;
     GETBITS(h, 16)
-    _antList.back().height = h * 1e-4;
-    _antList.back().height_f = true;
-  }
-  _antList.back().message = type;
+    _antList.back()._height = h * 1e-4;
+    _antList.back()._height_f = true;
+  }
+  _antList.back()._message = type;
 
   return true;
@@ -2047,5 +2047,6 @@
 ////////////////////////////////////////////////////////////////////////////
 bool RTCM3Decoder::DecodeGLONASSCodePhaseBiases(unsigned char* data, int size) {
-  t_GloBiasInfo gloBiases;
+  t_GloBiasInfo gloBiasInfo;
+  int i = 0;
   uint64_t numbits = 0, bitfield = 0;
 
@@ -2054,8 +2055,8 @@
 
   SKIPBITS(12) // Message Number
-  GETBITS(gloBiases.staID, 12)
-  GETBITS(gloBiases.indicator, 1) // 0.. not aligned, 1.. aligned
+  GETBITS(gloBiasInfo._staID, 12)
+  GETBITS(gloBiasInfo._indicator, 1) // 0.. not aligned, 1.. aligned
   SKIPBITS(3) // reserved bits
-  unsigned bitmask;
+  unsigned int bitmask;
   GETBITS(bitmask, 4)
   bool L1C_valid = bitExtracted(unsigned(bitmask), 1, 0);
@@ -2065,18 +2066,22 @@
 
   if (L1C_valid) {
-    GETBITS(gloBiases.L1C_value, 16)
+    GETBITSSIGN(i, 16)
+    gloBiasInfo._L1C_value = i * 0.02;
   }
   if (L1P_valid) {
-    GETBITS(gloBiases.L1P_value, 16)
+    GETBITSSIGN(i, 16)
+    gloBiasInfo._L1P_value = i * 0.02;
   }
   if (L2C_valid) {
-    GETBITS(gloBiases.L2C_value, 16)
+    GETBITSSIGN(i, 16)
+    gloBiasInfo._L2C_value = i * 0.02;
   }
   if (L2P_valid) {
-    GETBITS(gloBiases.L2P_value, 16)
-  }
-
-  if (!(_gloBiases == gloBiases)) {
-    _gloBiases.set(gloBiases);
+    GETBITSSIGN(i, 16)
+    gloBiasInfo._L2P_value = i * 0.02;
+  }
+
+  if (_gloBiasInfo != gloBiasInfo) {
+    _gloBiasInfo.set(gloBiasInfo);
   }
 
@@ -2251,6 +2256,6 @@
       /* store the id and message size into the list of loaded blocks */
       _typeList.push_back(t_typeInfo());
-      _typeList.back().type = id;
-      _typeList.back().size = _BlockSize -6; /* header + crc */
+      _typeList.back()._type = id;
+      _typeList.back()._size = _BlockSize -6; /* header + crc */
 
       /* SSR I+II data handled in another function, already pass the
@@ -2274,5 +2279,5 @@
         }
       }
-      else if (id >= 1070 && id <= 1237) { /* MSM */
+      else if (id >= 1070 && id <= 1137) { /* MSM */
         if (DecodeRTCM3MSM(_Message, _BlockSize))
           decoded = true;
Index: /trunk/BNC/src/bncgetthread.cpp
===================================================================
--- /trunk/BNC/src/bncgetthread.cpp	(revision 10691)
+++ /trunk/BNC/src/bncgetthread.cpp	(revision 10692)
@@ -572,5 +572,5 @@
         }
         while (it.hasNext()) {
-          int rtcmType = it.next().type;
+          int rtcmType = it.next()._type;
           if ((rtcmType >= 1001 && rtcmType <= 1004) || // legacy RTCM OBS
               (rtcmType >= 1009 && rtcmType <= 1012) || // legacy RTCM OBS
@@ -818,6 +818,6 @@
       // ------------------
       for (int ii = 0; ii < decoder()->_typeList.size(); ii++) {
-        QString type = QString("%1 ").arg(decoder()->_typeList[ii].type);
-        QString size = (decoder()->_typeList[ii].size) ? QString("(size %1)").arg(decoder()->_typeList[ii].size) : "";
+        QString type = QString("%1 ").arg(decoder()->_typeList[ii]._type);
+        QString size = (decoder()->_typeList[ii]._size) ? QString("(size %1)").arg(decoder()->_typeList[ii]._size) : "";
         emit(newMessage(_staID + ": Received message type " + type.toLatin1() +  size.toLatin1(), true));
       }
@@ -897,8 +897,8 @@
       // -------------------------
       for (int ii = 0; ii < decoder()->_antType.size(); ii++) {
-        QString ant1 = QString(": Antenna Descriptor: %1 ").arg(decoder()->_antType[ii].descriptor);
+        QString ant1 = QString(": Antenna Descriptor: %1 ").arg(decoder()->_antType[ii]._descriptor);
         emit(newMessage(_staID + ant1.toLatin1(), true));
-        if (strlen(decoder()->_antType[ii].serialnumber)) {
-          QString ant2 = QString(": Antenna Serial Number: %1 ").arg(decoder()->_antType[ii].serialnumber);
+        if (strlen(decoder()->_antType[ii]._serialnumber)) {
+          QString ant2 = QString(": Antenna Serial Number: %1 ").arg(decoder()->_antType[ii]._serialnumber);
           emit(newMessage(_staID + ant2.toLatin1(), true));
         }
@@ -909,25 +909,25 @@
       for (int ii = 0; ii < decoder()->_antList.size(); ii++) {
         QByteArray antT;
-        if (decoder()->_antList[ii].type == GPSDecoder::t_antRefPoint::ARP) {
+        if (decoder()->_antList[ii]._type == GPSDecoder::t_antRefPoint::ARP) {
           antT = "ARP";
-        } else if (decoder()->_antList[ii].type == GPSDecoder::t_antRefPoint::APC) {
+        } else if (decoder()->_antList[ii]._type == GPSDecoder::t_antRefPoint::APC) {
           antT = "APC";
         }
         QByteArray ant1, ant2, ant3;
-        ant1 = QString("%1 ").arg(decoder()->_antList[ii].xx, 0, 'f', 4).toLatin1();
-        ant2 = QString("%1 ").arg(decoder()->_antList[ii].yy, 0, 'f', 4).toLatin1();
-        ant3 = QString("%1 ").arg(decoder()->_antList[ii].zz, 0, 'f', 4).toLatin1();
+        ant1 = QString("%1 ").arg(decoder()->_antList[ii]._xx, 0, 'f', 4).toLatin1();
+        ant2 = QString("%1 ").arg(decoder()->_antList[ii]._yy, 0, 'f', 4).toLatin1();
+        ant3 = QString("%1 ").arg(decoder()->_antList[ii]._zz, 0, 'f', 4).toLatin1();
         emit(newMessage(_staID + ": " + antT + " (ITRF) X " + ant1 + "m", true));
         emit(newMessage(_staID + ": " + antT + " (ITRF) Y " + ant2 + "m", true));
         emit(newMessage(_staID + ": " + antT + " (ITRF) Z " + ant3 + "m", true));
         double hh = 0.0;
-        if (decoder()->_antList[ii].height_f) {
-          hh = decoder()->_antList[ii].height;
+        if (decoder()->_antList[ii]._height_f) {
+          hh = decoder()->_antList[ii]._height;
           QByteArray ant4 = QString("%1 ").arg(hh, 0, 'f', 4).toLatin1();
           emit(newMessage(
               _staID + ": Antenna height above marker " + ant4 + "m", true));
         }
-        emit(newAntCrd(_staID, decoder()->_antList[ii].xx,
-            decoder()->_antList[ii].yy, decoder()->_antList[ii].zz, hh, antT));
+        emit(newAntCrd(_staID, decoder()->_antList[ii]._xx,
+            decoder()->_antList[ii]._yy, decoder()->_antList[ii]._zz, hh, antT));
       }
 
@@ -935,7 +935,7 @@
       // --------------------------
       for (int ii = 0; ii < decoder()->_recType.size(); ii++) {
-        QString rec1 = QString(": Receiver Descriptor: %1 ").arg(decoder()->_recType[ii].descriptor);
-        QString rec2 = QString(": Receiver Firmware Version: %1 ").arg(decoder()->_recType[ii].firmware);
-        QString rec3 = QString(": Receiver Serial Number: %1 ").arg(decoder()->_recType[ii].serialnumber);
+        QString rec1 = QString(": Receiver Descriptor: %1 ").arg(decoder()->_recType[ii]._descriptor);
+        QString rec2 = QString(": Receiver Firmware Version: %1 ").arg(decoder()->_recType[ii]._firmware);
+        QString rec3 = QString(": Receiver Serial Number: %1 ").arg(decoder()->_recType[ii]._serialnumber);
         emit(newMessage(_staID + rec1.toLatin1(), true));
         emit(newMessage(_staID + rec2.toLatin1(), true));
@@ -963,7 +963,8 @@
       // RTCM GLONASS Code-Phase biases (MT 1230)
       // ----------------------------------------
-      if (decoder()->_gloBiases.changed) {
-        QString gloCodePhaseBiases = decoder()->_gloBiases.toString();
+      if (decoder()->_gloBiasInfo.changed()) {
+        QString gloCodePhaseBiases = decoder()->_gloBiasInfo.toString();
         emit(newMessage(_staID + gloCodePhaseBiases.toLatin1(), true));
+        decoder()->_gloBiasInfo.setChanged(false);
       }
 
