Index: trunk/BNC/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- trunk/BNC/RTCM3/RTCM3coDecoder.cpp	(revision 1580)
+++ trunk/BNC/RTCM3/RTCM3coDecoder.cpp	(revision 1582)
@@ -67,5 +67,6 @@
     _fileNameSkl = path + staID;
   }
-  _out = 0;
+  _out      = 0;
+  _GPSweeks = -1.0;
 
   connect(this, SIGNAL(newCorrLine(QString, QString, long)), 
@@ -130,4 +131,7 @@
     if      (irc == GCOBR_SHORTBUFFER ||
              irc == GCOBR_MESSAGEEXCEEDSBUFFER) {
+      if (retCode != success) {
+        _GPSweeks = -1.0;
+      }
       return retCode;
     }
@@ -140,18 +144,17 @@
 
       int    GPSweek;
-      double GPSweeks;
-      currentGPSWeeks(GPSweek, GPSweeks);
+      currentGPSWeeks(GPSweek, _GPSweeks);
       if (_co.NumberOfGPSSat > 0) {
-        if      (GPSweeks > _co.GPSEpochTime + 86400.0) {
+        if      (_GPSweeks > _co.GPSEpochTime + 86400.0) {
           GPSweek += 1;
         }
-        else if (GPSweeks < _co.GPSEpochTime - 86400.0) {
+        else if (_GPSweeks < _co.GPSEpochTime - 86400.0) {
           GPSweek -= 1;
         }
-        GPSweeks = _co.GPSEpochTime;
+        _GPSweeks = _co.GPSEpochTime;
       }
       else {
-        double GPSdaysec = fmod(GPSweeks, 86400.0);
-        int    weekDay   = int((GPSweeks - GPSdaysec) / 86400.0);
+        double GPSdaysec = fmod(_GPSweeks, 86400.0);
+        int    weekDay   = int((_GPSweeks - GPSdaysec) / 86400.0);
         if      (GPSdaysec > _co.GLONASSEpochTime + 3600.0) {
           weekDay += 1;
@@ -168,5 +171,5 @@
           }
         }
-        GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime;
+        _GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime;
       }
 
@@ -174,10 +177,10 @@
         QString line;
         line.sprintf("%d %.1f G%2.2d   %3d   %8.3f   %8.3f %8.3f %8.3f", 
-               GPSweek, GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD, 
+               GPSweek, _GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD, 
                _co.Sat[ii].Clock.DeltaA0,
                _co.Sat[ii].Orbit.DeltaRadial, 
                _co.Sat[ii].Orbit.DeltaAlongTrack,
                _co.Sat[ii].Orbit.DeltaCrossTrack);
-        long coTime = GPSweek * 7*24*3600 + long(floor(GPSweeks+0.5));
+        long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));
         printLine(line, coTime);
       }
@@ -186,10 +189,10 @@
         QString line;
         line.sprintf("%d %.1f R%2.2d   %3d   %8.3f   %8.3f %8.3f %8.3f", 
-               GPSweek, GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD, 
+               GPSweek, _GPSweeks, _co.Sat[ii].ID, _co.Sat[ii].IOD, 
                _co.Sat[ii].Clock.DeltaA0, 
                _co.Sat[ii].Orbit.DeltaRadial, 
                _co.Sat[ii].Orbit.DeltaAlongTrack,
                _co.Sat[ii].Orbit.DeltaCrossTrack);
-        long coTime = GPSweek * 7*24*3600 + long(floor(GPSweeks+0.5));
+        long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));
         printLine(line, coTime);
       }
Index: trunk/BNC/RTCM3/RTCM3coDecoder.h
===================================================================
--- trunk/BNC/RTCM3/RTCM3coDecoder.h	(revision 1580)
+++ trunk/BNC/RTCM3/RTCM3coDecoder.h	(revision 1582)
@@ -43,5 +43,5 @@
   virtual ~RTCM3coDecoder();
   virtual t_irc Decode(char* buffer, int bufLen, std::vector<std::string>& errmsg);
-  virtual int corrGPSEpochTime() const {return _co.GPSEpochTime;}
+  virtual int corrGPSEpochTime() const {return (int) _GPSweeks;}
 
  signals:
@@ -60,4 +60,5 @@
   ClockOrbit     _co;
   Bias           _bias;
+  double         _GPSweeks;
 };
 
