Index: /trunk/BNC/pppopt.cpp
===================================================================
--- /trunk/BNC/pppopt.cpp	(revision 3632)
+++ /trunk/BNC/pppopt.cpp	(revision 3632)
@@ -0,0 +1,109 @@
+// Part of BNC, a utility for retrieving decoding and
+// converting GNSS data streams from NTRIP broadcasters.
+//
+// Copyright (C) 2007
+// German Federal Agency for Cartography and Geodesy (BKG)
+// http://www.bkg.bund.de
+// Czech Technical University Prague, Department of Geodesy
+// http://www.fsv.cvut.cz
+//
+// Email: euref-ip@bkg.bund.de
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation, version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Client
+ * -------------------------------------------------------------------------
+ *
+ * Class:      t_pppOpt
+ *
+ * Purpose:    Options for Precise Point Positioning
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    22-Jan-2012
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <iostream>
+#include "bncopt.h"
+#include "bncsettings.h"
+
+using namespace std;
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+t_pppOpt::t_pppOpt() {
+  bncSettings settings;
+
+  sigmaCode    = settingsToDouble("pppSigmaCode",    5.0);
+  sigmaPhase   = settingsToDouble("pppSigmaPhase",  0.02);
+  sigCrd0      = settingsToDouble("pppSigCrd0",    100.0);
+  sigCrdP      = settingsToDouble("pppSigCrdP",    100.0);
+  sigTrp0      = settingsToDouble("pppSigTrp0",      0.1);
+  sigTrpP      = settingsToDouble("pppSigTrpP",     1e-6);
+  refCrd[0]    = settingsToDouble("pppRefCrdX");
+  refCrd[1]    = settingsToDouble("pppRefCrdY");
+  refCrd[2]    = settingsToDouble("pppRefCrdZ");
+  antEccNEU[0] = settingsToDouble("pppRefdN");
+  antEccNEU[1] = settingsToDouble("pppRefdE");
+  antEccNEU[2] = settingsToDouble("pppRefdU");
+  maxSolGap    = settingsToDouble("pppMaxSolGap");
+  quickStart   = settingsToDouble("pppQuickStart"); if (!refCrdSet()) quickStart = 0.0;
+  corrSync     = settingsToDouble("pppSync");       if (!pppMode) corrSynC = 0.0;
+
+  pppCorrMount = setting.value("pppCorrMount").toString();
+  nmeaFile     = setting.value("nmeaFile").toString();
+  antexFile    = setting.value("pppAntex").toString();
+  antennaName  = setting.value("pppAntenna").toString();
+
+  pppMode      = settings.value("pppSPP").toString() == "PPP";
+  rnxAppend    = settingsChecked("rnxAppend");
+  usePhase     = settingsChecked("pppUsePhase");
+  estTropo     = settingsChecked("pppEstTropo");
+  useGlonass   = settingsChecked("pppGLONASS");
+  useGalileo   = settingsChecked("pppGalileo");
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+t_pppOpt::~t_pppOpt() {
+}
+
+// Settings Value with Default
+////////////////////////////////////////////////////////////////////////////
+double t_pppOpt::settingsToDouble(const QByteArray& keyName, 
+                                  double defaultValue) const {
+  bncSettings settings;
+
+  if (settings.value(keyName).toString().isEmpty()) {
+    return defaultValue;
+  }
+  else {
+    return settings.value(keyName).toDouble();
+  }
+}
+
+// Settings Checked
+////////////////////////////////////////////////////////////////////////////
+bool t_pppOpt::settingsChecked(const QByteArray& keyName) const {
+  if (Qt::CheckState(settings.value(keyName).toInt()) == Qt::Checked) {
+    return true;
+  }
+  else {
+    return false;
+  }
+}
Index: /trunk/BNC/pppopt.h
===================================================================
--- /trunk/BNC/pppopt.h	(revision 3632)
+++ /trunk/BNC/pppopt.h	(revision 3632)
@@ -0,0 +1,61 @@
+// Part of BNC, a utility for retrieving decoding and
+// converting GNSS data streams from NTRIP broadcasters.
+//
+// Copyright (C) 2007
+// German Federal Agency for Cartography and Geodesy (BKG)
+// http://www.bkg.bund.de
+// Czech Technical University Prague, Department of Geodesy
+// http://www.fsv.cvut.cz
+//
+// Email: euref-ip@bkg.bund.de
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation, version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+#ifndef PPPOPT_H
+#define PPPOPT_H
+
+class t_pppOpt {
+ public:
+  t_pppOpt();
+  ~t_pppOpt();
+  bool refCrdSet() {
+    return refCrd[0] != 0.0 || refCrd[1] != 0 || refCrd[2] != 0.0;
+  }
+  double  sigmaCode;
+  double  sigmaPhase;
+  double  sigCrd0;
+  double  sigCrdP;
+  double  sigTrp0;
+  double  sigTrpP;
+  double  refCrd[3];
+  double  antEccNEU[3];
+  double  pppCorrMount;
+  double  maxSolGap;
+  double  quickStart;
+  double  corrSync;
+  QString nmeaFile;
+  QString antexFile;
+  QString antennaName;
+  bool    pppMode;
+  bool    rnxAppend;
+  bool    usePhase;
+  bool    estTropo;
+  bool    useGlonass;
+  bool    useGalileo;
+ private:
+  double settingsToDouble(const QByteArray& keyName, double defaultValue = 0.0) const;
+  bool   settingsChecked(const QByteArray& keyName) const;
+};
+
+#endif
