Changeset 7999 in ntrip


Ignore:
Timestamp:
Aug 8, 2016, 4:59:03 PM (8 years ago)
Author:
stuerze
Message:

some informations about the data source of RINEX navigation files is added into the RINEX header

Location:
trunk/BNC/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnccore.cpp

    r7856 r7999  
    259259
    260260  bncSettings settings;
     261  QStringList comments;
     262
     263  QListIterator<QString> it(settings.value("mountPoints").toStringList());
     264  while (it.hasNext()) {
     265    QStringList hlp = it.next().split(" ");
     266    if (hlp.size() < 7)
     267      continue;
     268    QUrl url(hlp[0]);
     269    QString decoder = hlp[1];
     270    comments.append("Source: " + decoder +
     271                    " " + url.encodedHost() +
     272                    "/" + url.path().mid(1).toAscii());
     273  }
    261274
    262275  // Initialization
     
    384397                       << "PGM / RUN BY / DATE" << endl;
    385398
     399        QStringListIterator it(comments);
     400        while (it.hasNext()) {
     401          *_ephStreamGPS << it.next().trimmed().left(60).leftJustified(60) << "COMMENT\n";
     402        }
     403
    386404        line.sprintf("%60sEND OF HEADER\n", "");
    387405        *_ephStreamGPS << line;
     
    406424                       << "PGM / RUN BY / DATE" << endl;
    407425
     426        QStringListIterator it(comments);
     427        while (it.hasNext()) {
     428          *_ephStreamGPS << it.next().trimmed().left(60).leftJustified(60) << "COMMENT\n";
     429        }
     430
    408431        line.sprintf("%60sEND OF HEADER\n", "");
    409432        *_ephStreamGPS << line;
     
    422445                           << hlp.toAscii().data()
    423446                           << "PGM / RUN BY / DATE" << endl;
     447
     448        QStringListIterator it(comments);
     449        while (it.hasNext()) {
     450          *_ephStreamGlonass << it.next().trimmed().left(60).leftJustified(60) << "COMMENT\n";
     451        }
    424452
    425453        line.sprintf("%60sEND OF HEADER\n", "");
  • trunk/BNC/src/rinex/reqcedit.cpp

    r7992 r7999  
    534534    return;
    535535  }
     536  // Concatenate all comments
     537  // ------------------------
     538  QStringList comments;
     539  bncSettings settings;
     540  QString comment = settings.value("reqcComment").toString();
     541  if (!comment.isEmpty()) {
     542    comments.append(comment);
     543  }
     544  QStringListIterator it(_navFileNames);
     545  while (it.hasNext()) {
     546    QString fileName = it.next();
     547    t_rnxNavFile rnxNavFile(fileName, t_rnxNavFile::input);
     548    QStringListIterator itCmnt(rnxNavFile.comments());
     549    while (itCmnt.hasNext()) {
     550      comments.append(itCmnt.next());
     551    }
     552  }
     553  comments.removeDuplicates();
    536554
    537555  // Read Ephemerides
     
    566584  }
    567585
    568   bncSettings settings;
    569586  QMap<QString, QString> txtMap;
    570587  QString runBy = settings.value("reqcRunBy").toString();
     
    572589    txtMap["RUN BY"]  = runBy;
    573590  }
    574   QString comment = settings.value("reqcComment").toString();
    575   if (!comment.isEmpty()) {
    576     txtMap["COMMENT"]  = comment;
     591  if (!comments.isEmpty()) {
     592    txtMap["COMMENT"]  = comments.join("\\n");
    577593  }
    578594
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r7638 r7999  
    7979        _glonass = true;
    8080      }
     81    }
     82    else if (key == "COMMENT") {
     83      _comments.append(value.trimmed());
    8184    }
    8285  }
  • trunk/BNC/src/rinex/rnxnavfile.h

    r7169 r7999  
    5050    double _version;
    5151    bool   _glonass;
     52    QStringList _comments;
    5253  };
    53  
     54
    5455 public:
    5556  t_rnxNavFile(const QString& fileName, e_inpOut inpOut);
     
    6061  void   setVersion(double version) {_header._version = version;}
    6162  bool   glonass() const {return _header._glonass;}
    62   void   setGlonass(bool glo) {_header._glonass = glo;}
     63  QStringList comments() const {return _header._comments;}
     64  void   setGlonass(bool glo) {_header._glonass = glo;}
    6365  void   writeHeader(const QMap<QString, QString>* txtMap = 0);
    6466  void   writeEph(const t_eph* eph);
Note: See TracChangeset for help on using the changeset viewer.