Index: /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 8181)
+++ /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 8182)
@@ -1049,6 +1049,7 @@
     _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(
         eph._frequency_number, 2, 'f', 0);
-    SKIPBITS(4)
-    /* almanac healthy, almanac health ok, P1 */
+    GETBITS(eph._almanac_health, 1) /* almanac healthy */
+    GETBITS(eph._almanac_health_availablility_indicator, 1) /* almanac health ok */
+    GETBITS(eph._P1, 2) /*  P1 */
     GETBITS(i, 5)
     tk = i * 60 * 60;
@@ -1058,7 +1059,6 @@
     tk += i * 30;
     eph._tki = tk < 3 * 60 * 60 ? tk - 3 * 60 * 60 + 86400 : tk - 3 * 60 * 60;
-    GETBITS(eph._health, 1)
-    SKIPBITS(1)
-    /* P2 */
+    GETBITS(eph._health, 1) /* MSB of Bn*/
+    GETBITS(eph._P2, 1)  /* P2 */
     GETBITS(i, 7)
     eph._TOC.setTk(i * 15 * 60 * 1000); /* tb */
@@ -1073,24 +1073,21 @@
     GETFLOATSIGNM(eph._z_pos, 27, 1.0 / (double )(1 << 11))
     GETFLOATSIGNM(eph._z_acceleration, 5, 1.0 / (double )(1 << 30))
-    SKIPBITS(1)
-    /* P3 */
+    GETBITS(eph._P3, 1)    /* P3 */
     GETFLOATSIGNM(eph._gamma, 11, 1.0 / (double )(1 << 30) / (double )(1 << 10))
-    SKIPBITS(3)
-    /* GLONASS-M P, GLONASS-M ln (third string) */
-    GETFLOATSIGNM(eph._tau, 22, 1.0 / (double )(1 << 30))
-    /* GLONASS tau n(tb) */
-    SKIPBITS(5)
-    /* GLONASS-M delta tau n(tb) */
+    GETBITS(eph._M_P, 2) /* GLONASS-M P, */
+    GETBITS(eph._M_l3, 1) /*GLONASS-M ln (third string) */
+    GETFLOATSIGNM(eph._tau, 22, 1.0 / (double )(1 << 30))    /* GLONASS tau n(tb) */
+    GETFLOATSIGNM(eph._M_delta_tau, 5, 1.0 / (double )(1 << 30))   /* GLONASS-M delta tau n(tb) */
     GETBITS(eph._E, 5)
