Changeset 10630 in ntrip for trunk/BNC/src/rinex/reqcedit.cpp
- Timestamp:
- Mar 17, 2025, 5:01:45 PM (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcedit.cpp
r10619 r10630 57 57 _logFileName = settings.value("reqcOutLogFile").toString(); expandEnvVar(_logFileName); 58 58 _logFile = 0; 59 _log 59 _logStream = 0; 60 60 _obsFileNames = settings.value("reqcObsFile").toString().split(",", Qt::SkipEmptyParts); 61 61 _outObsFileName = settings.value("reqcOutObsFile").toString(); … … 89 89 delete _ephs[ii]; 90 90 } 91 delete _log ; _log= 0;91 delete _logStream; _logStream = 0; 92 92 delete _logFile; _logFile = 0; 93 93 } … … 102 102 _logFile = new QFile(_logFileName); 103 103 if (_logFile->open(QIODevice::WriteOnly | QIODevice::Text)) { 104 _log = new QTextStream(); 105 _log->setDevice(_logFile); 104 _logStream = new QTextStream(); 105 _logStream->setDevice(_logFile); 106 106 } 107 107 } … … 109 109 // Log File Header 110 110 // --------------- 111 if (_log) { 112 *_log << QByteArray(78, '-') << Qt::endl; 113 *_log << "RINEX File Editing\n"; 114 *_log << QByteArray(78, '-') << Qt::endl; 115 116 *_log << QByteArray("Program").leftJustified(15) << ": " 111 if (_logStream) { 112 *_logStream << QByteArray(78, '-') << Qt::endl; 113 *_logStream << "RINEX File Editing\n"; 114 *_logStream << QByteArray(78, '-') << Qt::endl; 115 116 *_logStream << QByteArray("Program").leftJustified(15) << ": " 117 117 << BNC_CORE->pgmName() << Qt::endl; 118 *_log << QByteArray("Run by").leftJustified(15) << ": " 118 *_logStream << QByteArray("Run by").leftJustified(15) << ": " 119 119 << BNC_CORE->userName() << Qt::endl; 120 *_log << QByteArray("Date").leftJustified(15) << ": " 120 *_logStream << QByteArray("Date").leftJustified(15) << ": " 121 121 << QDateTime::currentDateTime().toUTC().toString("yyyy-MM-dd hh:mm:ss") << Qt::endl; 122 *_log << QByteArray("RINEX Version").leftJustified(15) << ": " 122 *_logStream << QByteArray("RINEX Version").leftJustified(15) << ": " 123 123 << _rnxVersion << Qt::endl; 124 *_log << QByteArray("Sampling").leftJustified(15) << ": " 124 *_logStream << QByteArray("Sampling").leftJustified(15) << ": " 125 125 << _samplingRate << " sec" << Qt::endl; 126 *_log << QByteArray("Start time").leftJustified(15) << ": " 126 *_logStream << QByteArray("Start time").leftJustified(15) << ": " 127 127 << _begTime.datestr().c_str() << ' ' 128 128 << _begTime.timestr(0).c_str() << Qt::endl; 129 *_log << QByteArray("End time").leftJustified(15) << ": " 129 *_logStream << QByteArray("End time").leftJustified(15) << ": " 130 130 << _endTime.datestr().c_str() << ' ' 131 131 << _endTime.timestr(0).c_str() << Qt::endl; 132 *_log << QByteArray("Input Obs Files").leftJustified(15) << ": " 132 *_logStream << QByteArray("Input Obs Files").leftJustified(15) << ": " 133 133 << _obsFileNames.join(",") << Qt::endl; 134 *_log << QByteArray("Input Nav Files").leftJustified(15) << ": " 134 *_logStream << QByteArray("Input Nav Files").leftJustified(15) << ": " 135 135 << _navFileNames.join(",") << Qt::endl; 136 *_log << QByteArray("Output Obs File").leftJustified(15) << ": " 136 *_logStream << QByteArray("Output Obs File").leftJustified(15) << ": " 137 137 << _outObsFileName << Qt::endl; 138 *_log << QByteArray("Output Nav File").leftJustified(15) << ": " 138 *_logStream << QByteArray("Output Nav File").leftJustified(15) << ": " 139 139 << _outNavFileName << Qt::endl; 140 140 141 *_log << QByteArray(78, '-') << Qt::endl; 142 _log->flush(); 141 *_logStream << QByteArray(78, '-') << Qt::endl; 142 _logStream->flush(); 143 143 } 144 144 … … 221 221 } 222 222 223 t_reqcEdit::initRnxObsFiles(_obsFileNames, _rnxObsFiles, _log); 223 t_reqcEdit::initRnxObsFiles(_obsFileNames, _rnxObsFiles, _logStream); 224 224 225 225 // Initialize output observation file … … 318 318 for (int ii = 0; ii < _rnxObsFiles.size(); ii++) { 319 319 t_rnxObsFile* obsFile = _rnxObsFiles[ii]; 320 if (_log) { 321 *_log << "Input Obs File: " << obsFile->fileName() << " start: " 320 if (_logStream) { 321 *_logStream << "Input Obs File: " << obsFile->fileName() << " start: " 322 322 << obsFile->startTime().datestr().c_str() << ' ' 323 323 << obsFile->startTime().timestr(0).c_str() << Qt::endl; … … 369 369 } 370 370 catch (QString str) { 371 if (_log) { 372 *_log << "Exception " << str << Qt::endl; 371 if (_logStream) { 372 *_logStream << "Exception " << str << Qt::endl; 373 373 } 374 374 else { … … 378 378 } 379 379 catch (...) { 380 if (_log) { 381 *_log << "Exception unknown" << Qt::endl; 380 if (_logStream) { 381 *_logStream << "Exception unknown" << Qt::endl; 382 382 } 383 383 else { … … 586 586 // Read Ephemerides 587 587 // ---------------- 588 t_reqcEdit::readEphemerides(_navFileNames, _ephs, _log, _checkEph); 588 t_reqcEdit::readEphemerides(_navFileNames, _ephs, _logStream, _checkEph); 589 589 590 590 // Check Satellite Systems … … 796 796 if (log) { 797 797 *log << " : " 798 << QString("WRONG %2:%3\n") 798 << QString("WRONG %2:%3\n") 799 799 .arg(eph->typeStr(eph->type(), eph->prn(), 99.0)) 800 800 .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1(); 801 801 } 802 } 802 }/* switched off because of to many SBAS satellites are set to unhealthy 803 if (eph->checkState() == t_eph::unhealthy) { 804 if (log) { 805 *log << " : " 806 << QString("UNHEALTHY %2:%3\n") 807 .arg(eph->typeStr(eph->type(), eph->prn(), 99.0)) 808 .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1(); 809 } 810 }*/ 803 811 } 804 812 }
Note:
See TracChangeset
for help on using the changeset viewer.