Index: /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.c
===================================================================
--- /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.c	(revision 8971)
+++ /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.c	(revision 8972)
@@ -17,4 +17,5 @@
 #endif
 #include <clock_orbit_igs.h>
+
 
 static uint32_t CRC24(long size, const unsigned char *buf) {
@@ -570,5 +571,5 @@
     struct PhaseBias *pb, const char *buffer, size_t size, int *bytesused) {
   int mmi = 0, h, rs;
-  unsigned int type, pos, i, j, s, nums, id;
+  unsigned int type, pos, i, j, s, nums, id, version;
   size_t sizeofrtcmblock;
   const char *blockstart = buffer;
@@ -578,6 +579,6 @@
     return GCOBR_SHORTBUFFER;
 
-#ifdef DEBUG
-  fprintf(stderr, "GetClockOrbitBias START: size %d, numbits %d\n",size, numbits);
+#ifdef BNC_DEBUG
+  fprintf(stderr, "GetSSR START: size %d, numbits %d\n",(int)size, numbits);
 #endif
 
@@ -597,9 +598,12 @@
   size = sizeofrtcmblock; /* reduce size, so overflows are detected */
 
-  SKIPBITS(12) // G_RTCM_MESSAGE_NUMBER(a)
-  SKIPBITS( 3) // G_IGS_SSR_VERSION(a)
+  G_RTCM_MESSAGE_NUMBER(type)
+  G_IGS_SSR_VERSION(version)
+#ifdef BNC_DEBUG
+  fprintf(stderr, "rtcmType %d igsVersion %d ",type, version);
+#endif
   G_IGS_MESSAGE_NUMBER(type)
-#ifdef DEBUG
-  fprintf(stderr, "type %d size %d\n",type,sizeofrtcmblock);
+#ifdef BNC_DEBUG
+  fprintf(stderr, "igsType IM%d size %d\n",type,(int)sizeofrtcmblock);
 #endif
   if (bytesused)
@@ -619,11 +623,24 @@
     G_VTEC_QUALITY_INDICATOR(v->Quality)
     G_NO_IONO_LAYERS(v->NumLayers)
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d ssrIod %d providerId %d solId %d vtecQ %8.3f numLay %d \n",
+        		  v->EpochTime, v->UpdateInterval, mmi,
+				  v->SSRIOD, v->SSRProviderID, v->SSRSolutionID, v->Quality, v->NumLayers);
+#endif
     for (l = 0; l < v->NumLayers; ++l) {
       G_IONO_HEIGHT(v->Layers[l].Height)
       G_IONO_DEGREE(v->Layers[l].Degree)
       G_IONO_ORDER(v->Layers[l].Order)
+#ifdef BNC_DEBUG
+          fprintf(stderr, "h  %8.3f deg %d ord %d \n",
+        		  v->Layers[l].Height, v->Layers[l].Degree, v->Layers[l].Order);
+#endif
       for (o = 0; o <= v->Layers[l].Order; ++o) {
         for (d = o; d <= v->Layers[l].Degree; ++d) {
           G_IONO_COEFF_C(v->Layers[l].Cosinus[d][o])
+#ifdef BNC_DEBUG
+          fprintf(stderr, "C[%d][%d]  %8.3f \n",
+        		  d, o, v->Layers[l].Cosinus[d][o]);
+#endif
         }
       }
@@ -631,9 +648,13 @@
         for (d = o; d <= v->Layers[l].Degree; ++d) {
           G_IONO_COEFF_S(v->Layers[l].Sinus[d][o])
+#ifdef BNC_DEBUG
+          fprintf(stderr, "S[%d][%d]  %8.3f \n",
+        		  d, o, v->Layers[l].Sinus[d][o]);
+#endif
         }
       }
     }
-#ifdef DEBUG
-    for(type = 0; type < (int)size && (unsigned char)buffer[type] != 0xD3; ++type)
+#ifdef BNC_DEBUG
+    for(type = 0; type < (unsigned int)size && (unsigned char)buffer[type] != 0xD3; ++type)
     numbits += 8;
     fprintf(stderr, "numbits left %d\n",numbits);
@@ -642,50 +663,6 @@
   }
 
