Changeset 3185 in ntrip


Ignore:
Timestamp:
Mar 29, 2011, 8:27:46 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/upload
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/upload/bncuploadcaster.cpp

    r3184 r3185  
    5050  _sOpenTrial = 0;
    5151
    52   if (outFileName.isEmpty()) {
    53     _outFile   = 0;
    54     _outStream = 0;
     52  // Raw Output
     53  // ----------
     54  if (!outFileName.isEmpty()) {
     55    _outFile = new bncoutf(outFileName, "", 0);
    5556  }
    5657  else {
    57     _outFile = new QFile(outFileName);
    58     QIODevice::OpenMode oMode;
    59     if (_append) {
    60       oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append;
    61     }
    62     else {
    63       oMode = QIODevice::WriteOnly | QIODevice::Unbuffered;
    64     }
    65 
    66     if (_outFile->open(oMode)) {
    67       _outStream = new QTextStream(_outFile);
    68     }
     58    _outFile = 0;
    6959  }
    7060
    7161  // RINEX writer
    7262  // ------------
    73   if ( settings.value("rnxPath").toString().isEmpty() ) {
     63  if (!rnxFileName.isEmpty()) {
     64    _rnx = new bncClockRinex(rnxFileName, "", 0);
     65  }
     66  else {
    7467    _rnx = 0;
    75   }
    76   else {
    77     QString prep  = "BNC";
    78     QString ext   = ".clk";
    79     QString path  = settings.value("rnxPath").toString();
    80     QString intr  = settings.value("rnxIntr").toString();
    81     int     sampl = settings.value("rnxSampl").toInt();
    82     _rnx = new bncClockRinex(prep, ext, path, intr, sampl);
    8368  }
    8469
    8570  // SP3 writer
    8671  // ----------
    87   if ( settings.value("sp3Path").toString().isEmpty() ) {
     72  if (!sp3FileName.isEmpty()) {
     73    _sp3 = new bncSP3(sp3FileName, "", 0);
     74  }
     75  else {
    8876    _sp3 = 0;
    89   }
    90   else {
    91     QString prep  = "BNC";
    92     QString ext   = ".sp3";
    93     QString path  = settings.value("sp3Path").toString();
    94     QString intr  = settings.value("sp3Intr").toString();
    95     int     sampl = settings.value("sp3Sampl").toInt();
    96     _sp3 = new bncSP3(prep, ext, path, intr, sampl);
    9777  }
    9878
     
    206186////////////////////////////////////////////////////////////////////////////
    207187bncUploadCaster::~bncUploadCaster() {
    208   delete _outSocket;
    209   delete _outStream;
    210188  delete _outFile;
     189  delete _rnx;
     190  delete _sp3;
    211191}
    212192
     
    277257    _outSocket->write(buffer, len);
    278258    _outSocket->flush();
    279   }
    280 }
    281 
    282 // Print Ascii Output
    283 ////////////////////////////////////////////////////////////////////////////
    284 void bncUploadCaster::printAscii(const QString& line) {
    285   if (_outStream) {
    286     *_outStream << line;
    287      _outStream->flush();
    288259  }
    289260}
     
    365336        QString outLine;
    366337        processSatellite(ep, GPSweek, GPSweeks, prn, xx, sd, outLine);
    367         this->printAscii(outLine);
     338        if (_outFile) {
     339          _outFile->write(GPSweek, GPSweeks, outLine);
     340        }
    368341      }
    369342 
     
    510483  }
    511484  if (_sp3) {
    512     _sp3->write(GPSweek, GPSweeks, prn, xx, _append);
     485    _sp3->write(GPSweek, GPSweeks, prn, xx);
    513486  }
    514487}
  • trunk/BNC/upload/bncuploadcaster.h

    r3182 r3185  
    55#include "bncephuser.h"
    66
     7class bncoutf;
    78class bncClockRinex;
    89class bncSP3;
     
    4849  int            _sOpenTrial;
    4950  QDateTime      _outSocketOpenTime;
    50   QFile*         _outFile;
    51   QTextStream*   _outStream;
    52   bool           _append;
    5351  double         _dx;
    5452  double         _dy;
     
    6664  double         _scr;
    6765  double         _t0;
     66  bncoutf*       _outFile;
    6867  bncClockRinex* _rnx;
    6968  bncSP3*        _sp3;
Note: See TracChangeset for help on using the changeset viewer.