Index: trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- trunk/BNC/src/PPP/pppFilter.cpp	(revision 9084)
+++ trunk/BNC/src/PPP/pppFilter.cpp	(revision 9088)
@@ -441,5 +441,5 @@
 
         if (_slips[obs->prn()]._obsSlipCounter != -1 &&
-            _slips[obs->prn()]._obsSlipCounter > obs->slipCounter()) {
+            _slips[obs->prn()]._obsSlipCounter != obs->slipCounter()) {
           LOG << epoTimeStr  << "cycle slip set (obsSlipCounter) " << obs->prn().toString()  << endl;
           slip = true;
Index: trunk/BNC/src/RTCM/RTCM2Decoder.cpp
===================================================================
--- trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 9084)
+++ trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 9088)
@@ -154,6 +154,5 @@
           frqObs1P->_phaseValid = true;
           frqObs1P->_phase = _ObsBlock.resolvedPhase_L1(iSat);
-          //frqObs1P->_slipCounter = _ObsBlock.slip_L1[iSat];
-          frqObs1P->_slipCounter = -1; // because RTCM2 definition is vice versa to RTCM3
+          frqObs1P->_slipCounter = _ObsBlock.slip_L1[iSat];
           obs._obs.push_back(frqObs1P);
 
@@ -164,6 +163,5 @@
           frqObs2P->_phaseValid = true;
           frqObs2P->_phase = _ObsBlock.resolvedPhase_L2(iSat);
-          //frqObs2P->_slipCounter = _ObsBlock.slip_L2[iSat];
-          frqObs2P->_slipCounter = -1; // because RTCM2 definition is vice versa to RTCM3
+          frqObs2P->_slipCounter = _ObsBlock.slip_L2[iSat];
           obs._obs.push_back(frqObs2P);
 
Index: trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 9084)
+++ trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 9088)
@@ -148,8 +148,7 @@
       frqObs->_codeValid = frqObs->_phaseValid = true;
     }
-    GETBITS(i, 7);
-    frqObs->_lockTime = lti2sec(type,i);
+    GETBITS(frqObs->_lockTimeIndicator, 7);
+    frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
     frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
-    frqObs->_slipCounter = i;
     if (type == 1002 || type == 1004) {
       GETBITS(amb, 8);
@@ -194,8 +193,7 @@
         frqObs->_phaseValid = true;
       }
-      GETBITS(i, 7);
-      frqObs->_lockTime = lti2sec(type,i);
+      GETBITS(frqObs->_lockTimeIndicator, 7);
+      frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
       frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
-      frqObs->_slipCounter = i;
       if (type == 1004) {
         GETBITS(i, 8);
@@ -768,5 +766,5 @@
                   frqObs->_lockTime = lti2sec(type,ll[count]);
                   frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
-                  frqObs->_slipCounter = ll[count];
+                  frqObs->_lockTimeIndicator = ll[count];
                 }
                 break;
@@ -783,5 +781,5 @@
                   frqObs->_lockTime = lti2sec(type,ll[count]);
                   frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
-                  frqObs->_slipCounter = ll[count];
+                  frqObs->_lockTimeIndicator = ll[count];
                 }
                 break;
@@ -798,5 +796,5 @@
                   frqObs->_lockTime = lti2sec(type,ll[count]);
                   frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
-                  frqObs->_slipCounter = ll[count];
+                  frqObs->_lockTimeIndicator = ll[count];
                 }
                 frqObs->_snr = cnr[count];
@@ -815,5 +813,5 @@
                   frqObs->_lockTime = lti2sec(type,ll[count]);
                   frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
-                  frqObs->_slipCounter = ll[count];
+                  frqObs->_lockTimeIndicator = ll[count];
                 }
                 frqObs->_snr = cnr[count];
@@ -836,5 +834,5 @@
                   frqObs->_lockTime = lti2sec(type,ll[count]);
                   frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
-                  frqObs->_slipCounter = ll[count];
+                  frqObs->_lockTimeIndicator = ll[count];
                 }
 
@@ -854,5 +852,5 @@
                   frqObs->_lockTime = lti2sec(type,ll[count]);
                   frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
-                  frqObs->_slipCounter = ll[count];
+                  frqObs->_lockTimeIndicator = ll[count];
                 }
 
@@ -938,12 +936,10 @@
     if ((i & ((1 << 20) - 1)) != 0x80000) {
       frqObs->_code = l1range * 0.02;
-      frqObs->_phase = (l1range * 0.02 + i * 0.0005)
-          / GLO_WAVELENGTH_L1(freq - 7);
+      frqObs->_phase = (l1range * 0.02 + i * 0.0005) / GLO_WAVELENGTH_L1(freq - 7);
       frqObs->_codeValid = frqObs->_phaseValid = true;
     }
