Index: trunk/BNS/bns.cpp
===================================================================
--- trunk/BNS/bns.cpp	(revision 847)
+++ trunk/BNS/bns.cpp	(revision 848)
@@ -21,4 +21,5 @@
 #include "bnsutils.h" 
 #include "bnsrinex.h" 
+#include "bnssp3.h" 
 
 using namespace std;
@@ -87,4 +88,13 @@
   else {
     _rnx = new bnsRinex();
+  }
+
+  // SP3 writer
+  // ----------
+  if ( settings.value("sp3Path").toString().isEmpty() ) { 
+    _sp3 = 0;
+  }
+  else {
+    _sp3 = new bnsSP3();
   }
 }
@@ -332,4 +342,7 @@
     _rnx->write(GPSweek, GPSweeks, prn, xx);
   }
+  if (_sp3) {
+    _sp3->write(GPSweek, GPSweeks, prn, xx);
+  }
 }
 
Index: trunk/BNS/bns.h
===================================================================
--- trunk/BNS/bns.h	(revision 847)
+++ trunk/BNS/bns.h	(revision 848)
@@ -10,4 +10,5 @@
 
 class bnsRinex;
+class bnsSP3;
 
 class t_ephPair {
@@ -63,6 +64,6 @@
   QMutex                    _mutex;
   QMap<QString, t_ephPair*> _ephList;
-
   bnsRinex*                 _rnx;
+  bnsSP3*                   _sp3;
 };
 #endif
Index: trunk/BNS/bns.pro
===================================================================
--- trunk/BNS/bns.pro	(revision 847)
+++ trunk/BNS/bns.pro	(revision 848)
@@ -23,5 +23,5 @@
 
 HEADERS =             bns.h   bnswindow.h   bnshlpdlg.h   bnshtml.h   \
-          bnseph.h    bnsutils.h bnsrinex.h
+          bnseph.h    bnsutils.h bnsrinex.h bnssp3.h
 
 HEADERS += newmat/controlw.h newmat/include.h newmat/myexcept.h  \
@@ -30,5 +30,5 @@
 
 SOURCES = bnsmain.cpp bns.cpp bnswindow.cpp bnshlpdlg.cpp bnshtml.cpp \
-          bnseph.cpp  bnsutils.cpp bnsrinex.cpp
+          bnseph.cpp  bnsutils.cpp bnsrinex.cpp bnssp3.cpp
 
 SOURCES += newmat/bandmat.cpp newmat/cholesky.cpp newmat/evalue.cpp  \
Index: trunk/BNS/bnssp3.cpp
===================================================================
--- trunk/BNS/bnssp3.cpp	(revision 848)
+++ trunk/BNS/bnssp3.cpp	(revision 848)
@@ -0,0 +1,38 @@
+
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Server
+ * -------------------------------------------------------------------------
+ *
+ * Class:      bnsSP3
+ *
+ * Purpose:    writes SP3 files
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    25-Apr-2008
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <iomanip>
+
+#include "bnssp3.h"
+
+using namespace std;
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+bnsSP3::bnsSP3() {
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+bnsSP3::~bnsSP3() {
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn, 
+                   const ColumnVector& xx) {
+}
Index: trunk/BNS/bnssp3.h
===================================================================
--- trunk/BNS/bnssp3.h	(revision 848)
+++ trunk/BNS/bnssp3.h	(revision 848)
@@ -0,0 +1,17 @@
+#ifndef BNSSP3_H
+#define BNSSP3_H
+
+#include <fstream>
+#include <newmat.h>
+#include <QtCore>
+
+class bnsSP3 {
+ public:
+   bnsSP3();
+   ~bnsSP3();
+   void write(int GPSweek, double GPSweeks, const QString& prn, 
+              const ColumnVector& xx);
+ private:
+};
+
+#endif
