Index: /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
===================================================================
--- /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 9784)
+++ /trunk/BNC/src/RTCM3/RTCM3Decoder.cpp	(revision 9785)
@@ -1587,6 +1587,5 @@
     eph._prn.set('C', i);
 
-    SKIPBITS(13)
-    /* week */
+    GETBITS(eph._BDTweek, 13)
     GETBITS(i, 4)
     eph._URA = accuracyFromIndex(i, eph.type());
@@ -1595,5 +1594,5 @@
     GETBITS(i, 17)
     i <<= 3;
-    eph._TOC.setBDS(i * 1000);
+    eph._TOC.setBDS(eph._BDTweek, i);
     GETFLOATSIGN(eph._clock_driftrate, 11,  1.0 / (double )(1 << 30) / (double )(1 << 30) / (double )(1 << 6))
     GETFLOATSIGN(eph._clock_drift,     22,  1.0 / (double )(1 << 30) / (double )(1 << 20))
@@ -1618,5 +1617,5 @@
     i <<= 3;
     eph._TOEsec = i;
-    eph._TOE.setBDS(i * 1000);
+    eph._TOE.setBDS(eph._BDTweek, i);
     GETFLOATSIGN(eph._Cic,      18, 1.0 / (double )(1 << 30) / (double )(1 << 1))
     GETFLOATSIGN(eph._OMEGA0,   32, R2R_PI/(double)(1<<30)/(double)(1<<1))
@@ -1637,5 +1636,4 @@
       eph._navType = t_eph::D2;
     }
-
 
     emit newBDSEph(eph);
Index: /trunk/BNC/src/ephemeris.cpp
===================================================================
--- /trunk/BNC/src/ephemeris.cpp	(revision 9784)
+++ /trunk/BNC/src/ephemeris.cpp	(revision 9785)
@@ -1700,5 +1700,5 @@
     else if ( iLine == 5 ) {
       if ( readDbl(line, pos[0], fieldLen, _IDOT    ) ||
-           readDbl(line, pos[2], fieldLen, _TOEweek)) {
+           readDbl(line, pos[2], fieldLen, _BDTweek)) {
         _checkState = bad;
         return;
@@ -1732,5 +1732,5 @@
   }
 
-  _TOE.setBDS(int(_TOEweek), _TOEsec);
+  _TOE.setBDS(int(_BDTweek), _TOEsec);
 
   // remark: actually should be computed from second_tot
@@ -1940,13 +1940,6 @@
     .arg(_sqrt_A, 19, 'e', 12);
 
-  double toes = 0.0;
-  if (_TOEweek > -1.0) {// RINEX input
-    toes = _TOEsec;
-  }
-  else {// RTCM stream input
-    toes = _TOE.bdssec();
-  }
-  out << QString(fmt)
-    .arg(toes,    19, 'e', 12)
+  out << QString(fmt)
+    .arg(_TOEsec, 19, 'e', 12)
     .arg(_Cic,    19, 'e', 12)
     .arg(_OMEGA0, 19, 'e', 12)
@@ -1959,16 +1952,9 @@
     .arg(_OMEGADOT, 19, 'e', 12);
 
-  double toew = 0.0;
-  if (_TOEweek > -1.0) {// RINEX input
-    toew = _TOEweek;
-  }
-  else {// RTCM stream input
-    toew = double(_TOE.bdsw());
-  }
-  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(_BDTweek, 19, 'e', 12)
+    .arg(0.0,      19, 'e', 12);
 
   out << QString(fmt)
@@ -1979,9 +1965,9 @@
 
   double tots = 0.0;
-  if (_TOEweek > -1.0) {// RINEX input
+  if (_receptDateTime.isValid()) {// RTCM stream input
+    tots = _TOE.bdssec();
+  }
+  else { // RINEX input
     tots = _TOT;
-  }
-  else {// RTCM stream input
-    tots = _TOE.bdssec();
   }
   out << QString(fmt)
Index: /trunk/BNC/src/ephemeris.h
===================================================================
--- /trunk/BNC/src/ephemeris.h	(revision 9784)
+++ /trunk/BNC/src/ephemeris.h	(revision 9785)
@@ -445,7 +445,6 @@
    _TGD2            = 0.0;
    _SatH1           = 0.0;
-   _TOW             = 0.0;
    _TOEsec          = 0.0;
-   _TOEweek         =-1.0;
+   _BDTweek         = 0.0;
    _receptStaID     = "";
  }
@@ -488,7 +487,6 @@
   double  _TGD2;             //  [s]
   int     _SatH1;            //
-  double  _TOW;              //  [s] of BDT week
   double  _TOEsec;           //  [s] of BDT week
-  double  _TOEweek;          //  BDT week will be set only in case of RINEX file input
+  double  _BDTweek;          //  BDT week
 };
 #endif
