Index: trunk/BNC/bnccaster.cpp
===================================================================
--- trunk/BNC/bnccaster.cpp	(revision 605)
+++ 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);
