Changeset 4219 in ntrip


Ignore:
Timestamp:
May 29, 2012, 12:13:31 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/rinex
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rinex/rnxnavfile.cpp

    r4150 r4219  
    239239//
    240240////////////////////////////////////////////////////////////////////////////
    241 void t_rnxNavFile::writeHeader() {
     241void t_rnxNavFile::writeHeader(const QMap<QString, QString>* txtMap) {
    242242
    243243  bncApp* app = (bncApp*) qApp;
     244
     245  QString     runBy = app->userName();
     246  QStringList comments;
     247
     248  if (txtMap) {
     249    QMapIterator<QString, QString> it(*txtMap);
     250    while (it.hasNext()) {
     251      it.next();
     252      if      (it.key() == "RUN BY") {
     253        runBy = it.value();
     254      }
     255      else if (it.key() == "COMMENT") {
     256        comments = it.value().split("\\n", QString::SkipEmptyParts);
     257      }
     258    }
     259  }
    244260
    245261  if (version() < 3.0) {
     
    258274  *_stream << QString("%1%2%3")
    259275    .arg(app->pgmName(), -20)
    260     .arg(app->userName(), -20)
    261     .arg(currentDateAndTimeGPS().date().toString("dd-MMM-yyyy"), -20)
     276    .arg(runBy.trimmed().left(20), -20)
     277    .arg(QDateTime::currentDateTime().toUTC().toString("yyyyMMdd hhmmss UTC"), -20)
    262278    .leftJustified(60)
    263279           << "PGM / RUN BY / DATE\n";
  • trunk/BNC/rinex/rnxnavfile.h

    r4013 r4219  
    5858  void   setVersion(double version) {_header._version = version;}
    5959  bool   glonass() const {return _header._glonass;}
    60   void   writeHeader();
     60  void   writeHeader(const QMap<QString, QString>* txtMap = 0);
    6161  void   writeEph(const t_eph* eph);
    6262
Note: See TracChangeset for help on using the changeset viewer.