Index: trunk/BNC/src/PPP_free/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP_free/pppClient.cpp	(revision 6048)
+++ trunk/BNC/src/PPP_free/pppClient.cpp	(revision 6048)
@@ -0,0 +1,111 @@
+
+// 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_pppClient
+ *
+ * Purpose:    PPP Client processing starts here
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    29-Jul-2014
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <QThreadStorage>
+
+#include <iostream>
+#include <iomanip>
+#include <stdlib.h>
+#include <string.h>
+#include <stdexcept>
+
+#include "pppClient.h"
+#include "pppEphPool.h"
+#include "pppObsPool.h"
+#include "bncconst.h"
+#include "bncutils.h"
+#include "pppStation.h"
+#include "bncantex.h"
+#include "pppFilter.h"
+
+using namespace BNC_PPP;
+using namespace std;
+
+// Global variable holding thread-specific pointers
+//////////////////////////////////////////////////////////////////////////////
+t_pppClient* CLIENT = 0;
+
+// Static function returning thread-specific pointer
+//////////////////////////////////////////////////////////////////////////////
+t_pppClient* t_pppClient::instance() {
+  return CLIENT;
+}
+
+// Constructor
+//////////////////////////////////////////////////////////////////////////////
+t_pppClient::t_pppClient(const t_pppOptions* opt) {
+  _opt      = new t_pppOptions(*opt);
+  _log      = new ostringstream();
+  CLIENT = this;
+}
+
+// Destructor
+//////////////////////////////////////////////////////////////////////////////
+t_pppClient::~t_pppClient() {
+  delete _log;
+  delete _opt;
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::putEphemeris(const t_eph* eph) {
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::putOrbCorrections(const vector<t_orbCorr*>& corr) {
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::putClkCorrections(const vector<t_clkCorr*>& corr) {
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::putBiases(const vector<t_satBias*>& biases) {
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) {
+}
+
Index: trunk/BNC/src/PPP_free/pppClient.h
===================================================================
--- trunk/BNC/src/PPP_free/pppClient.h	(revision 6048)
+++ trunk/BNC/src/PPP_free/pppClient.h	(revision 6048)
@@ -0,0 +1,52 @@
+#ifndef PPPCLIENT_H
+#define PPPCLIENT_H
+
+#include <sstream>
+#include <vector>
+#include "pppInclude.h"
+#include "ephemeris.h"
+#include "pppOptions.h"
+
+class bncAntex;
+
+namespace BNC_PPP {
+
+class t_pppClient {
+ public:
+  t_pppClient(const t_pppOptions* opt);                                                      
+  ~t_pppClient();                                                     
+
+  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);   
+  void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);
+
+  std::ostringstream& log() {return *_log;}
+  const t_pppOptions* opt() const {return _opt;}
+
+  static t_pppClient* instance();
+
+ private:
+  void initOutput(t_output* output);
+  void finish(t_irc irc);
+  void clearObs();
+  t_irc prepareObs(const std::vector<t_satObs*>& satObs,
+                   std::vector<t_pppSatObs*>& obsVector, bncTime& epoTime);
+  t_irc cmpModel(t_pppStation* station, const ColumnVector& xyzc,
+                 std::vector<t_pppSatObs*>& obsVector);
+  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector, 
+                    ColumnVector& xyzc, bool print);
+  double cmpOffGG(std::vector<t_pppSatObs*>& obsVector);
+
+  std::ostringstream*       _log; 
+  t_pppOptions*             _opt; 
+};
+
+}; // namespace BNC_PPP
+
+#define PPP_CLIENT (BNC_PPP::t_pppClient::instance())
+#define LOG        (BNC_PPP::t_pppClient::instance()->log())
+#define OPT        (BNC_PPP::t_pppClient::instance()->opt())
+
+#endif