-
-
   for (s = CLOCKORBIT_SATNUM; s-- > 0;) {
-	if (type == corbase[s] + s) {
-      if (!pb)
-        return GCOBR_NOPHASEBIASPARAMETER;
-      pb->messageType = type;
-      G_SSR_EPOCH_TIME_CHECK(pb->EpochTime[s], pb->NumberOfSat[s])
-      G_SSR_UPDATE_INTERVAL(pb->UpdateInterval)
-      G_MULTIPLE_MESSAGE_INDICATOR(mmi)
-      G_SSR_IOD(pb->SSRIOD)
-      G_SSR_PROVIDER_ID(pb->SSRProviderID)
-      G_SSR_SOLUTION_ID(pb->SSRSolutionID)
-      G_DISPERSIVE_BIAS_INDICATOR(pb->DispersiveBiasConsistencyIndicator)
-      G_MW_CONSISTENCY_INDICATOR(pb->MWConsistencyIndicator)
-      G_NO_OF_SATELLITES(nums)
-      for (i = 0; i < nums; ++i) {
-        G_GNSS_SATELLITE_ID(id)
-        for (pos = satoffset[s];
-            pos < satoffset[s] + pb->NumberOfSat[s] && pb->Sat[pos].ID != id;
-            ++pos)
-          ;
-        if (pos >= satoffset[s + 1])
-          return GCOBR_DATAMISMATCH;
-        else if (pos == pb->NumberOfSat[s] + satoffset[s])
-          ++pb->NumberOfSat[s];
-        pb->Sat[pos].ID = id;
-        G_NO_OF_BIASES(pb->Sat[pos].NumberOfPhaseBiases)
-        G_YAW_ANGLE(pb->Sat[pos].YawAngle)
-        G_YAW_RATE(pb->Sat[pos].YawRate)
-        for (j = 0; j < pb->Sat[pos].NumberOfPhaseBiases; ++j) {
-          G_GNSS_SIGNAL_IDENTIFIER(pb->Sat[pos].Biases[j].Type)
-          G_INTEGER_INDICATOR(pb->Sat[pos].Biases[j].SignalIntegerIndicator)
-          G_WIDE_LANE_INDICATOR(pb->Sat[pos].Biases[j].SignalsWideLaneIntegerIndicator)
-          G_DISCONTINUITY_COUNTER(pb->Sat[pos].Biases[j].SignalDiscontinuityCounter)
-          G_PHASE_BIAS(pb->Sat[pos].Biases[j].Bias)
-        }
-      }
-#ifdef DEBUG
-      for(type = 0; type < (int)size && (unsigned char)buffer[type] != 0xD3; ++type)
-      numbits += 8;
-      fprintf(stderr, "numbits left %d\n",numbits);
-#endif
-      return mmi ? GCOBR_MESSAGEFOLLOWS : GCOBR_OK;
-    }
-    else if (type >= corbase[s]) {
+    if (type >= corbase[s]) {
       switch (type - corbase[s]) {
         case COBOFS_ORBIT:
@@ -702,7 +679,8 @@
           G_NO_OF_SATELLITES(nums)
           co->Supplied[COBOFS_ORBIT] |= 1;
-#ifdef DEBUG
-          fprintf(stderr, "epochtime %d ui %d mmi %d sats %d/%d rd %d\n",co->EpochTime[s],
-              co->UpdateInterval,mmi,co->NumberOfSat[s],nums, co->SatRefDatum);
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d rd %d ssrIod %d providerId %d solId %d\n",
+        		  co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums,
+				  co->SatRefDatum, co->SSRIOD, co->SSRProviderID, co->SSRSolutionID);
 #endif
           for (i = 0; i < nums; ++i) {
@@ -724,6 +702,6 @@
             G_DELTA_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDeltaAlongTrack)
             G_DELTA_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDeltaCrossTrack)
-#ifdef DEBUG
-            fprintf(stderr, "id %2d iod %3d dr %8.3f da %8.3f dc %8.3f dr %8.3f da %8.3f dc %8.3f\n",
+#ifdef BNC_DEBUG
+            fprintf(stderr, "id %2d iod %3d dr %8.4f da %8.4f dc %8.4f dr %8.3f da %8.3f dc %8.3f\n",
                 co->Sat[pos].ID,co->Sat[pos].IOD,co->Sat[pos].Orbit.DeltaRadial,
                 co->Sat[pos].Orbit.DeltaAlongTrack,co->Sat[pos].Orbit.DeltaCrossTrack,
@@ -746,7 +724,8 @@
           G_NO_OF_SATELLITES(nums)
           co->Supplied[COBOFS_CLOCK] |= 1;
-#ifdef DEBUG
-          fprintf(stderr, "epochtime %d ui %d mmi %d sats %d/%d\n",co->EpochTime[s],
-              co->UpdateInterval,mmi,co->NumberOfSat[s],nums);
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n",
+        		  co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums,
+				  co->SSRIOD, co->SSRProviderID, co->SSRSolutionID);
 #endif
           for (i = 0; i < nums; ++i) {
@@ -764,5 +743,5 @@
             G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1)
             G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2)
-#ifdef DEBUG
+#ifdef BNC_DEBUG
             fprintf(stderr, "id %2d c0 %8.3f c1 %8.3f c2 %8.3f\n",
                 co->Sat[pos].ID, co->Sat[pos].Clock.DeltaA0, co->Sat[pos].Clock.DeltaA1,
@@ -785,4 +764,9 @@
           co->Supplied[COBOFS_ORBIT] |= 1;
           co->Supplied[COBOFS_CLOCK] |= 1;
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d rd %d ssrIod %d providerId %d solId %d\n",
+        		  co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums,
+				  co->SatRefDatum, co->SSRIOD, co->SSRProviderID, co->SSRSolutionID);
+#endif
           for (i = 0; i < nums; ++i) {
             G_GNSS_SATELLITE_ID(id)
@@ -806,4 +790,12 @@
             G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1)
             G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "id %2d iod %3d dr %8.4f da %8.4f dc %8.4f dr %8.3f da %8.3f dc %8.3f  c0 %8.3f c1 %8.3f c2 %8.3f\n",
+                co->Sat[pos].ID,co->Sat[pos].IOD,co->Sat[pos].Orbit.DeltaRadial,
+                co->Sat[pos].Orbit.DeltaAlongTrack,co->Sat[pos].Orbit.DeltaCrossTrack,
+                co->Sat[pos].Orbit.DotDeltaRadial, co->Sat[pos].Orbit.DotDeltaAlongTrack,
+                co->Sat[pos].Orbit.DotDeltaCrossTrack,
+				co->Sat[pos].Clock.DeltaA0, co->Sat[pos].Clock.DeltaA1, co->Sat[pos].Clock.DeltaA2);
+#endif
           }
           break;
