Changeset 10630 in ntrip for trunk/BNC/src/rinex/reqcedit.cpp


Ignore:
Timestamp:
Mar 17, 2025, 5:01:45 PM (2 days ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/reqcedit.cpp

    r10619 r10630  
    5757  _logFileName    = settings.value("reqcOutLogFile").toString(); expandEnvVar(_logFileName);
    5858  _logFile        = 0;
    59   _log            = 0;
     59  _logStream      = 0;
    6060  _obsFileNames   = settings.value("reqcObsFile").toString().split(",", Qt::SkipEmptyParts);
    6161  _outObsFileName = settings.value("reqcOutObsFile").toString();
     
    8989    delete _ephs[ii];
    9090  }
    91   delete _log;     _log     = 0;
     91  delete _logStream; _logStream     = 0;
    9292  delete _logFile; _logFile = 0;
    9393}
     
    102102    _logFile = new QFile(_logFileName);
    103103    if (_logFile->open(QIODevice::WriteOnly | QIODevice::Text)) {
    104       _log = new QTextStream();
    105       _log->setDevice(_logFile);
     104      _logStream = new QTextStream();
     105      _logStream->setDevice(_logFile);
    106106    }
    107107  }
     
    109109  // Log File Header
    110110  // ---------------
    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) << ": "
    117117          << BNC_CORE->pgmName() << Qt::endl;
    118     *_log << QByteArray("Run by").leftJustified(15) << ": "
     118    *_logStream << QByteArray("Run by").leftJustified(15) << ": "
    119119          << BNC_CORE->userName() << Qt::endl;
    120     *_log << QByteArray("Date").leftJustified(15) << ": "
     120    *_logStream << QByteArray("Date").leftJustified(15) << ": "
    121121          << 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) << ": "
    123123          << _rnxVersion << Qt::endl;
    124     *_log << QByteArray("Sampling").leftJustified(15) << ": "
     124    *_logStream << QByteArray("Sampling").leftJustified(15) << ": "
    125125          << _samplingRate << " sec" << Qt::endl;
    126     *_log << QByteArray("Start time").leftJustified(15) << ": "
     126    *_logStream << QByteArray("Start time").leftJustified(15) << ": "
    127127          << _begTime.datestr().c_str() << ' '
    128128          << _begTime.timestr(0).c_str() << Qt::endl;
    129     *_log << QByteArray("End time").leftJustified(15) << ": "
     129    *_logStream << QByteArray("End time").leftJustified(15) << ": "
    130130          << _endTime.datestr().c_str() << ' '
    131131          << _endTime.timestr(0).c_str() << Qt::endl;
    132     *_log << QByteArray("Input Obs Files").leftJustified(15) << ": "
     132    *_logStream << QByteArray("Input Obs Files").leftJustified(15) << ": "
    133133          << _obsFileNames.join(",") << Qt::endl;
    134     *_log << QByteArray("Input Nav Files").leftJustified(15) << ": "
     134    *_logStream << QByteArray("Input Nav Files").leftJustified(15) << ": "
    135135          << _navFileNames.join(",") << Qt::endl;
    136     *_log << QByteArray("Output Obs File").leftJustified(15) << ": "
     136    *_logStream << QByteArray("Output Obs File").leftJustified(15) << ": "
    137137          << _outObsFileName << Qt::endl;
    138     *_log << QByteArray("Output Nav File").leftJustified(15) << ": "
     138    *_logStream << QByteArray("Output Nav File").leftJustified(15) << ": "
    139139          << _outNavFileName << Qt::endl;
    140140
    141     *_log << QByteArray(78, '-') << Qt::endl;
    142     _log->flush();
     141    *_logStream << QByteArray(78, '-') << Qt::endl;
     142    _logStream->flush();
    143143  }
    144144
     
    221221  }
    222222
    223   t_reqcEdit::initRnxObsFiles(_obsFileNames, _rnxObsFiles, _log);
     223  t_reqcEdit::initRnxObsFiles(_obsFileNames, _rnxObsFiles, _logStream);
    224224
    225225  // Initialize output observation file
     
    318318  for (int ii = 0; ii < _rnxObsFiles.size(); ii++) {
    319319    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: "
    322322            << obsFile->startTime().datestr().c_str() << ' '
    323323            << obsFile->startTime().timestr(0).c_str() << Qt::endl;
     
    369369    }
    370370    catch (QString str) {
    371       if (_log) {
    372         *_log << "Exception " << str << Qt::endl;
     371      if (_logStream) {
     372        *_logStream << "Exception " << str << Qt::endl;
    373373      }
    374374      else {
     
    378378    }
    379379    catch (...) {
    380       if (_log) {
    381         *_log << "Exception unknown" << Qt::endl;
     380      if (_logStream) {
     381        *_logStream << "Exception unknown" << Qt::endl;
    382382      }
    383383      else {
     
    586586  // Read Ephemerides
    587587  // ----------------
    588   t_reqcEdit::readEphemerides(_navFileNames, _ephs, _log, _checkEph);
     588  t_reqcEdit::readEphemerides(_navFileNames, _ephs, _logStream, _checkEph);
    589589
    590590  // Check Satellite Systems
     
    796796          if (log) {
    797797            *log << "                   : "
    798                  << QString("WRONG %2:%3\n")
     798                 << QString("WRONG     %2:%3\n")
    799799                         .arg(eph->typeStr(eph->type(), eph->prn(), 99.0))
    800800                         .arg(eph->rinexDateStr(eph->TOC(), eph->prn(), 99.0)).toLatin1();
    801801          }
    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        }*/
    803811      }
    804812    }
Note: See TracChangeset for help on using the changeset viewer.