Index: /trunk/BNC/bncgetthread.cpp
===================================================================
--- /trunk/BNC/bncgetthread.cpp	(revision 1136)
+++ /trunk/BNC/bncgetthread.cpp	(revision 1137)
@@ -147,4 +147,16 @@
   _rnx_set_position = false;
 
+
+  // Raw Output
+  // ----------
+  if (false) {    // special option used for testing
+    QByteArray rawFileName = "./" + _staID + ".raw";
+    _rawFile = new QFile(rawFileName);
+    _rawFile->open(QIODevice::WriteOnly);
+  }
+  else {
+    _rawFile = 0;
+  }
+
   msleep(100); //sleep 0.1 sec
 }
@@ -163,4 +175,5 @@
   delete _decoder;
   delete _rnx;
+  delete _rawFile;
 }
 
@@ -463,4 +476,9 @@
         char* data = new char[nBytes];
         _socket->read(data, nBytes);
+
+        if (_rawFile) {
+          _rawFile->write(data, nBytes);
+          _rawFile->flush();
+        }
 
         if (_inspSegm<1) {
Index: /trunk/BNC/bncgetthread.h
===================================================================
--- /trunk/BNC/bncgetthread.h	(revision 1136)
+++ /trunk/BNC/bncgetthread.h	(revision 1137)
@@ -29,4 +29,5 @@
 #include <QtNetwork>
 #include <QDateTime>
+#include <QFile>
 
 #include "RTCM/GPSDecoder.h"
@@ -108,4 +109,5 @@
    QDateTime   _decodeSucc;
    QMutex      _mutex;
+   QFile*      _rawFile;
 };
 
