Index: /trunk/BNS/bns.cpp
===================================================================
--- /trunk/BNS/bns.cpp	(revision 846)
+++ /trunk/BNS/bns.cpp	(revision 847)
@@ -20,4 +20,5 @@
 #include "bns.h" 
 #include "bnsutils.h" 
+#include "bnsrinex.h" 
 
 using namespace std;
@@ -77,4 +78,13 @@
       _logStream = new QTextStream(_logFile);
     }
+  }
+
+  // RINEX writer
+  // ------------
+  if ( settings.value("rnxPath").toString().isEmpty() ) { 
+    _rnx = 0;
+  }
+  else {
+    _rnx = new bnsRinex();
   }
 }
@@ -319,4 +329,7 @@
     _outSocket->flush();
   }
+  if (_rnx) {
+    _rnx->write(GPSweek, GPSweeks, prn, xx);
+  }
 }
 
Index: /trunk/BNS/bns.h
===================================================================
--- /trunk/BNS/bns.h	(revision 846)
+++ /trunk/BNS/bns.h	(revision 847)
@@ -8,4 +8,6 @@
 
 #include "bnseph.h"
+
+class bnsRinex;
 
 class t_ephPair {
@@ -61,4 +63,6 @@
   QMutex                    _mutex;
   QMap<QString, t_ephPair*> _ephList;
+
+  bnsRinex*                 _rnx;
 };
 #endif
Index: /trunk/BNS/bns.pro
===================================================================
--- /trunk/BNS/bns.pro	(revision 846)
+++ /trunk/BNS/bns.pro	(revision 847)
@@ -23,5 +23,5 @@
 
 HEADERS =             bns.h   bnswindow.h   bnshlpdlg.h   bnshtml.h   \
-          bnseph.h    bnsutils.h
+          bnseph.h    bnsutils.h bnsrinex.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
+          bnseph.cpp  bnsutils.cpp bnsrinex.cpp
 
 SOURCES += newmat/bandmat.cpp newmat/cholesky.cpp newmat/evalue.cpp  \
Index: /trunk/BNS/bnsrinex.cpp
===================================================================
--- /trunk/BNS/bnsrinex.cpp	(revision 847)
+++ /trunk/BNS/bnsrinex.cpp	(revision 847)
@@ -0,0 +1,38 @@
+
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Server
+ * -------------------------------------------------------------------------
+ *
+ * Class:      bnsRinex
+ *
+ * Purpose:    writes RINEX Clock files
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    25-Apr-2008
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <iomanip>
+
+#include "bnsrinex.h"
+
+using namespace std;
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+bnsRinex::bnsRinex() {
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+bnsRinex::~bnsRinex() {
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bnsRinex::write(int GPSweek, double GPSweeks, const QString& prn, 
+                     const ColumnVector& xx) {
+}
Index: /trunk/BNS/bnsrinex.h
===================================================================
--- /trunk/BNS/bnsrinex.h	(revision 847)
+++ /trunk/BNS/bnsrinex.h	(revision 847)
@@ -0,0 +1,17 @@
+#ifndef BNSRINEX_H
+#define BNSRINEX_H
+
+#include <fstream>
+#include <newmat.h>
+#include <QtCore>
+
+class bnsRinex {
+ public:
+   bnsRinex();
+   ~bnsRinex();
+   void write(int GPSweek, double GPSweeks, const QString& prn, 
+              const ColumnVector& xx);
+ private:
+};
+
+#endif
