Index: trunk/BNC/bncpppclient.cpp
===================================================================
--- trunk/BNC/bncpppclient.cpp	(revision 3633)
+++ trunk/BNC/bncpppclient.cpp	(revision 3635)
@@ -48,5 +48,5 @@
 #include "bncconst.h"
 #include "bncmodel.h"
-#include "bncsettings.h"
+#include "pppopt.h"
 
 using namespace std;
@@ -54,28 +54,17 @@
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
-bncPPPclient::bncPPPclient(QByteArray staID) {
-
-  bncSettings settings;
-
-  if ( Qt::CheckState(settings.value("pppGLONASS").toInt()) == Qt::Checked) {
-    _useGlonass = true;
+bncPPPclient::bncPPPclient(QByteArray staID, t_pppOpt* opt) {
+
+  if (opt) {
+    _opt      = opt;
+    _optOwner = false;
   }
   else {
-    _useGlonass = false;
-  }
-
-  if ( Qt::CheckState(settings.value("pppGalileo").toInt()) == Qt::Checked) {
-    _useGalileo = true;
-  }
-  else {
-    _useGalileo = false;
-  }
-
-  if (settings.value("pppSPP").toString() == "PPP") {
-    _pppMode = true;
-  }
-  else {
-    _pppMode = false;
-  }
+    _opt      = new t_pppOpt();
+    _optOwner = true;
+  }
+
+  _staID = staID;
+  _model = new bncModel(staID);
 
   connect(this, SIGNAL(newMessage(QByteArray,bool)), 
@@ -85,10 +74,6 @@
           this, SLOT(slotNewCorrections(QList<QString>)));
 
-  _staID   = staID;
-  _model   = new bncModel(staID);
   connect(_model, SIGNAL(newNMEAstr(QByteArray)), 
           this,   SIGNAL(newNMEAstr(QByteArray)));
-
-  _pppCorrMount = settings.value("pppCorrMount").toString();
 }
 
@@ -111,4 +96,7 @@
     delete ib.value();
   }
+  if (_optOwner) {
+    delete _opt;
+  }
 }
 
@@ -119,8 +107,8 @@
 
   if      (obs.satSys == 'R') {
-    if (!_useGlonass) return;
+    if (!_opt->useGlonass) return;
   }
   else if (obs.satSys == 'E') {
-    if (!_useGalileo) return;
+    if (!_opt->useGalileo) return;
   }
   else if (obs.satSys != 'G') {
@@ -265,5 +253,5 @@
   // Check the Mountpoint (source of corrections)
   // --------------------------------------------
-  if (!_pppCorrMount.isEmpty()) {
+  if (!_opt->pppCorrMount.isEmpty()) {
     QMutableListIterator<QString> itm(corrList);
     while (itm.hasNext()) {
@@ -271,5 +259,5 @@
       if (hlp.size() > 0) {
         QString mountpoint = hlp[hlp.size()-1];
-        if (mountpoint != _pppCorrMount) {
+        if (mountpoint != _opt->pppCorrMount) {
           itm.remove();     
         }
@@ -368,5 +356,5 @@
   if (_eph.contains(prn)) {
 
-    if (_pppMode) {
+    if (_opt->pppMode) {
       if (_corr.contains(prn)) {
         t_corr* cc = _corr.value(prn);
@@ -483,12 +471,4 @@
 void bncPPPclient::processEpochs() {
 
-  // Synchronization threshold (not used in SPP mode)
-  // ------------------------------------------------
-  bncSettings settings;
-  double maxDt = settings.value("pppSync").toDouble();
-  if (!_pppMode) {
-    maxDt = 0.0;
-  }
-
   // Make sure the buffer does not grow beyond any limit
   // ---------------------------------------------------
@@ -507,5 +487,5 @@
     // No corrections yet, skip the epoch
     // ----------------------------------
-    if (maxDt != 0.0 && !_corr_tt.valid()) {
+    if (_opt->corrSync != 0.0 && !_corr_tt.valid()) {
       return;
     }
@@ -513,5 +493,5 @@
     // Process the front epoch
     // -----------------------
-    if (maxDt == 0 || frontEpoData->tt - _corr_tt < maxDt) {
+    if (_opt->corrSync == 0 || frontEpoData->tt - _corr_tt < _opt->corrSync) {
       processFrontEpoch();
       delete _epoData.front();
Index: trunk/BNC/bncpppclient.h
===================================================================
--- trunk/BNC/bncpppclient.h	(revision 3633)
+++ trunk/BNC/bncpppclient.h	(revision 3635)
@@ -31,4 +31,5 @@
 
 class bncModel;
+class t_pppOpt;
 
 class t_satData {
@@ -121,5 +122,5 @@
 
  public:
-  bncPPPclient(QByteArray staID);
+  bncPPPclient(QByteArray staID, t_pppOpt* opt = 0);
   ~bncPPPclient();
   void putNewObs(const t_obs& pp);
@@ -156,4 +157,6 @@
   t_irc cmpToT(t_satData* satData);
 
+  t_pppOpt*               _opt;
+  bool                    _optOwner;
   QByteArray              _staID;
   QMap<QString, t_corr*>  _corr;
@@ -162,9 +165,5 @@
   std::queue<t_epoData*>  _epoData;
   bncModel*               _model;
-  bool                    _useGlonass;
-  bool                    _useGalileo;
-  bool                    _pppMode;
   QMap<QString, slipInfo> _slips;
-  QString                 _pppCorrMount;
 };
 
Index: trunk/BNC/pppopt.cpp
===================================================================
--- trunk/BNC/pppopt.cpp	(revision 3633)
+++ trunk/BNC/pppopt.cpp	(revision 3635)
@@ -63,6 +63,6 @@
   antEccNEU[2] = settingsToDouble("pppRefdU");
   maxSolGap    = settingsToDouble("pppMaxSolGap");
-  quickStart   = settingsToDouble("pppQuickStart"); if (!refCrdSet()) quickStart = 0.0;
-  corrSync     = settingsToDouble("pppSync");       if (!pppMode) corrSync = 0.0;
+  quickStart   = settingsToDouble("pppQuickStart"); 
+  corrSync     = settingsToDouble("pppSync");       
 
   pppCorrMount = settings.value("pppCorrMount").toString();
@@ -77,4 +77,7 @@
   useGlonass   = settingsChecked("pppGLONASS");
   useGalileo   = settingsChecked("pppGalileo");
+
+  if (!refCrdSet()) quickStart = 0.0;
+  if (!pppMode)     corrSync   = 0.0;
 }
 
