Index: trunk/BNC/src/bncsp3.cpp
===================================================================
--- trunk/BNC/src/bncsp3.cpp	(revision 4295)
+++ trunk/BNC/src/bncsp3.cpp	(revision 4296)
@@ -28,7 +28,4 @@
 bncSP3::bncSP3(const QString& sklFileName, const QString& intr, int sampl) 
   : bncoutf(sklFileName, intr, sampl) {
-
-  _lastGPSweek  = 0;
-  _lastGPSweeks = 0.0;
 }
 
@@ -45,14 +42,23 @@
   if (reopen(GPSweek, GPSweeks) == success) {
 
-    if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
-      _lastGPSweek  = GPSweek;
-      _lastGPSweeks = GPSweeks;
-    
-      QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
-      double sec = fmod(GPSweeks, 60.0);
-    
-      _out << datTim.toString("*  yyyy MM dd hh mm").toAscii().data()
-           << setw(12) << setprecision(8) << sec << endl; 
+    bncTime epoTime(GPSweek, GPSweeks);
+
+    if (epoTime != _lastEpoTime) {
+
+      // Check the sampling interval (print empty epochs)
+      // ------------------------------------------------
+      if (_lastEpoTime.valid()) {
+        for (bncTime ep = _lastEpoTime +_sampl; ep < epoTime; ep = ep +_sampl) {
+          _out << "*  " << ep.datestr(' ') << ep.timestr(8, ' ') << endl;
+        }
+      }
+
+      // Print the new epoch 
+      // -------------------
+      _out << "*  " << epoTime.datestr(' ') << epoTime.timestr(8, ' ') << endl;
+
+      _lastEpoTime = epoTime;
     }
+
     _out << "P" << prn.toAscii().data()
          << setw(14) << setprecision(6) << xx(1) / 1000.0
Index: trunk/BNC/src/bncsp3.h
===================================================================
--- trunk/BNC/src/bncsp3.h	(revision 4295)
+++ trunk/BNC/src/bncsp3.h	(revision 4296)
@@ -7,4 +7,5 @@
 
 #include "bncoutf.h"
+#include "bnctime.h"
 
 class bncSP3 : public bncoutf {
@@ -18,6 +19,5 @@
   virtual void writeHeader(const QDateTime& datTim);
   virtual void closeFile();
-  int    _lastGPSweek;
-  double _lastGPSweeks;
+  bncTime _lastEpoTime;
 };
 
