Index: trunk/BNC/upload/bncuploadcaster.cpp
===================================================================
--- trunk/BNC/upload/bncuploadcaster.cpp	(revision 3184)
+++ trunk/BNC/upload/bncuploadcaster.cpp	(revision 3185)
@@ -50,49 +50,29 @@
   _sOpenTrial = 0;
 
-  if (outFileName.isEmpty()) {
-    _outFile   = 0;
-    _outStream = 0;
+  // Raw Output
+  // ----------
+  if (!outFileName.isEmpty()) {
+    _outFile = new bncoutf(outFileName, "", 0);
   }
   else {
-    _outFile = new QFile(outFileName);
-    QIODevice::OpenMode oMode;
-    if (_append) {
-      oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append;
-    }
-    else {
-      oMode = QIODevice::WriteOnly | QIODevice::Unbuffered;
-    }
-
-    if (_outFile->open(oMode)) {
-      _outStream = new QTextStream(_outFile);
-    }
+    _outFile = 0;
   }
 
   // RINEX writer
   // ------------
-  if ( settings.value("rnxPath").toString().isEmpty() ) { 
+  if (!rnxFileName.isEmpty()) {
+    _rnx = new bncClockRinex(rnxFileName, "", 0);
+  }
+  else {
     _rnx = 0;
-  }
-  else {
-    QString prep  = "BNC";
-    QString ext   = ".clk";
-    QString path  = settings.value("rnxPath").toString();
-    QString intr  = settings.value("rnxIntr").toString();
-    int     sampl = settings.value("rnxSampl").toInt();
-    _rnx = new bncClockRinex(prep, ext, path, intr, sampl);
   }
 
   // SP3 writer
   // ----------
-  if ( settings.value("sp3Path").toString().isEmpty() ) { 
+  if (!sp3FileName.isEmpty()) {
+    _sp3 = new bncSP3(sp3FileName, "", 0);
+  }
+  else {
     _sp3 = 0;
-  }
-  else {
-    QString prep  = "BNC";
-    QString ext   = ".sp3";
-    QString path  = settings.value("sp3Path").toString();
-    QString intr  = settings.value("sp3Intr").toString();
-    int     sampl = settings.value("sp3Sampl").toInt();
-    _sp3 = new bncSP3(prep, ext, path, intr, sampl);
   }
 
@@ -206,7 +186,7 @@
 ////////////////////////////////////////////////////////////////////////////
 bncUploadCaster::~bncUploadCaster() {
-  delete _outSocket;
-  delete _outStream;
   delete _outFile;
+  delete _rnx;
+  delete _sp3;
 }
 
@@ -277,13 +257,4 @@
     _outSocket->write(buffer, len);
     _outSocket->flush();
-  }
-}
-
-// Print Ascii Output
-////////////////////////////////////////////////////////////////////////////
-void bncUploadCaster::printAscii(const QString& line) {
-  if (_outStream) {
-    *_outStream << line;
-     _outStream->flush();
   }
 }
@@ -365,5 +336,7 @@
         QString outLine;
         processSatellite(ep, GPSweek, GPSweeks, prn, xx, sd, outLine);
-        this->printAscii(outLine);
+        if (_outFile) {
+          _outFile->write(GPSweek, GPSweeks, outLine);
+        }
       }
   
@@ -510,5 +483,5 @@
   }
   if (_sp3) {
-    _sp3->write(GPSweek, GPSweeks, prn, xx, _append);
+    _sp3->write(GPSweek, GPSweeks, prn, xx);
   }
 }
Index: trunk/BNC/upload/bncuploadcaster.h
===================================================================
--- trunk/BNC/upload/bncuploadcaster.h	(revision 3184)
+++ trunk/BNC/upload/bncuploadcaster.h	(revision 3185)
@@ -5,4 +5,5 @@
 #include "bncephuser.h"
 
+class bncoutf;
 class bncClockRinex;
 class bncSP3;
@@ -48,7 +49,4 @@
   int            _sOpenTrial;
   QDateTime      _outSocketOpenTime;
-  QFile*         _outFile;
-  QTextStream*   _outStream;
-  bool           _append;
   double         _dx;
   double         _dy;
@@ -66,4 +64,5 @@
   double         _scr;
   double         _t0;
+  bncoutf*       _outFile;
   bncClockRinex* _rnx;
   bncSP3*        _sp3;