-    /* GETBITS(i, 1) / * GLONASS-M P4 */
-    /* GETBITS(i, 4) / * GLONASS-M Ft */
-    /* GETBITS(i, 11) / * GLONASS-M Nt */
-    /* GETBITS(i, 2) / * GLONASS-M M */
-    /* GETBITS(i, 1) / * GLONASS-M The Availability of Additional Data */
-    /* GETBITS(i, 11) / * GLONASS-M Na */
-    /* GETFLOATSIGNM(i, 32, 1.0/(double)(1<<30)/(double)(1<<1)) / * GLONASS tau c */
-    /* GETBITS(i, 5) / * GLONASS-M N4 */
-    /* GETFLOATSIGNM(i, 22, 1.0/(double)(1<<30)) / * GLONASS-M tau GPS */
-    /* GETBITS(i, 1) / * GLONASS-M ln (fifth string) */
+    GETBITS(eph._M_P4, 1) /* GLONASS-M P4 */
+    GETBITS(eph._M_FT, 4) /* GLONASS-M Ft */
+    GETBITS(eph._M_NT, 11) /* GLONASS-M Nt */
+    GETBITS(eph._M_M, 2) /* GLONASS-M M */
+    GETBITS(eph._additional_data_availability, 1) /* GLONASS-M The Availability of Additional Data */
+    GETBITS(eph._NA, 11) /* GLONASS-M Na */
+    GETFLOATSIGNM(eph._tauC, 32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */
+    GETBITS(eph._M_N4, 5) /* GLONASS-M N4 */
+    GETFLOATSIGNM(eph._M_tau_GPS, 22, 1.0/(double)(1<<30)) /* GLONASS-M tau GPS */
+    GETBITS(eph._M_l5, 1) /* GLONASS-M ln (fifth string) */
 
     unsigned year, month, day;
Index: /trunk/BNC/src/RTCM3/ephEncoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/ephEncoder.cpp	(revision 8181)
+++ /trunk/BNC/src/RTCM3/ephEncoder.cpp	(revision 8182)
@@ -123,7 +123,7 @@
   GLONASSADDBITS(6, eph._prn.number())
   GLONASSADDBITS(5, 7+eph._frequency_number)
-  GLONASSADDBITS(1, 0)
-  GLONASSADDBITS(1, 0)
-  GLONASSADDBITS(2, 0)
+  GLONASSADDBITS(1, eph._almanac_health)
+  GLONASSADDBITS(1, eph._almanac_health_availablility_indicator)
+  GLONASSADDBITS(2, eph._P1)
   int tki = static_cast<int>(eph._tki)+3*60*60;
   if (tki > 86400) {tki -= 86400;}
@@ -132,5 +132,5 @@
   GLONASSADDBITS(1, (static_cast<int>(tki)/30)%30)
   GLONASSADDBITS(1, eph._health)
-  GLONASSADDBITS(1, 0)
+  GLONASSADDBITS(1, eph._P2)
   unsigned long long timeofday = (static_cast<int>(eph._tt.gpssec()+3*60*60-eph._gps_utc)%86400);
   GLONASSADDBITS(7, timeofday/60/15)
@@ -144,22 +144,21 @@
   GLONASSADDBITSFLOATM(27,eph._z_pos*1000, 1000.0/static_cast<double>(1<<11))
   GLONASSADDBITSFLOATM(5, eph._z_acceleration*1000, 1000.0/static_cast<double>(1<<30))
-  GLONASSADDBITS(1, 0)
-  GLONASSADDBITSFLOATM(11, eph._gamma, 1.0/static_cast<double>(1<<30)
-  /static_cast<double>(1<<10))
-  GLONASSADDBITS(2, 0) /* GLONASS-M P */
-  GLONASSADDBITS(1, 0) /* GLONASS-M ln(3) */
+  GLONASSADDBITS(1, eph._P3)
+  GLONASSADDBITSFLOATM(11, eph._gamma, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<10))
+  GLONASSADDBITS(2, eph._M_P) /* GLONASS-M P */
+  GLONASSADDBITS(1, eph._M_l3) /* GLONASS-M ln(3) */
   GLONASSADDBITSFLOATM(22, eph._tau, 1.0/static_cast<double>(1<<30))
-  GLONASSADDBITS(5, 0) /* GLONASS-M delta tau */
+  GLONASSADDBITSFLOATM(5, eph._M_delta_tau, 1.0/static_cast<double>(1<<30)) /* GLONASS-M delta tau */
   GLONASSADDBITS(5, eph._E)
-  GLONASSADDBITS(1, 0) /* GLONASS-M P4 */
-  GLONASSADDBITS(4, 0) /* GLONASS-M FT */
-  GLONASSADDBITS(11, 0) /* GLONASS-M NT */
-  GLONASSADDBITS(2, 0) /* GLONASS-M active? */
-  GLONASSADDBITS(1, 0) /* GLONASS additional data */
-  GLONASSADDBITS(11, 0) /* GLONASS NA */
-  GLONASSADDBITS(32, 0) /* GLONASS tau C */
-  GLONASSADDBITS(5, 0) /* GLONASS-M N4 */
-  GLONASSADDBITS(22, 0) /* GLONASS-M tau GPS */
-  GLONASSADDBITS(1, 0) /* GLONASS-M ln(5) */
+  GLONASSADDBITS(1, eph._M_P4) /* GLONASS-M P4 */
+  GLONASSADDBITS(4, eph._M_FT) /* GLONASS-M FT */
+  GLONASSADDBITS(11, eph._M_NT) /* GLONASS-M NT */
+  GLONASSADDBITS(2, eph._M_M) /* GLONASS-M active? */
+  GLONASSADDBITS(1, eph._additional_data_availability) /* GLONASS additional data */
+  GLONASSADDBITS(11, eph._NA) /* GLONASS NA */
+  GLONASSADDBITSFLOATM(32, eph._tauC, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) /* GLONASS tau C */
+  GLONASSADDBITS(5, eph._M_N4) /* GLONASS-M N4 */
+  GLONASSADDBITSFLOATM(22, eph._M_tau_GPS, 1.0/static_cast<double>(1<<30)) /* GLONASS-M tau GPS */
+  GLONASSADDBITS(1, eph._M_l5) /* GLONASS-M ln(5) */
   GLONASSADDBITS(7, 0) /* Reserved */
 