@@ -820,4 +812,9 @@
           G_NO_OF_SATELLITES(nums)
           co->Supplied[COBOFS_URA] |= 1;
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n",
+        		  co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums,
+				  co->SSRIOD, co->SSRProviderID, co->SSRSolutionID);
+#endif
           for (i = 0; i < nums; ++i) {
             G_GNSS_SATELLITE_ID(id)
@@ -832,4 +829,8 @@
             co->Sat[pos].ID = id;
             G_SSR_URA(co->Sat[pos].UserRangeAccuracy)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "id %2d ura %8.3f \n",
+                co->Sat[pos].ID, co->Sat[pos].UserRangeAccuracy);
+#endif
           }
           break;
@@ -846,4 +847,9 @@
           G_NO_OF_SATELLITES(nums)
           co->Supplied[COBOFS_HR] |= 1;
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n",
+        		  co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums,
+				  co->SSRIOD, co->SSRProviderID, co->SSRSolutionID);
+#endif
           for (i = 0; i < nums; ++i) {
             G_GNSS_SATELLITE_ID(id)
@@ -858,4 +864,8 @@
             co->Sat[pos].ID = id;
             G_HR_CLOCK_CORRECTION(co->Sat[pos].hrclock)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "id %2d hrClock %8.3f \n",
+                    co->Sat[pos].ID, co->Sat[pos].hrclock);
+#endif
           }
           break;
