Index: trunk/BNC/src/PPP_free/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP_free/pppClient.cpp	(revision 6098)
+++ trunk/BNC/src/PPP_free/pppClient.cpp	(revision 6099)
@@ -45,7 +45,6 @@
 #include "pppClient.h"
 #include "pppFilter.h"
-#include "pppOptions.h"
+#include "bncephuser.h"
 #include "bncutils.h"
-#include "bncconst.h"
 
 using namespace BNC_PPP;
@@ -64,5 +63,5 @@
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
-t_pppClient::t_pppClient(const t_pppOptions* opt) : bncEphUser(false) {
+t_pppClient::t_pppClient(const t_pppOptions* opt) {
 
   _opt     = new t_pppOptions(*opt);
@@ -70,4 +69,5 @@
   _epoData = new t_epoData();
   _log     = new ostringstream();
+  _ephUser = new bncEphUser(false);
   _staID   = QByteArray(_opt->_roverName.c_str());
 
@@ -81,4 +81,5 @@
   delete _epoData;
   delete _opt;
+  delete _ephUser;
   delete _log;
 }
@@ -87,5 +88,4 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) {
-  QMutexLocker locker(&_mutex);
   
   // Convert and store observations
@@ -176,7 +176,7 @@
       int channel = 0;
       if (satData->system() == 'R') {
-        if (_eph.contains(satData->prn)) {
-          t_eph* eLast =_eph.value(satData->prn)->last;
-          channel = eLast->slotNum();
+        const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(satData->prn);
+        if (ephPair) {
+          channel = ephPair->last->slotNum();
         }
         else {
@@ -229,10 +229,10 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putOrbCorrections(const std::vector<t_orbCorr*>& corr) {
-  QMutexLocker locker(&_mutex);
   for (unsigned ii = 0; ii < corr.size(); ii++) {
     QString prn = QString(corr[ii]->_prn.toString().c_str());
-    if (_eph.contains(prn)) {
-      t_eph* eLast = _eph.value(prn)->last;
-      t_eph* ePrev = _eph.value(prn)->prev;
+    const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
+    if (ephPair) {
+      t_eph* eLast = ephPair->last;
+      t_eph* ePrev = ephPair->prev;
       if      (eLast && eLast->IOD() == corr[ii]->_iod) {
         eLast->setOrbCorr(corr[ii]);
@@ -248,10 +248,10 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putClkCorrections(const std::vector<t_clkCorr*>& corr) {
-  QMutexLocker locker(&_mutex);
   for (unsigned ii = 0; ii < corr.size(); ii++) {
     QString prn = QString(corr[ii]->_prn.toString().c_str());
-    if (_eph.contains(prn)) {
-      t_eph* eLast = _eph.value(prn)->last;
-      t_eph* ePrev = _eph.value(prn)->prev;
+    const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
+    if (ephPair) {
+      t_eph* eLast = ephPair->last;
+      t_eph* ePrev = ephPair->prev;
       if      (eLast && eLast->IOD() == corr[ii]->_iod) {
         eLast->setClkCorr(corr[ii]);
@@ -276,11 +276,11 @@
   const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph);
   if      (ephGPS) {
-    putNewEph(new t_ephGPS(*ephGPS));
+    _ephUser->putNewEph(new t_ephGPS(*ephGPS));
   }
   else if (ephGlo) {
-    putNewEph(new t_ephGlo(*ephGlo));
+    _ephUser->putNewEph(new t_ephGlo(*ephGlo));
   }
   else if (ephGal) {
-    putNewEph(new t_ephGal(*ephGal));
+    _ephUser->putNewEph(new t_ephGal(*ephGal));
   }
 }
@@ -290,7 +290,9 @@
 t_irc t_pppClient::getSatPos(const bncTime& tt, const QString& prn, 
                               ColumnVector& xc, ColumnVector& vv) {
-  if (_eph.contains(prn)) {
-    t_eph* eLast = _eph.value(prn)->last;
-    t_eph* ePrev = _eph.value(prn)->prev;
+
+  const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
+  if (ephPair) {
+    t_eph* eLast = ephPair->last;
+    t_eph* ePrev = ephPair->prev;
     if      (eLast && eLast->getCrd(tt, xc, vv, _opt->useOrbClkCorr()) == success) {
       return success;
Index: trunk/BNC/src/PPP_free/pppClient.h
===================================================================
--- trunk/BNC/src/PPP_free/pppClient.h	(revision 6098)
+++ trunk/BNC/src/PPP_free/pppClient.h	(revision 6099)
@@ -27,43 +27,15 @@
 
 #include <vector>
-#include "bncephuser.h"
+#include <QtCore>
+
+#include "pppInclude.h"
+#include "pppOptions.h"
+
+class bncEphUser;
+class t_eph;
 
 namespace BNC_PPP {
   
 class t_pppFilter;
-class t_pppOptions;
-class t_satObs;
-class t_satData;
-class t_epoData;
-class t_output;
-class t_orbCorr;
-class t_clkCorr;
-class t_satBias;
-
-class t_pppClient : public bncEphUser {
- public:
-  t_pppClient(const t_pppOptions* opt);
-  ~t_pppClient();
-  void                processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);
-  void                putEphemeris(const t_eph* eph);                  
-  void                putOrbCorrections(const std::vector<t_orbCorr*>& corr); 
-  void                putClkCorrections(const std::vector<t_clkCorr*>& corr); 
-  void                putBiases(const std::vector<t_satBias*>& satBias);   
-  QByteArray          staID() const {return _staID;}
-  const t_pppOptions* opt() const {return _opt;}
-  static t_pppClient* instance();
-  std::ostringstream& log() {return *_log;}
-
- private:
-  t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);
-  void  putNewObs(t_satData* satData);
-  t_irc cmpToT(t_satData* satData);
-
-  t_pppOptions*       _opt;
-  QByteArray          _staID;
-  t_epoData*          _epoData;
-  t_pppFilter*        _filter;
-  std::ostringstream* _log; 
-};
 
 class t_satData {
@@ -148,4 +120,31 @@
 };
 
+class t_pppClient {
+ public:
+  t_pppClient(const t_pppOptions* opt);
+  ~t_pppClient();
+  void                processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);
+  void                putEphemeris(const t_eph* eph);                  
+  void                putOrbCorrections(const std::vector<t_orbCorr*>& corr); 
+  void                putClkCorrections(const std::vector<t_clkCorr*>& corr); 
+  void                putBiases(const std::vector<t_satBias*>& satBias);   
+  QByteArray          staID() const {return _staID;}
+  const t_pppOptions* opt() const {return _opt;}
+  static t_pppClient* instance();
+  std::ostringstream& log() {return *_log;}
+
+ private:
+  t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);
+  void  putNewObs(t_satData* satData);
+  t_irc cmpToT(t_satData* satData);
+
+  bncEphUser*         _ephUser;
+  t_pppOptions*       _opt;
+  QByteArray          _staID;
+  t_epoData*          _epoData;
+  t_pppFilter*        _filter;
+  std::ostringstream* _log; 
+};
+
 }
 
