Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 6755)
+++ trunk/BNC/src/ephemeris.cpp	(revision 6756)
@@ -1336,5 +1336,6 @@
   // ------------
   int fieldLen = 19;
-  _URAI = -1; // undefined in RINEX format
+  double TOEw;
+  _URAI = -1; // RINEX usage: set RTCM entry to be undefined
 
   int pos[4];
@@ -1425,5 +1426,5 @@
     else if ( iLine == 5 ) {
       if ( readDbl(line, pos[0], fieldLen, _IDOT    ) ||
-           readDbl(line, pos[2], fieldLen, _TOEw)    ) {
+           readDbl(line, pos[2], fieldLen, TOEw)    ) {
         _checkState = bad;
         return;
@@ -1457,6 +1458,6 @@
   }
 
-  _TOEw += 1356;  // BDT -> GPS week number
-  _TOE_bdt.set(int(_TOEw), _TOEs);
+  TOEw += 1356;  // BDT -> GPS week number
+  _TOE_bdt.set(int(TOEw), _TOEs);
 
   // GPS->BDT
@@ -1474,9 +1475,8 @@
 void t_ephBDS::set(const bdsephemeris* ee) {
 
-  // RINEX File entries
-  // --------------------
+  // RTCM usage: set RINEX File entries to zero
+  // ------------------------------------------
   _TOTs = 0.0;
   _TOEs = 0.0;
-  _TOEw = 0.0;
 
   _receptDateTime = currentDateAndTimeGPS();
@@ -1697,13 +1697,10 @@
     .arg(_OMEGADOT, 19, 'e', 12);
 
-  double toew = _TOEw;
-  if (!toew) { // RTCM stream input
-    toew = double(_TOE_bdt.gpsw() - 1356.0);
-  }
-  out << QString(fmt)
-    .arg(_IDOT, 19, 'e', 12)
-    .arg(0.0,   19, 'e', 12)
-    .arg(toew,  19, 'e', 12)
-    .arg(0.0,   19, 'e', 12);
+
+  out << QString(fmt)
+    .arg(_IDOT,                             19, 'e', 12)
+    .arg(0.0,                               19, 'e', 12)
+    .arg(double(_TOE_bdt.gpsw() - 1356.0),  19, 'e', 12)
+    .arg(0.0,                               19, 'e', 12);
 
   double ura = _URA; // RINEX file input
Index: trunk/BNC/src/ephemeris.h
===================================================================
--- trunk/BNC/src/ephemeris.h	(revision 6755)
+++ trunk/BNC/src/ephemeris.h	(revision 6756)
@@ -194,5 +194,5 @@
   double  _SISA;             //  Signal In Space Accuracy
   double  _E5aHS;            //  E5a Health Status
-  double  _E5bHS;            //  E5a Health Status
+  double  _E5bHS;            //  E5b Health Status
   double  _BGD_1_5A;         //  group delay [s] 
   double  _BGD_1_5B;         //  group delay [s] 
@@ -285,5 +285,4 @@
   double  _TOTs;             //  [s] of BDT week; RINEX file entry
   double  _TOEs;             //  [s] of BDT week; RINEX file entry
-  double  _TOEw;             //  [-] BDT week; RINEX file entry
 };
 