Index: /trunk/BNC/src/ephemeris.h
===================================================================
--- /trunk/BNC/src/ephemeris.h	(revision 8181)
+++ /trunk/BNC/src/ephemeris.h	(revision 8182)
@@ -165,4 +165,22 @@
     _z_acceleration   = 0.0;
     _E                = 0.0;
+    _almanac_health   = 0.0;
+    _almanac_health_availablility_indicator = 0.0;
+    _additional_data_availability = 0.0;
+    _tauC             = 0.0;
+    _P1               = 0.0;
+    _P2               = 0.0;
+    _P3               = 0.0;
+    _NA               = 0.0;
+    _M_P              = 0.0;
+    _M_l3             = 0.0;
+    _M_delta_tau      = 0.0;
+    _M_P4             = 0.0;
+    _M_FT             = 0.0;
+    _M_NT             = 0.0;
+    _M_M              = 0.0;
+    _M_N4             = 0.0;
+    _M_tau_GPS        = 0.0;
+    _M_l5             = 0.0;
   }
   t_ephGlo(float rnxVersion, const QStringList& lines);
@@ -183,5 +201,5 @@
   double  _gps_utc;
   double  _tau;              // [s]
-  double  _gamma;            //
+  double  _gamma;            // [-]
   mutable double  _tki;      // message frame time
 
@@ -189,5 +207,5 @@
   double  _x_velocity;       // [km/s]
   double  _x_acceleration;   // [km/s^2]
-  double  _health;           // 0 = O.K.
+  double  _health;           // 0 = O.K. MSB of Bn word
 
   double  _y_pos;            // [km]
@@ -200,4 +218,25 @@
   double  _z_acceleration;   // [km/s^2]
   double  _E;                // Age of Information [days]
+
+  double _almanac_health;     // Cn word
+  double _almanac_health_availablility_indicator;
+
+  double _additional_data_availability;  //
+  double _tauC;               // GLONASS time scale correction to UTC(SU) time [sec]
+  double _P1;                 // flag of the immediate data updating [-]
+  double _P2;                 // flag of oddness or evenness of the value of tb for intervals 30 or 60 minutes [-]
+  double _P3;                 // flag indicating a number of satellites for which almanac is transmitted within given frame [-]
+  double _NA;                 // calendar day number within the 4-year period [days]
+
+  double _M_P;                // control segment parameter that indicates the satellite operation mode with respect of time parameters
+  double _M_l3;               // health flag
+  double _M_delta_tau;        // [sec]
+  double _M_P4;               // flag to show that ephemeris parameters are present [-]
+  double _M_FT;               // indicator for predicted satellite user range accuracy [-]
+  double _M_NT;               // current date, calendar number of day within 4-year interval [days]
+  double _M_M;                // type of satellite transmitting navigation signal: 0 = GLONASS, 1 = GLONASS-M satellite [-]
+  double _M_N4;               // 4-year interval number starting from 1996
+  double _M_tau_GPS;          // correction to GPS time relative to GLONASS time [days]
+  double _M_l5;               // health flag
 };
 
