Changeset 3185 in ntrip
- Timestamp:
- Mar 29, 2011, 8:27:46 PM (14 years ago)
- Location:
- trunk/BNC/upload
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/upload/bncuploadcaster.cpp
r3184 r3185 50 50 _sOpenTrial = 0; 51 51 52 if (outFileName.isEmpty()) { 53 _outFile = 0; 54 _outStream = 0; 52 // Raw Output 53 // ---------- 54 if (!outFileName.isEmpty()) { 55 _outFile = new bncoutf(outFileName, "", 0); 55 56 } 56 57 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; 69 59 } 70 60 71 61 // RINEX writer 72 62 // ------------ 73 if ( settings.value("rnxPath").toString().isEmpty() ) { 63 if (!rnxFileName.isEmpty()) { 64 _rnx = new bncClockRinex(rnxFileName, "", 0); 65 } 66 else { 74 67 _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);83 68 } 84 69 85 70 // SP3 writer 86 71 // ---------- 87 if ( settings.value("sp3Path").toString().isEmpty() ) { 72 if (!sp3FileName.isEmpty()) { 73 _sp3 = new bncSP3(sp3FileName, "", 0); 74 } 75 else { 88 76 _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);97 77 } 98 78 … … 206 186 //////////////////////////////////////////////////////////////////////////// 207 187 bncUploadCaster::~bncUploadCaster() { 208 delete _outSocket;209 delete _outStream;210 188 delete _outFile; 189 delete _rnx; 190 delete _sp3; 211 191 } 212 192 … … 277 257 _outSocket->write(buffer, len); 278 258 _outSocket->flush(); 279 }280 }281 282 // Print Ascii Output283 ////////////////////////////////////////////////////////////////////////////284 void bncUploadCaster::printAscii(const QString& line) {285 if (_outStream) {286 *_outStream << line;287 _outStream->flush();288 259 } 289 260 } … … 365 336 QString outLine; 366 337 processSatellite(ep, GPSweek, GPSweeks, prn, xx, sd, outLine); 367 this->printAscii(outLine); 338 if (_outFile) { 339 _outFile->write(GPSweek, GPSweeks, outLine); 340 } 368 341 } 369 342 … … 510 483 } 511 484 if (_sp3) { 512 _sp3->write(GPSweek, GPSweeks, prn, xx , _append);485 _sp3->write(GPSweek, GPSweeks, prn, xx); 513 486 } 514 487 } -
trunk/BNC/upload/bncuploadcaster.h
r3182 r3185 5 5 #include "bncephuser.h" 6 6 7 class bncoutf; 7 8 class bncClockRinex; 8 9 class bncSP3; … … 48 49 int _sOpenTrial; 49 50 QDateTime _outSocketOpenTime; 50 QFile* _outFile;51 QTextStream* _outStream;52 bool _append;53 51 double _dx; 54 52 double _dy; … … 66 64 double _scr; 67 65 double _t0; 66 bncoutf* _outFile; 68 67 bncClockRinex* _rnx; 69 68 bncSP3* _sp3;
Note:
See TracChangeset
for help on using the changeset viewer.