Changeset 4517 in ntrip


Ignore:
Timestamp:
Aug 13, 2012, 12:19:18 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r4452 r4517  
    152152  // -------------
    153153  _logFile = new QFile(_logFileName);
    154   _logFile->open(QIODevice::WriteOnly | QIODevice::Text);
    155   _log = new QTextStream();
    156   _log->setDevice(_logFile);
     154  if (_logFile->open(QIODevice::WriteOnly | QIODevice::Text)) {
     155    _log = new QTextStream();
     156    _log->setDevice(_logFile);
     157  }
    157158
    158159  // Initialize RINEX Observation Files
     
    180181void t_reqcAnalyze::analyzeFile(t_rnxObsFile* obsFile) {
    181182
    182   *_log << "\nAnalyze File\n"
    183         <<   "------------\n"
    184         << obsFile->fileName().toAscii().data() << endl << endl;
     183  if (_log) {
     184    *_log << "\nAnalyze File\n"
     185          <<   "------------\n"
     186          << obsFile->fileName().toAscii().data() << endl << endl;
     187  }
    185188
    186189  _satStat.clear();
     
    230233  emit displayGraph(obsFile->fileName(), dataMP1, dataMP2);
    231234
    232   _log->flush();
     235  if (_log) {
     236    _log->flush();
     237  }
    233238}
    234239
     
    374379    (*dataMP2) << (new t_polarPoint(az, zen, MP2));
    375380
    376     _log->setRealNumberNotation(QTextStream::FixedNotation);
    377 
    378     _log->setRealNumberPrecision(2);
    379     *_log << "MP1 " << prn << " " << az << " " << zen << " ";
    380     _log->setRealNumberPrecision(3);
    381     *_log << MP1 << endl;
    382 
    383     _log->setRealNumberPrecision(2);
    384     *_log << "MP2 " << prn << " " << az << " " << zen << " ";
    385     _log->setRealNumberPrecision(3);
    386     *_log << MP2 << endl;
    387   }
    388 }
     381    if (_log) {
     382      _log->setRealNumberNotation(QTextStream::FixedNotation);
     383
     384      _log->setRealNumberPrecision(2);
     385      *_log << "MP1 " << prn << " " << az << " " << zen << " ";
     386      _log->setRealNumberPrecision(3);
     387      *_log << MP1 << endl;
     388
     389      _log->setRealNumberPrecision(2);
     390      *_log << "MP2 " << prn << " " << az << " " << zen << " ";
     391      _log->setRealNumberPrecision(3);
     392      *_log << MP2 << endl;
     393
     394      _log->flush();
     395    }
     396  }
     397}
Note: See TracChangeset for help on using the changeset viewer.