@@ -871,4 +881,9 @@
           G_SSR_SOLUTION_ID(b->SSRSolutionID)
           G_NO_OF_SATELLITES(nums)
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n",
+        		  b->EpochTime[s], b->UpdateInterval,mmi,b->NumberOfSat[s],nums,
+				  b->SSRIOD, b->SSRProviderID, b->SSRSolutionID);
+#endif
           for (i = 0; i < nums; ++i) {
             G_GNSS_SATELLITE_ID(id)
@@ -883,15 +898,84 @@
             b->Sat[pos].ID = id;
             G_NO_OF_BIASES(b->Sat[pos].NumberOfCodeBiases)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "id %2d #%d ",
+                    b->Sat[pos].ID, b->Sat[pos].NumberOfCodeBiases);
+#endif
             for (j = 0; j < b->Sat[pos].NumberOfCodeBiases; ++j) {
               G_GNSS_SIGNAL_IDENTIFIER(b->Sat[pos].Biases[j].Type)
               G_CODE_BIAS(b->Sat[pos].Biases[j].Bias)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "t%d b %8.2f ",
+                    b->Sat[pos].Biases[j].Type, b->Sat[pos].Biases[j].Bias);
+#endif
             }
+#ifdef BNC_DEBUG
+            fprintf(stderr, "\n");
+#endif
           }
+          break;
+        case COBOFS_PBIAS:
+            if (!pb)
+              return GCOBR_NOPHASEBIASPARAMETER;
+            pb->messageType = type;
+            G_SSR_EPOCH_TIME_CHECK(pb->EpochTime[s], pb->NumberOfSat[s])
+            G_SSR_UPDATE_INTERVAL(pb->UpdateInterval)
+            G_MULTIPLE_MESSAGE_INDICATOR(mmi)
+            G_SSR_IOD(pb->SSRIOD)
+            G_SSR_PROVIDER_ID(pb->SSRProviderID)
+            G_SSR_SOLUTION_ID(pb->SSRSolutionID)
+            G_DISPERSIVE_BIAS_INDICATOR(pb->DispersiveBiasConsistencyIndicator)
+            G_MW_CONSISTENCY_INDICATOR(pb->MWConsistencyIndicator)
+            G_NO_OF_SATELLITES(nums)
+#ifdef BNC_DEBUG
+          fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d dispInd %d mwInd %d\n",
+        		  pb->EpochTime[s], pb->UpdateInterval,mmi,pb->NumberOfSat[s],nums,
+				  pb->SSRIOD, pb->SSRProviderID, pb->SSRSolutionID,
+				  pb->DispersiveBiasConsistencyIndicator, pb->MWConsistencyIndicator);
+#endif
+            for (i = 0; i < nums; ++i) {
+              G_GNSS_SATELLITE_ID(id)
+              for (pos = satoffset[s];
+                  pos < satoffset[s] + pb->NumberOfSat[s] && pb->Sat[pos].ID != id;
+                  ++pos)
+                ;
+              if (pos >= satoffset[s + 1])
+                return GCOBR_DATAMISMATCH;
+              else if (pos == pb->NumberOfSat[s] + satoffset[s])
+                ++pb->NumberOfSat[s];
+              pb->Sat[pos].ID = id;
+              G_NO_OF_BIASES(pb->Sat[pos].NumberOfPhaseBiases)
+              G_YAW_ANGLE(pb->Sat[pos].YawAngle)
+              G_YAW_RATE(pb->Sat[pos].YawRate)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "id %2d #%d y %8.3f yr %8.3f ",
+                    pb->Sat[pos].ID, pb->Sat[pos].NumberOfPhaseBiases,
+					pb->Sat[pos].YawAngle, pb->Sat[pos].YawRate);
+#endif
+              for (j = 0; j < pb->Sat[pos].NumberOfPhaseBiases; ++j) {
+                G_GNSS_SIGNAL_IDENTIFIER(pb->Sat[pos].Biases[j].Type)
+                G_INTEGER_INDICATOR(pb->Sat[pos].Biases[j].SignalIntegerIndicator)
+                G_WIDE_LANE_INDICATOR(pb->Sat[pos].Biases[j].SignalsWideLaneIntegerIndicator)
+                G_DISCONTINUITY_COUNTER(pb->Sat[pos].Biases[j].SignalDiscontinuityCounter)
+                G_PHASE_BIAS(pb->Sat[pos].Biases[j].Bias)
+#ifdef BNC_DEBUG
+            fprintf(stderr, "t%d int %d wl %d disc %d b %8.4f ",
+                    pb->Sat[pos].Biases[j].Type,
+					pb->Sat[pos].Biases[j].SignalIntegerIndicator,
+					pb->Sat[pos].Biases[j].SignalsWideLaneIntegerIndicator,
+					pb->Sat[pos].Biases[j].SignalDiscontinuityCounter,
+					pb->Sat[pos].Biases[j].Bias);
+#endif
+              }
+#ifdef BNC_DEBUG
+            fprintf(stderr, "\n");
+#endif
+            }
           break;
         default:
           continue;
       }
