Index: trunk/BNC/bnc.pro
===================================================================
--- trunk/BNC/bnc.pro	(revision 2309)
+++ trunk/BNC/bnc.pro	(revision 2310)
@@ -2,6 +2,6 @@
 # Switch to debug configuration
 # -----------------------------
-CONFIG -= release
-CONFIG += debug
+CONFIG -= debug
+CONFIG += release
 
 
Index: trunk/BNC/bnccaster.cpp
===================================================================
--- trunk/BNC/bnccaster.cpp	(revision 2309)
+++ trunk/BNC/bnccaster.cpp	(revision 2310)
@@ -49,4 +49,6 @@
 #include "RTCM/GPSDecoder.h"
 
+static const int MAXRATE = 20; // Hz
+
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
@@ -121,5 +123,5 @@
   _epochs = new QMultiMap<long, p_obs>;
 
-  _lastDumpSec   = 0; 
+  _lastDumpSecXrate = 0; 
 
   _confInterval = -1;
@@ -159,6 +161,6 @@
   obs->_status = t_obs::received;
 
-  long iSec    = long(floor(obs->_o.GPSWeeks+0.5));
-  long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec;
+  long iSecXrate    = long(floor(obs->_o.GPSWeeks * MAXRATE + 0.5));
+  long newTimeXrate = obs->_o.GPSWeek * 7*24*3600 * MAXRATE + iSecXrate;
 
   // Rename the Station
@@ -199,11 +201,11 @@
   // First time, set the _lastDumpSec immediately
   // --------------------------------------------
-  if (_lastDumpSec == 0) {
-    _lastDumpSec = newTime - 1;
+  if (_lastDumpSecXrate == 0) {
+    _lastDumpSecXrate = newTimeXrate - 1;
   }
 
   // An old observation - throw it away
   // ----------------------------------
-  if (newTime <= _lastDumpSec) {
+  if (newTimeXrate <= _lastDumpSecXrate) {
     if (firstObs) {
       bncSettings settings;
@@ -211,8 +213,8 @@
            !settings.value("outPort").toString().isEmpty() ) { 
 
-	QTime enomtime = QTime(0,0,0).addSecs(iSec);
+	QTime enomtime = QTime(0,0,0).addMSecs(iSecXrate/MAXRATE/1000);
 
         emit( newMessage(QString("%1: Old epoch %2 (%3) thrown away")
-			 .arg(staID.data()).arg(iSec)
+			 .arg(staID.data()).arg(iSecXrate/MAXRATE)
 			 .arg(enomtime.toString("HH:mm:ss"))
 			 .toAscii(), true) );
@@ -225,11 +227,11 @@
   // Save the observation
   // --------------------
-  _epochs->insert(newTime, obs);
+  _epochs->insert(newTimeXrate, obs);
 
   // Dump Epochs
   // -----------
-  if (newTime - _waitTime > _lastDumpSec) {
-    dumpEpochs(_lastDumpSec + 1, newTime - _waitTime);
-    _lastDumpSec = newTime - _waitTime;
+  if (newTimeXrate - _waitTimeXrate > _lastDumpSecXrate) {
+    dumpEpochs(_lastDumpSecXrate + 1, newTimeXrate - _waitTimeXrate);
+    _lastDumpSecXrate = newTimeXrate - _waitTimeXrate;
   }
 }
@@ -415,8 +417,8 @@
   // Reread several options
   // ----------------------
-  _samplingRate = settings.value("binSampl").toInt();
-  _waitTime     = settings.value("waitTime").toInt();
-  if (_waitTime < 1) {
-    _waitTime = 1;
+  _samplingRate  = settings.value("binSampl").toInt();
+  _waitTimeXrate = settings.value("waitTime").toInt() * MAXRATE; 
+  if (_waitTimeXrate < 1) {
+    _waitTimeXrate = 1;
   }
 
Index: trunk/BNC/bnccaster.h
===================================================================
--- trunk/BNC/bnccaster.h	(revision 2309)
+++ trunk/BNC/bnccaster.h	(revision 2310)
@@ -67,5 +67,5 @@
    QTextStream*            _out;
    QMultiMap<long, p_obs>* _epochs;
-   long                    _lastDumpSec;
+   long                    _lastDumpSecXrate;
    QTcpServer*             _server;
    QTcpServer*             _uServer;
@@ -77,5 +77,5 @@
    QList<bncGetThread*>    _threads;
    int                     _samplingRate;
-   long                    _waitTime;
+   long                    _waitTimeXrate;
    QMutex                  _mutex;
    int                     _confInterval;