-    GETBITS(i, 7);
-    frqObs->_lockTime = lti2sec(type,i);
+    GETBITS(frqObs->_lockTimeIndicator, 7);
+    frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
     frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
-    frqObs->_slipCounter = i;
     if (type == 1010 || type == 1012) {
       GETBITS(amb, 7);
@@ -988,8 +984,7 @@
         frqObs->_phaseValid = true;
       }
-      GETBITS(i, 7);
-      frqObs->_lockTime = lti2sec(type,i);
+      GETBITS(frqObs->_lockTimeIndicator, 7);
+      frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
       frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
-      frqObs->_slipCounter = i;
       if (type == 1012) {
         GETBITS(i, 8);
Index: trunk/BNC/src/bnccaster.cpp
===================================================================
--- trunk/BNC/src/bnccaster.cpp	(revision 9084)
+++ trunk/BNC/src/bnccaster.cpp	(revision 9088)
@@ -178,5 +178,5 @@
     // Update/Set Slip Counters
     // ------------------------
-    //setSlipCounters(obs);
+    setSlipCounters(obs);
 
     // Output into the socket
Index: trunk/BNC/src/bncrinex.cpp
===================================================================
--- trunk/BNC/src/bncrinex.cpp	(revision 9084)
+++ trunk/BNC/src/bncrinex.cpp	(revision 9088)
@@ -648,4 +648,5 @@
           << right << setw(14) << setprecision(3) << frqObs->_phase << ' '
           << right << setw(4)                     << frqObs->_slipCounter;
+          //<< right << setw(4)                     << frqObs->_lockTimeIndicator;
     }
     if (frqObs->_dopplerValid) {
Index: trunk/BNC/src/bncutils.cpp
===================================================================
--- trunk/BNC/src/bncutils.cpp	(revision 9084)
+++ trunk/BNC/src/bncutils.cpp	(revision 9088)
@@ -1003,5 +1003,5 @@
 }
 
-// Convert RTCM3 lock-time indicator to lock time in seconds
+// Convert RTCM3 lock-time indicator to minimum lock time in seconds
 ////////////////////////////////////////////////////////////////////////////
 double lti2sec(int type, int lti) {
@@ -1017,5 +1017,5 @@
     else if (lti< 127) return  32*lti-3096; // [744  32  905]
     else if (lti==127) return  937;
-    else               return  -1;
+    else               return  -1.0;
   }
   else if (type%10==2 || type%10==3 ||
@@ -1038,5 +1038,5 @@
       case(14) : return 262144e-3;
       case(15) : return 524288e-3;
-      default  : return     -1;
+      default  : return     -1.0;
     };
   }
@@ -1065,8 +1065,8 @@
     else if (lti< 704) return (1048576*lti-671088640 )*1e-3;
     else if (lti==704) return (2097152*lti-1409286144)*1e-3;
-    else               return (     -1               );
+    else               return (     -1.0               );
   }
   else {
-    return -1;
+    return -1.0;
   };
 };
Index: trunk/BNC/src/satObs.h
===================================================================
--- trunk/BNC/src/satObs.h	(revision 9084)
+++ trunk/BNC/src/satObs.h	(revision 9088)
@@ -15,17 +15,18 @@
  public:
   t_frqObs() {
-    _code            = 0.0;
-    _codeValid       = false;
-    _phase           = 0.0;
-    _phaseValid      = false;
-    _doppler         = 0.0;
-    _dopplerValid    = false;
-    _snr             = 0.0;
-    _snrValid        = false;
-    _lockTime        = 0.0;
-    _lockTimeValid   = false;    
-    _slip            = false;
-    _slipCounter     = 0;
-    _biasJumpCounter = 0;
+    _code              = 0.0;
+    _codeValid         = false;
+    _phase             = 0.0;
+    _phaseValid        = false;
+    _doppler           = 0.0;
+    _dopplerValid      = false;
+    _snr               = 0.0;
+    _snrValid          = false;
+    _lockTime          = -1.0;
+    _lockTimeValid     = false;
+    _slip              = false;
+    _slipCounter       =  0;
+    _biasJumpCounter   =  0;
+    _lockTimeIndicator = -1;
   }
   std::string       _rnxType2ch;
@@ -39,8 +40,9 @@
   bool              _snrValid;
   double            _lockTime;
-  bool              _lockTimeValid;    
-  bool              _slip;
-  int               _slipCounter;
-  int               _biasJumpCounter;
+  bool              _lockTimeValid;
+  bool              _slip;              // RINEX
+  int               _slipCounter;       // RTCM2 or converted from RTCM3
+  int               _lockTimeIndicator; // RTCM3
+  int               _biasJumpCounter;   // ??
 };
 