-#ifdef DEBUG
-      for(type = 0; type < (int)size && (unsigned char)buffer[type] != 0xD3; ++type)
+#ifdef BNC_DEBUG
+      for(type = 0; type < (unsigned int)size && (unsigned char)buffer[type] != 0xD3; ++type)
       numbits += 8;
       fprintf(stderr, "numbits left %d\n",numbits);
Index: /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.h
===================================================================
--- /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.h	(revision 8971)
+++ /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.h	(revision 8972)
@@ -13,4 +13,9 @@
 #include <string.h>
 
+enum IGS_NUMBERS {
+ RTCM_MESSAGE_NUMBER_IGS = 4076,
+ IGS_SSR_VERSION         = 3
+};
+
 enum SatelliteReferenceDatum {
   DATUM_ITRF  = 0,
@@ -18,10 +23,5 @@
 };
 
-enum IGS_NUMBERS {
- RTCM_MESSAGE_NUMBER_IGS = 4076,
- IGS_SSR_VERSION         = 3
-};
-
-enum COR_BASE {// Orbit Correction
+enum COR_BASE {
   COBBASE_GPS     =  21,
   COBBASE_GLONASS =  41,
@@ -69,4 +69,10 @@
   COTYPE_QZSSURA         = COBBASE_QZSS    + COBOFS_URA,
 
+  COTYPE_SBASORBIT       = COBBASE_SBAS    + COBOFS_ORBIT,
+  COTYPE_SBASCLOCK,
+  COTYPE_SBASCOMBINED    = COBBASE_SBAS    + COBOFS_COMBINED,
+  COTYPE_SBASHR,
+  COTYPE_SBASURA         = COBBASE_SBAS    + COBOFS_URA,
+
   COTYPE_BDSORBIT        = COBBASE_BDS     + COBOFS_ORBIT,
   COTYPE_BDSCLOCK,
@@ -75,10 +81,4 @@
   COTYPE_BDSURA          = COBBASE_BDS     + COBOFS_URA,
 
-  COTYPE_SBASORBIT       = COBBASE_SBAS    + COBOFS_ORBIT,
-  COTYPE_SBASCLOCK,
-  COTYPE_SBASCOMBINED    = COBBASE_SBAS    + COBOFS_COMBINED,
-  COTYPE_SBASHR,
-  COTYPE_SBASURA         = COBBASE_SBAS    + COBOFS_URA,
-
   COTYPE_AUTO = 0,
 };
@@ -89,6 +89,6 @@
   CBTYPE_GALILEO = COBBASE_GALILEO + COBOFS_CBIAS,
   CBTYPE_QZSS    = COBBASE_QZSS    + COBOFS_CBIAS,
+  CBTYPE_SBAS    = COBBASE_SBAS    + COBOFS_CBIAS,
   CBTYPE_BDS     = COBBASE_BDS     + COBOFS_CBIAS,
-  CBTYPE_SBAS    = COBBASE_SBAS    + COBOFS_CBIAS,
   CBTYPE_AUTO    = 0
 };
@@ -99,6 +99,6 @@
   PBTYPE_GALILEO = COBBASE_GALILEO + COBOFS_PBIAS,
   PBTYPE_QZSS    = COBBASE_QZSS    + COBOFS_PBIAS,
+  PBTYPE_SBAS    = COBBASE_SBAS    + COBOFS_PBIAS,
   PBTYPE_BDS     = COBBASE_BDS     + COBOFS_PBIAS,
-  PBTYPE_SBAS    = COBBASE_SBAS    + COBOFS_PBIAS,
   PBTYPE_AUTO    = 0
 };
@@ -116,6 +116,6 @@
   CLOCKORBIT_NUMGALILEO    =   36,
   CLOCKORBIT_NUMQZSS       =   10,
+  CLOCKORBIT_NUMSBAS       =   38,
   CLOCKORBIT_NUMBDS        =   65,
