Index: trunk/BNC/RTCM/GPSDecoder.h
===================================================================
--- trunk/BNC/RTCM/GPSDecoder.h	(revision 621)
+++ trunk/BNC/RTCM/GPSDecoder.h	(revision 622)
@@ -29,25 +29,6 @@
 #include <QList>
 
-class Observation : public QObject{
-  public:
-  Observation() {
-    flags     = 0;
-    StatID[0] = '\0';
-    satSys    = 'G';
-    satNum    = 0;
-    slot      = 0;
-    GPSWeek   = 0;
-    GPSWeeks  = 0.0;
-    C1        = 0.0;
-    C2        = 0.0;
-    P1        = 0.0;
-    P2        = 0.0;
-    L1        = 0.0;
-    L2        = 0.0;
-    S1        = 0.0;
-    S2        = 0.0;
-    SNR1      = 0;
-    SNR2      = 0;
-  }
+class t_obsInternal {
+ public:
   int    flags;
   char   StatID[20+1];// Station ID
@@ -69,11 +50,44 @@
 };
 
-typedef QPointer<Observation> p_obs;
+class t_obs : public QObject{
+ public:
+
+  t_obs() {
+    _o.flags     = 0;
+    _o.StatID[0] = '\0';
+    _o.satSys    = 'G';
+    _o.satNum    = 0;
+    _o.slot      = 0;
+    _o.GPSWeek   = 0;
+    _o.GPSWeeks  = 0.0;
+    _o.C1        = 0.0;
+    _o.C2        = 0.0;
+    _o.P1        = 0.0;
+    _o.P2        = 0.0;
+    _o.L1        = 0.0;
+    _o.L2        = 0.0;
+    _o.S1        = 0.0;
+    _o.S2        = 0.0;
+    _o.SNR1      = 0;
+    _o.SNR2      = 0;
+  }
+
+  t_obsInternal _o;
+};
+
+typedef QPointer<t_obs> p_obs;
 
 class GPSDecoder {
-  public:
-    virtual void Decode(char* buffer, int bufLen) = 0;
-    virtual ~GPSDecoder() {}
-    QList<p_obs> _obsList;
+ public:
+  virtual void Decode(char* buffer, int bufLen) = 0;
+
+  virtual ~GPSDecoder() {
+    QListIterator<p_obs> it(_obsList);
+    while (it.hasNext()) {
+      delete it.next();
+    }
+  }
+
+  QList<p_obs> _obsList;
 };
 
Index: trunk/BNC/RTCM/RTCM2Decoder.cpp
===================================================================
--- trunk/BNC/RTCM/RTCM2Decoder.cpp	(revision 621)
+++ trunk/BNC/RTCM/RTCM2Decoder.cpp	(revision 622)
@@ -58,9 +58,4 @@
 
 RTCM2Decoder::~RTCM2Decoder() {
-  QListIterator<p_obs> it(_obsList);
-  while (it.hasNext()) {
-    delete it.next();
-  }
-  _obsList.clear();
 }
 
@@ -91,20 +86,20 @@
           
         for (int iSat=0; iSat < _ObsBlock.nSat; iSat++) {
-          Observation* obs = new Observation();
+          p_obs obs = new t_obs();
           if (_ObsBlock.PRN[iSat] > 100) {
-            obs->satNum = _ObsBlock.PRN[iSat] % 100;
-            obs->satSys = 'R';
+            obs->_o.satNum = _ObsBlock.PRN[iSat] % 100;
+            obs->_o.satSys = 'R';
 	  }
 	  else {
-            obs->satNum = _ObsBlock.PRN[iSat];
-            obs->satSys = 'G';
+            obs->_o.satNum = _ObsBlock.PRN[iSat];
+            obs->_o.satSys = 'G';
 	  }
-          obs->GPSWeek  = epochWeek;
-          obs->GPSWeeks = epochSecs;
-          obs->C1       = _ObsBlock.rng_C1[iSat];
-          obs->P1       = _ObsBlock.rng_P1[iSat];
-          obs->P2       = _ObsBlock.rng_P2[iSat];
-          obs->L1       = _ObsBlock.resolvedPhase_L1(iSat);
-          obs->L2       = _ObsBlock.resolvedPhase_L2(iSat);
+          obs->_o.GPSWeek  = epochWeek;
+          obs->_o.GPSWeeks = epochSecs;
+          obs->_o.C1       = _ObsBlock.rng_C1[iSat];
+          obs->_o.P1       = _ObsBlock.rng_P1[iSat];
+          obs->_o.P2       = _ObsBlock.rng_P2[iSat];
+          obs->_o.L1       = _ObsBlock.resolvedPhase_L1(iSat);
+          obs->_o.L2       = _ObsBlock.resolvedPhase_L2(iSat);
 
           _obsList.push_back(obs);
Index: trunk/BNC/RTCM3/RTCM3Decoder.cpp
===================================================================
--- trunk/BNC/RTCM3/RTCM3Decoder.cpp	(revision 621)
+++ trunk/BNC/RTCM3/RTCM3Decoder.cpp	(revision 622)
@@ -84,9 +84,4 @@
 ////////////////////////////////////////////////////////////////////////////
 RTCM3Decoder::~RTCM3Decoder() {
-  QListIterator<p_obs> it(_obsList);
-  while (it.hasNext()) {
-    delete it.next();
-  }
-  _obsList.clear();
 }
 
@@ -116,19 +111,19 @@
           
           for (int ii = 0; ii < _Parser.Data.numsats; ii++) {
-            Observation* obs = new Observation();
+            p_obs obs = new t_obs();
             if      (_Parser.Data.satellites[ii] <= PRN_GPS_END) {
-              obs->satSys = 'G';
-              obs->satNum = _Parser.Data.satellites[ii];
+              obs->_o.satSys = 'G';
+              obs->_o.satNum = _Parser.Data.satellites[ii];
 	    }
 	    else if (_Parser.Data.satellites[ii] <= PRN_GLONASS_END) {
-              obs->satSys = 'R';
-              obs->satNum = _Parser.Data.satellites[ii] - PRN_GLONASS_START + 1;
+              obs->_o.satSys = 'R';
+              obs->_o.satNum = _Parser.Data.satellites[ii] - PRN_GLONASS_START + 1;
 	    }
 	    else {
-              obs->satSys = 'S';
-              obs->satNum = _Parser.Data.satellites[ii] - PRN_WAAS_START + 20;
+              obs->_o.satSys = 'S';
+              obs->_o.satNum = _Parser.Data.satellites[ii] - PRN_WAAS_START + 20;
 	    }
-            obs->GPSWeek  = _Parser.Data.week;
-            obs->GPSWeeks = _Parser.Data.timeofweek / 1000.0;
+            obs->_o.GPSWeek  = _Parser.Data.week;
+            obs->_o.GPSWeeks = _Parser.Data.timeofweek / 1000.0;
           
             for (int jj = 0; jj < _Parser.numdatatypesGPS; jj++) {
@@ -155,28 +150,28 @@
             {
               if      (_Parser.dataflag[jj] & GNSSDF_C1DATA) {
-                obs->C1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
+                obs->_o.C1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
               }
               else if (_Parser.dataflag[jj] & GNSSDF_C2DATA) {
-                obs->C2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
+                obs->_o.C2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
               }
               else if (_Parser.dataflag[jj] & GNSSDF_P1DATA) {
-                obs->P1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
+                obs->_o.P1 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
               }
               else if (_Parser.dataflag[jj] & GNSSDF_P2DATA) {
-                obs->P2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
+                obs->_o.P2 = _Parser.Data.measdata[ii][_Parser.datapos[jj]];
               }
               else if (df & (GNSSDF_L1CDATA|GNSSDF_L1PDATA)) {
-                obs->L1   = _Parser.Data.measdata[ii][pos];
-                obs->SNR1 = _Parser.Data.snrL1[ii];
+                obs->_o.L1   = _Parser.Data.measdata[ii][pos];
+                obs->_o.SNR1 = _Parser.Data.snrL1[ii];
               }
               else if (df & (GNSSDF_L2CDATA|GNSSDF_L2PDATA)) {
-                obs->L2   = _Parser.Data.measdata[ii][pos];
-                obs->SNR2 = _Parser.Data.snrL2[ii];
+                obs->_o.L2   = _Parser.Data.measdata[ii][pos];
+                obs->_o.SNR2 = _Parser.Data.snrL2[ii];
               }
               else if (df & (GNSSDF_S1CDATA|GNSSDF_S1PDATA)) {
-                obs->S1   = _Parser.Data.measdata[ii][pos];
+                obs->_o.S1   = _Parser.Data.measdata[ii][pos];
               }
               else if (df & (GNSSDF_S2CDATA|GNSSDF_S2PDATA)) {
-                obs->S2   = _Parser.Data.measdata[ii][pos];
+                obs->_o.S2   = _Parser.Data.measdata[ii][pos];
               }
             }
Index: trunk/BNC/RTIGS/RTIGSDecoder.cpp
===================================================================
--- trunk/BNC/RTIGS/RTIGSDecoder.cpp	(revision 621)
+++ trunk/BNC/RTIGS/RTIGSDecoder.cpp	(revision 622)
@@ -55,9 +55,4 @@
 ////////////////////////////////////////////////////////////////////////////
 RTIGSDecoder::~RTIGSDecoder() {
-  QListIterator<p_obs> it(_obsList);
-  while (it.hasNext()) {
-    delete it.next();
-  }
-  _obsList.clear();
 }
 
@@ -109,18 +104,18 @@
 
     for (short ii = 0; ii < numObs; ii++) {
-      Observation* obs = new Observation();
-      obs->satSys   = 'G';
-      obs->satNum   = _GPSTrans.DecObs.Obs[ii].sat_prn;
-      obs->GPSWeek  = _GPSTrans.DecObs.Obs[ii].GPSTime / (7 * 86400);
-      obs->GPSWeeks = _GPSTrans.DecObs.Obs[ii].GPSTime % (7 * 86400);
-      obs->C1       = _GPSTrans.DecObs.Obs[ii].l1_pseudo_range;
-      obs->P1       = _GPSTrans.DecObs.Obs[ii].p1_pseudo_range;
-      obs->P2       = _GPSTrans.DecObs.Obs[ii].p2_pseudo_range;
-      obs->L1       = _GPSTrans.DecObs.Obs[ii].p1_phase;
-      obs->L2       = _GPSTrans.DecObs.Obs[ii].p2_phase;
-      obs->S1       = _GPSTrans.DecObs.Obs[ii].l1_sn;
-      obs->S2       = _GPSTrans.DecObs.Obs[ii].l2_sn;
-      obs->SNR1     = int(ceil(_GPSTrans.DecObs.Obs[ii].l1_sn / 60.0 * 9.0));
-      obs->SNR2     = int(ceil(_GPSTrans.DecObs.Obs[ii].l2_sn / 60.0 * 9.0));
+      p_obs obs = new t_obs();
+      obs->_o.satSys   = 'G';
+      obs->_o.satNum   = _GPSTrans.DecObs.Obs[ii].sat_prn;
+      obs->_o.GPSWeek  = _GPSTrans.DecObs.Obs[ii].GPSTime / (7 * 86400);
+      obs->_o.GPSWeeks = _GPSTrans.DecObs.Obs[ii].GPSTime % (7 * 86400);
+      obs->_o.C1       = _GPSTrans.DecObs.Obs[ii].l1_pseudo_range;
+      obs->_o.P1       = _GPSTrans.DecObs.Obs[ii].p1_pseudo_range;
+      obs->_o.P2       = _GPSTrans.DecObs.Obs[ii].p2_pseudo_range;
+      obs->_o.L1       = _GPSTrans.DecObs.Obs[ii].p1_phase;
+      obs->_o.L2       = _GPSTrans.DecObs.Obs[ii].p2_phase;
+      obs->_o.S1       = _GPSTrans.DecObs.Obs[ii].l1_sn;
+      obs->_o.S2       = _GPSTrans.DecObs.Obs[ii].l2_sn;
+      obs->_o.SNR1     = int(ceil(_GPSTrans.DecObs.Obs[ii].l1_sn / 60.0 * 9.0));
+      obs->_o.SNR2     = int(ceil(_GPSTrans.DecObs.Obs[ii].l2_sn / 60.0 * 9.0));
 
       _obsList.push_back(obs);
Index: trunk/BNC/bnccaster.cpp
===================================================================
--- trunk/BNC/bnccaster.cpp	(revision 621)
+++ trunk/BNC/bnccaster.cpp	(revision 622)
@@ -83,5 +83,5 @@
   }
 
-  _epochs = new QMultiMap<long, Observation*>;
+  _epochs = new QMultiMap<long, p_obs>;
 
   _lastDumpSec   = 0; 
@@ -109,5 +109,5 @@
   delete _sockets;
   if (_epochs) {
-    QListIterator<Observation*> it(_epochs->values());
+    QListIterator<p_obs> it(_epochs->values());
     while (it.hasNext()) {
       delete it.next();
@@ -119,16 +119,15 @@
 // New Observations
 ////////////////////////////////////////////////////////////////////////////
-void bncCaster::newObs(const QByteArray staID, bool firstObs, 
-                       Observation* obs) {
+void bncCaster::newObs(const QByteArray staID, bool firstObs, p_obs obs) {
 
   QMutexLocker locker(&_mutex);
 
-  long iSec    = long(floor(obs->GPSWeeks+0.5));
-  long newTime = obs->GPSWeek * 7*24*3600 + iSec;
+  long iSec    = long(floor(obs->_o.GPSWeeks+0.5));
+  long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec;
 
   // Rename the Station
   // ------------------
-  strncpy(obs->StatID, staID.constData(),sizeof(obs->StatID));
-  obs->StatID[sizeof(obs->StatID)-1] = '\0';
+  strncpy(obs->_o.StatID, staID.constData(),sizeof(obs->_o.StatID));
+  obs->_o.StatID[sizeof(obs->_o.StatID)-1] = '\0';
         
   // First time, set the _lastDumpSec immediately
@@ -174,6 +173,6 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncCaster::addGetThread(bncGetThread* getThread) {
-  connect(getThread, SIGNAL(newObs(const QByteArray, bool, Observation*)),
-          this,      SLOT(newObs(const QByteArray, bool, Observation*)));
+  connect(getThread, SIGNAL(newObs(const QByteArray, bool, p_obs)),
+          this,      SLOT(newObs(const QByteArray, bool, p_obs)));
 
   connect(getThread, SIGNAL(error(const QByteArray)), 
@@ -208,8 +207,8 @@
 
     bool first = true;
-    QList<Observation*> allObs = _epochs->values(sec);
-    QListIterator<Observation*> it(allObs);
+    QList<p_obs> allObs = _epochs->values(sec);
+    QListIterator<p_obs> it(allObs);
     while (it.hasNext()) {
-      Observation* obs = it.next();
+      p_obs obs = it.next();
 
       if (_samplingRate == 0 || sec % _samplingRate == 0) {
@@ -221,31 +220,31 @@
             _out->setFieldWidth(1); *_out << begEpoch << endl;;
           }
-          _out->setFieldWidth(0); *_out << obs->StatID; 
-          _out->setFieldWidth(1); *_out << " " << obs->satSys;
+          _out->setFieldWidth(0); *_out << obs->_o.StatID; 
+          _out->setFieldWidth(1); *_out << " " << obs->_o.satSys;
           _out->setPadChar('0');
-          _out->setFieldWidth(2); *_out << obs->satNum; 
+          _out->setFieldWidth(2); *_out << obs->_o.satNum; 
           _out->setPadChar(' ');
           _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(4); *_out << obs->GPSWeek; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(7); *_out << obs->GPSWeeks; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->C1; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->C2; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->P1; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->P2; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->L1; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->L2; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->S1; 
-          _out->setFieldWidth(1); *_out << " ";
-          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->S2;
+          _out->setFieldWidth(4); *_out << obs->_o.GPSWeek; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(7); *_out << obs->_o.GPSWeeks; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.C1; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.C2; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.P1; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.P2; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.L1; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.L2; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.S1; 
+          _out->setFieldWidth(1); *_out << " ";
+          _out->setFieldWidth(14); _out->setRealNumberPrecision(3); *_out << obs->_o.S2;
           _out->setFieldWidth(1); 
-          *_out << " " << obs->SNR1 << " " << obs->SNR2 << endl;
+          *_out << " " << obs->_o.SNR1 << " " << obs->_o.SNR2 << endl;
           if (!it.hasNext()) {
             _out->setFieldWidth(1); *_out << endEpoch << endl;
@@ -257,5 +256,5 @@
         // ----------------------
         if (_sockets) {
-          int numBytes = sizeof(*obs); 
+          int numBytes = sizeof(obs->_o); 
           QListIterator<QTcpSocket*> is(*_sockets);
           while (is.hasNext()) {
@@ -266,5 +265,5 @@
               }
               sock->write(&begObs, 1);
-              sock->write((char*) obs, numBytes);
+              sock->write((char*) &obs->_o, numBytes);
               if (!it.hasNext()) {
                 sock->write(&endEpoch, 1);
Index: trunk/BNC/bnccaster.h
===================================================================
--- trunk/BNC/bnccaster.h	(revision 621)
+++ trunk/BNC/bnccaster.h	(revision 622)
@@ -44,5 +44,5 @@
 
  public slots:
-   void newObs(const QByteArray staID, bool firstObs, Observation* obs);
+   void newObs(const QByteArray staID, bool firstObs, p_obs obs);
 
  signals:
@@ -57,16 +57,16 @@
    void dumpEpochs(long minTime, long maxTime);
 
-   QFile*                         _outFile;
-   int                            _port;
-   QTextStream*                   _out;
-   QMultiMap<long, Observation*>* _epochs;
-   long                           _lastDumpSec;
-   QTcpServer*                    _server;
-   QList<QTcpSocket*>*            _sockets;
-   QList<QByteArray>              _staIDs;
-   QList<bncGetThread*>           _threads;
-   int                            _samplingRate;
-   long                           _waitTime;
-   QMutex                         _mutex;
+   QFile*                  _outFile;
+   int                     _port;
+   QTextStream*            _out;
+   QMultiMap<long, p_obs>* _epochs;
+   long                    _lastDumpSec;
+   QTcpServer*             _server;
+   QList<QTcpSocket*>*     _sockets;
+   QList<QByteArray>       _staIDs;
+   QList<bncGetThread*>    _threads;
+   int                     _samplingRate;
+   long                    _waitTime;
+   QMutex                  _mutex;
 };
 
Index: trunk/BNC/bncgetthread.cpp
===================================================================
--- trunk/BNC/bncgetthread.cpp	(revision 621)
+++ trunk/BNC/bncgetthread.cpp	(revision 622)
@@ -417,14 +417,14 @@
           const double maxDt      = 600.0;            
 
-          if (week < obs->GPSWeek) {
+          if (week < obs->_o.GPSWeek) {
             week += 1;
             sec  -= secPerWeek;
           }
-          if (week > obs->GPSWeek) {
+          if (week > obs->_o.GPSWeek) {
             week -= 1;
             sec  += secPerWeek;
           }
-          double dt = fabs(sec - obs->GPSWeeks);
-          if (week != obs->GPSWeek || dt > maxDt) {
+          double dt = fabs(sec - obs->_o.GPSWeeks);
+          if (week != obs->_o.GPSWeek || dt > maxDt) {
             emit( newMessage("Wrong observation epoch") );
             delete obs;
@@ -435,6 +435,6 @@
           // ------------
           if (_rnx) {
-             long iSec    = long(floor(obs->GPSWeeks+0.5));
-             long newTime = obs->GPSWeek * 7*24*3600 + iSec;
+             long iSec    = long(floor(obs->_o.GPSWeeks+0.5));
+             long newTime = obs->_o.GPSWeek * 7*24*3600 + iSec;
             if (_samplingRate == 0 || iSec % _samplingRate == 0) {
               _rnx->deepCopy(obs);
Index: trunk/BNC/bncgetthread.h
===================================================================
--- trunk/BNC/bncgetthread.h	(revision 621)
+++ trunk/BNC/bncgetthread.h	(revision 622)
@@ -52,5 +52,5 @@
  signals:
    void newBytes(const QByteArray staID, double nbyte);
-   void newObs(const QByteArray staID, bool firstObs, Observation* obs);
+   void newObs(const QByteArray staID, bool firstObs, p_obs obs);
    void error(const QByteArray staID);
    void newMessage(const QByteArray msg);
Index: trunk/BNC/bncrinex.cpp
===================================================================
--- trunk/BNC/bncrinex.cpp	(revision 621)
+++ trunk/BNC/bncrinex.cpp	(revision 622)
@@ -96,5 +96,5 @@
 ////////////////////////////////////////////////////////////////////////////
 bncRinex::~bncRinex() {
-  QListIterator<Observation*> it(_obs);
+  QListIterator<p_obs> it(_obs);
   while (it.hasNext()) {
     delete it.next();
@@ -466,6 +466,6 @@
 // Stores Observation into Internal Array
 ////////////////////////////////////////////////////////////////////////////
-void bncRinex::deepCopy(const Observation* obs) {
-  Observation* newObs = new Observation();
+void bncRinex::deepCopy(const p_obs obs) {
+  p_obs newObs = new t_obs();
   memcpy(newObs, obs, sizeof(*obs));
   _obs.push_back(newObs);
@@ -478,10 +478,10 @@
   // Select observations older than maxTime
   // --------------------------------------
-  QList<Observation*> dumpList;
-  QMutableListIterator<Observation*> mIt(_obs);
+  QList<p_obs> dumpList;
+  QMutableListIterator<p_obs> mIt(_obs);
   while (mIt.hasNext()) {
-    Observation* ob = mIt.next();
-    if (ob->GPSWeek * 7*24*3600 + ob->GPSWeeks < maxTime - 0.05) {
-      dumpList.push_back(ob);
+    p_obs obs = mIt.next();
+    if (obs->_o.GPSWeek * 7*24*3600 + obs->_o.GPSWeeks < maxTime - 0.05) {
+      dumpList.push_back(obs);
       mIt.remove();
     }
@@ -496,8 +496,8 @@
   // Time of Epoch
   // -------------
-  Observation* fObs = *dumpList.begin();
-  QDateTime datTim    = dateAndTimeFromGPSweek(fObs->GPSWeek, fObs->GPSWeeks);
-  QDateTime datTimNom = dateAndTimeFromGPSweek(fObs->GPSWeek, 
-                                               floor(fObs->GPSWeeks+0.5));
+  p_obs fObs = *dumpList.begin();
+  QDateTime datTim    = dateAndTimeFromGPSweek(fObs->_o.GPSWeek, fObs->_o.GPSWeeks);
+  QDateTime datTimNom = dateAndTimeFromGPSweek(fObs->_o.GPSWeek, 
+                                               floor(fObs->_o.GPSWeeks+0.5));
 
   // Close the file
@@ -514,5 +514,5 @@
   }
 
-  double sec = double(datTim.time().second()) + fmod(fObs->GPSWeeks,1.0);
+  double sec = double(datTim.time().second()) + fmod(fObs->_o.GPSWeeks,1.0);
 
   // RINEX Version 3
@@ -523,19 +523,19 @@
          << "  " << 0 << setw(3)  << dumpList.size() << endl;
 
-    QListIterator<Observation*> it(dumpList);
+    QListIterator<p_obs> it(dumpList);
     while (it.hasNext()) {
-      Observation* ob = it.next();
-      _out << ob->satSys 
-           << setw(2) << setfill('0') << ob->satNum << setfill(' ')
-           << setw(14) << setprecision(3) << ob->C1 << "  "  
-           << setw(14) << setprecision(3) << ob->L1 << " " 
-           << setw(1)                     << ob->SNR1
-           << setw(14) << setprecision(3) << ob->S1 << "  " 
-           << setw(14) << setprecision(3) << ob->P2 << "  " 
-           << setw(14) << setprecision(3) << ob->L2 << " " 
-           << setw(1)                     << ob->SNR2
-           << setw(14) << setprecision(3) << ob->S2
+      p_obs obs = it.next();
+      _out << obs->_o.satSys 
+           << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ')
+           << setw(14) << setprecision(3) << obs->_o.C1 << "  "  
+           << setw(14) << setprecision(3) << obs->_o.L1 << " " 
+           << setw(1)                     << obs->_o.SNR1
+           << setw(14) << setprecision(3) << obs->_o.S1 << "  " 
+           << setw(14) << setprecision(3) << obs->_o.P2 << "  " 
+           << setw(14) << setprecision(3) << obs->_o.L2 << " " 
+           << setw(1)                     << obs->_o.SNR2
+           << setw(14) << setprecision(3) << obs->_o.S2
            << endl;
-      delete ob;
+      delete obs;
     }
   }
@@ -548,9 +548,9 @@
          << "  " << 0 << setw(3)  << dumpList.size();
     
-    QListIterator<Observation*> it(dumpList); int iSat = 0;
+    QListIterator<p_obs> it(dumpList); int iSat = 0;
     while (it.hasNext()) {
       iSat++;
-      Observation* ob = it.next();
-      _out << ob->satSys << setw(2) << ob->satNum;
+      p_obs obs = it.next();
+      _out << obs->_o.satSys << setw(2) << obs->_o.satNum;
       if (iSat == 12 && it.hasNext()) {
         _out << endl << "                                ";
@@ -562,21 +562,21 @@
     it.toFront();
     while (it.hasNext()) {
-      Observation* ob = it.next();
+      p_obs obs = it.next();
     
       char lli = ' ';
       char snr = ' ';
-      _out << setw(14) << setprecision(3) << ob->C1 << lli << snr;
-      _out << setw(14) << setprecision(3) << ob->C2 << lli << snr;
-      _out << setw(14) << setprecision(3) << ob->P1 << lli << snr;
-      _out << setw(14) << setprecision(3) << ob->P2 << lli << snr; 
-      _out << setw(14) << setprecision(3) << ob->L1 << lli 
-           << setw(1) << ob->SNR1 << endl;
-      _out << setw(14) << setprecision(3) << ob->L2 << lli
-           << setw(1) << ob->SNR2;
-      _out << setw(14) << setprecision(3) << ob->S1 ;
-      _out << setw(16) << setprecision(3) << ob->S2 ;
+      _out << setw(14) << setprecision(3) << obs->_o.C1 << lli << snr;
+      _out << setw(14) << setprecision(3) << obs->_o.C2 << lli << snr;
+      _out << setw(14) << setprecision(3) << obs->_o.P1 << lli << snr;
+      _out << setw(14) << setprecision(3) << obs->_o.P2 << lli << snr; 
+      _out << setw(14) << setprecision(3) << obs->_o.L1 << lli 
+           << setw(1) << obs->_o.SNR1 << endl;
+      _out << setw(14) << setprecision(3) << obs->_o.L2 << lli
+           << setw(1) << obs->_o.SNR2;
+      _out << setw(14) << setprecision(3) << obs->_o.S1 ;
+      _out << setw(16) << setprecision(3) << obs->_o.S2 ;
       _out << endl;
     
-      delete ob;
+      delete obs;
     }
   }
Index: trunk/BNC/bncrinex.h
===================================================================
--- trunk/BNC/bncrinex.h	(revision 621)
+++ trunk/BNC/bncrinex.h	(revision 622)
@@ -41,5 +41,5 @@
             const QByteArray& longitude, const QByteArray& nmea);
    ~bncRinex();
-   void deepCopy(const Observation* obs);
+   void deepCopy(const p_obs obs);
    void dumpEpoch(long maxTime);
    void setReconnectFlag(bool flag){_reconnectFlag = flag;}
@@ -52,24 +52,24 @@
    t_irc downloadSkeleton();
 
-   QByteArray          _statID;
-   QByteArray          _fName;
-   QList<Observation*> _obs;
-   std::ofstream       _out;
-   QStringList         _headerLines;
-   bool                _headerWritten;
-   QDateTime           _nextCloseEpoch;
-   QString             _rnxScriptName;
-   QUrl                _mountPoint;
-   QString             _pgmName;
-   QString             _userName;
-   QString             _sklName;
-   QByteArray          _format;
-   QByteArray          _latitude;
-   QByteArray          _longitude;
-   QByteArray          _nmea;
-   bool                _reconnectFlag;
-   QDate               _skeletonDate;
-   QMutex              _mutex;
-   int                 _rinexVers;
+   QByteArray    _statID;
+   QByteArray    _fName;
+   QList<p_obs>  _obs;
+   std::ofstream _out;
+   QStringList   _headerLines;
+   bool          _headerWritten;
+   QDateTime     _nextCloseEpoch;
+   QString       _rnxScriptName;
+   QUrl          _mountPoint;
+   QString       _pgmName;
+   QString       _userName;
+   QString       _sklName;
+   QByteArray    _format;
+   QByteArray    _latitude;
+   QByteArray    _longitude;
+   QByteArray    _nmea;
+   bool          _reconnectFlag;
+   QDate         _skeletonDate;
+   QMutex        _mutex;
+   int           _rinexVers;
 };
 
