Changeset 535 in ntrip


Ignore:
Timestamp:
Oct 21, 2007, 6:36:22 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.cpp

    r534 r535  
    147147}
    148148
    149 //
     149// New GPS Ephemeris
    150150////////////////////////////////////////////////////////////////////////////
    151151void bncApp::slotNewGPSEph(gpsephemeris* gpseph) {
     
    171171}
    172172   
    173 //
     173// New Glonass Ephemeris
    174174////////////////////////////////////////////////////////////////////////////
    175175void bncApp::slotNewGlonassEph(glonassephemeris* glonasseph) {
     
    197197}
    198198
    199 //
     199// Print Header of the output File(s)
    200200////////////////////////////////////////////////////////////////////////////
    201201void bncApp::printEphHeader() {
     202
     203  QSettings settings;
    202204
    203205  // Initialization
    204206  // --------------
    205207  if (_rinexVers == 0) {
    206     QSettings settings;
    207208
    208209    if ( Qt::CheckState(settings.value("ephV3").toInt()) == Qt::Checked) {
     
    229230    QDate date = QDate::currentDate();
    230231
    231     QString ephFileNameGPS = _ephPath + "GPS_" +
     232    QString hlp = (_rinexVers == 3) ? "MIX_" : "GPS_";
     233    QString ephFileNameGPS = _ephPath + hlp +
    232234          QString("%1").arg(date.dayOfYear(), 3, 10, QChar('0')) +
    233235                            date.toString("0.yyN");
     
    243245    delete _ephFileGPS;
    244246
     247    QFlags<QIODevice::OpenModeFlag> appendFlagGPS;
     248    if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked &&
     249         QFile::exists(ephFileNameGPS) ) {
     250      appendFlagGPS = QIODevice::Append;
     251    }
     252
    245253    _ephFileGPS = new QFile(ephFileNameGPS);
    246     _ephFileGPS->open(QIODevice::WriteOnly);
     254    _ephFileGPS->open(QIODevice::WriteOnly | appendFlagGPS);
    247255    _ephStreamGPS = new QTextStream();
    248256    _ephStreamGPS->setDevice(_ephFileGPS);
     
    260268      delete _ephFileGlonass;
    261269
     270      QFlags<QIODevice::OpenModeFlag> appendFlagGlonass;
     271      if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked &&
     272           QFile::exists(ephFileNameGlonass) ) {
     273        appendFlagGlonass = QIODevice::Append;
     274      }
     275
    262276      _ephFileGlonass = new QFile(ephFileNameGlonass);
    263       _ephFileGlonass->open(QIODevice::WriteOnly);
     277      _ephFileGlonass->open(QIODevice::WriteOnly | appendFlagGlonass);
    264278      _ephStreamGlonass = new QTextStream();
    265279      _ephStreamGlonass->setDevice(_ephFileGlonass);
     
    269283    // ------------------------
    270284    if (_rinexVers == 3) {
     285
     286      if (appendFlagGPS & QIODevice::Append) {
     287        return;
     288      }
     289
    271290      QString line;
    272291
     
    292311}
    293312
    294 //
     313// Print One GPS Ephemeris
    295314////////////////////////////////////////////////////////////////////////////
    296315void bncApp::printGPSEph(gpsephemeris* ep) {
     
    358377}
    359378
    360 //
     379// Print One Glonass Ephemeris
    361380////////////////////////////////////////////////////////////////////////////
    362381void bncApp::printGlonassEph(glonassephemeris* ep) {
Note: See TracChangeset for help on using the changeset viewer.