-  CLOCKORBIT_NUMSBAS       =   38,
   CLOCKORBIT_NUMBIAS       =  100,
   CLOCKORBIT_NUMIONOLAYERS =    4,
@@ -129,6 +129,6 @@
   CLOCKORBIT_SATGALILEO,
   CLOCKORBIT_SATQZSS,
+  CLOCKORBIT_SATSBAS,
   CLOCKORBIT_SATBDS,
-  CLOCKORBIT_SATSBAS,
   CLOCKORBIT_SATNUM
 };
@@ -139,10 +139,10 @@
   CLOCKORBIT_OFFSETGALILEO = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS,
   CLOCKORBIT_OFFSETQZSS    = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO,
+  CLOCKORBIT_OFFSETSBAS    = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
+                           + CLOCKORBIT_NUMQZSS,
   CLOCKORBIT_OFFSETBDS     = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
-                           + CLOCKORBIT_NUMQZSS,
-  CLOCKORBIT_OFFSETSBAS    = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
-                           + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMBDS,
+                           + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS,
   CLOCKORBIT_COUNTSAT      = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
-                           + CLOCKORBIT_NUMSBAS + CLOCKORBIT_NUMQZSS    + CLOCKORBIT_NUMBDS
+                           + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS    + CLOCKORBIT_NUMBDS
 };
 
Index: /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.h
===================================================================
--- /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.h	(revision 8971)
+++ /trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.h	(revision 8972)
@@ -12,4 +12,9 @@
 
 #include <string.h>
+
+
+
+
+
 
 enum SatelliteReferenceDatum {
@@ -25,4 +30,5 @@
   COBBASE_SBAS    = 1252,
   COBBASE_BDS     = 1258,
+  COBBASE_NUM
 };
 
@@ -84,8 +90,8 @@
   CBTYPE_SBAS    = COBBASE_SBAS    + COBOFS_CBIAS,
   CBTYPE_BDS     = COBBASE_BDS     + COBOFS_CBIAS,
-  CBTYPE_AUTO = 0
-};
-
-enum PhaseBiasType {
+  CBTYPE_AUTO    = 0
+};
+
+enum PhaseBiasType{
   PBTYPE_BASE    = 1265,
   PBTYPE_GPS     = PBTYPE_BASE,
@@ -95,5 +101,5 @@
   PBTYPE_SBAS,
   PBTYPE_BDS,
-  PBTYPE_AUTO = 0
+  PBTYPE_AUTO    = 0
 };
 
@@ -110,6 +116,6 @@
   CLOCKORBIT_NUMGALILEO    =   36,
   CLOCKORBIT_NUMQZSS       =   10,
+  CLOCKORBIT_NUMSBAS       =   38,
   CLOCKORBIT_NUMBDS        =   65,
-  CLOCKORBIT_NUMSBAS       =   38,
   CLOCKORBIT_NUMBIAS       =  100,
   CLOCKORBIT_NUMIONOLAYERS =    4,
@@ -123,6 +129,6 @@
   CLOCKORBIT_SATGALILEO,
   CLOCKORBIT_SATQZSS,
+  CLOCKORBIT_SATSBAS,
   CLOCKORBIT_SATBDS,
-  CLOCKORBIT_SATSBAS,
   CLOCKORBIT_SATNUM
 };
@@ -133,10 +139,10 @@
   CLOCKORBIT_OFFSETGALILEO = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS,
   CLOCKORBIT_OFFSETQZSS    = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO,
+  CLOCKORBIT_OFFSETSBAS    = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
+                           + CLOCKORBIT_NUMQZSS,
   CLOCKORBIT_OFFSETBDS     = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
-                           + CLOCKORBIT_NUMQZSS,
-  CLOCKORBIT_OFFSETSBAS    = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
-                           + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMBDS,
+                           + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS,
   CLOCKORBIT_COUNTSAT      = CLOCKORBIT_NUMGPS  + CLOCKORBIT_NUMGLONASS + CLOCKORBIT_NUMGALILEO
-                           + CLOCKORBIT_NUMSBAS + CLOCKORBIT_NUMQZSS    + CLOCKORBIT_NUMBDS
+                           + CLOCKORBIT_NUMQZSS + CLOCKORBIT_NUMSBAS    + CLOCKORBIT_NUMBDS
 };
 
