- Timestamp:
- Feb 25, 2011, 1:35:15 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3coDecoder.cpp
r3024 r3035 85 85 // Reopen Output File 86 86 //////////////////////////////////////////////////////////////////////// 87 void RTCM3coDecoder::reopen() { 88 89 if (!_fileNameSkl.isEmpty()) { 87 void RTCM3coDecoder::reopen(const QString& fileNameSkl, QString& fileName, 88 ofstream*& out) { 89 90 if (!fileNameSkl.isEmpty()) { 90 91 91 92 bncSettings settings; … … 96 97 settings.value("corrIntr").toString()); 97 98 98 QString fileName = _fileNameSkl99 QString fileNameHlp = fileNameSkl 99 100 + QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) 100 101 + hlpStr + datTim.toString(".yyC"); 101 102 102 if ( _fileName == fileName) {103 if (fileName == fileNameHlp) { 103 104 return; 104 105 } 105 106 else { 106 _fileName = fileName;107 } 108 109 delete _out;107 fileName = fileNameHlp; 108 } 109 110 delete out; 110 111 if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) { 111 _out = new ofstream( _fileName.toAscii().data(),112 out = new ofstream( fileName.toAscii().data(), 112 113 ios_base::out | ios_base::app ); 113 114 } 114 115 else { 115 _out = new ofstream( _fileName.toAscii().data() );116 out = new ofstream( fileName.toAscii().data() ); 116 117 } 117 118 } … … 154 155 (_co.NumberOfGPSSat > 0 || _co.NumberOfGLONASSSat > 0) ) { 155 156 156 reopen( );157 reopen(_fileNameSkl, _fileName, _out); 157 158 158 159 // Guess GPS week and sec using system time -
trunk/BNC/RTCM3/RTCM3coDecoder.h
r3024 r3035 47 47 static QStringList corrsToASCIIlines(int GPSweek, double GPSweeks, 48 48 const ClockOrbit& co, const Bias* bias); 49 49 static void reopen(const QString& fileNameSkl, QString& fileName, 50 std::ofstream*& out); 50 51 signals: 51 52 void newCorrLine(QString line, QString staID, long coTime); 52 53 53 54 private: 54 void reopen();55 55 void printLine(const QString& line, long coTime); 56 56 -
trunk/BNC/bncsettings.cpp
r2999 r3035 107 107 setValue("cmbMountpoint", ""); 108 108 setValue("cmbPassword", ""); 109 setValue("cmbOut File", "");110 setValue("cmbSP3 File", "");109 setValue("cmbOutPath", ""); 110 setValue("cmbSP3Path", ""); 111 111 sync(); 112 112 } -
trunk/BNC/bncwindow.cpp
r2984 r3035 888 888 cmbLayout->addWidget(_cmbPasswordLineEdit, 1, 8); 889 889 890 cmbLayout->addWidget(new QLabel("Output File"), 2, 5);891 _cmbOut FileLineEdit = new QLineEdit(settings.value("cmbOutFile").toString());892 cmbLayout->addWidget(_cmbOut FileLineEdit, 2, 6);893 894 cmbLayout->addWidget(new QLabel("Output SP3 "), 3, 5);895 _cmbSP3 FileLineEdit = new QLineEdit(settings.value("cmbSP3File").toString());896 cmbLayout->addWidget(_cmbSP3 FileLineEdit, 3, 6);890 cmbLayout->addWidget(new QLabel("Output Path"), 2, 5); 891 _cmbOutPathLineEdit = new QLineEdit(settings.value("cmbOutPath").toString()); 892 cmbLayout->addWidget(_cmbOutPathLineEdit, 2, 6); 893 894 cmbLayout->addWidget(new QLabel("Output SP3 Path"), 3, 5); 895 _cmbSP3PathLineEdit = new QLineEdit(settings.value("cmbSP3Path").toString()); 896 cmbLayout->addWidget(_cmbSP3PathLineEdit, 3, 6); 897 897 898 898 cmbgroup->setLayout(cmbLayout); … … 1281 1281 settings.setValue("cmbMountpoint", _cmbMountpointLineEdit->text()); 1282 1282 settings.setValue("cmbPassword", _cmbPasswordLineEdit->text()); 1283 settings.setValue("cmbOut File", _cmbOutFileLineEdit->text());1284 settings.setValue("cmbSP3 File", _cmbSP3FileLineEdit->text());1283 settings.setValue("cmbOutPath", _cmbOutPathLineEdit->text()); 1284 settings.setValue("cmbSP3Path", _cmbSP3PathLineEdit->text()); 1285 1285 1286 1286 if (_caster) { -
trunk/BNC/bncwindow.h
r2967 r3035 195 195 QLineEdit* _cmbMountpointLineEdit; 196 196 QLineEdit* _cmbPasswordLineEdit; 197 QLineEdit* _cmbOut FileLineEdit;198 QLineEdit* _cmbSP3 FileLineEdit;197 QLineEdit* _cmbOutPathLineEdit; 198 QLineEdit* _cmbSP3PathLineEdit; 199 199 200 200 bncCaster* _caster; -
trunk/BNC/combination/bnccomb.cpp
r3034 r3035 158 158 _QQ(iPar,iPar) = pp->sig_0 * pp->sig_0; 159 159 } 160 161 // Output File (skeleton name) 162 // --------------------------- 163 QString path = settings.value("cmbOutPath").toString(); 164 if (!path.isEmpty() && !_caster->mountpoint().isEmpty()) { 165 expandEnvVar(path); 166 if ( path.length() > 0 && path[path.length()-1] != QDir::separator() ) { 167 path += QDir::separator(); 168 } 169 _outNameSkl = path + _caster->mountpoint(); 170 } 171 _out = 0; 160 172 } 161 173 … … 169 181 } 170 182 delete _caster; 183 delete _out; 171 184 } 172 185 … … 341 354 } 342 355 343 // Optionall send new Corrections to PPP client 344 // -------------------------------------------- 356 // Optionall send new Corrections to PPP client and/or write into file 357 // ------------------------------------------------------------------- 358 RTCM3coDecoder::reopen(_outNameSkl, _outName, _out); 345 359 bncApp* app = (bncApp*) qApp; 346 if (app->_bncPPPclient ) {360 if (app->_bncPPPclient || _out) { 347 361 QStringList corrLines; 348 362 co.messageType = COTYPE_GPSCOMBINED; … … 350 364 resTime.gpssec(), co, 0)); 351 365 while (il.hasNext()) { 352 QString line = il.next() + " " + _caster->mountpoint(); 366 QString line = il.next(); 367 if (_out) { 368 *_out << line.toAscii().data() << endl; 369 _out->flush(); 370 } 371 line += " " + _caster->mountpoint(); 353 372 corrLines << line; 354 373 } 355 356 app->_bncPPPclient->slotNewCorrections(corrLines); 374 375 if (app->_bncPPPclient) { 376 app->_bncPPPclient->slotNewCorrections(corrLines); 377 } 357 378 } 358 379 } -
trunk/BNC/combination/bnccomb.h
r3032 r3035 3 3 #define BNCCOMB_H 4 4 5 #include <fstream> 5 6 #include <newmat.h> 6 7 #include "bncephuser.h" … … 82 83 QByteArray _log; 83 84 QString _masterAC; 85 QString _outNameSkl; 86 QString _outName; 87 std::ofstream* _out; 84 88 }; 85 89
Note:
See TracChangeset
for help on using the changeset viewer.