Changeset 157 in ntrip for trunk/BNC/bncrinex.cpp


Ignore:
Timestamp:
Sep 9, 2006, 11:11:27 AM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r156 r157  
    2525
    2626#include "bncrinex.h"
     27#include "bncapp.h"
    2728#include "bncutils.h"
    2829#include "bncconst.h"
     
    5253    }
    5354  }
     55
     56  _pgmName  = ((bncApp*)qApp)->bncVersion().leftJustified(20, ' ', true);
     57  _userName = QString("${USER}").leftJustified(20, ' ', true);
     58  expandEnvVar(_userName);
    5459}
    5560
     
    179184    while (it.hasNext()) {
    180185      QString line = it.next();
    181       if      (line.indexOf("# / TYPES OF OBSERV") != -1) {
     186      if      (line.indexOf("PGM / RUN BY / DATE") != -1) {
     187        QString hlp = QDate::currentDate().toString("dd-MMM-yyyy         ");
     188        _out << _pgmName.toAscii().data() << _userName.toAscii().data()
     189             << hlp.toAscii().data() << "PGM / RUN BY / DATE" << endl;
     190      }
     191      else if (line.indexOf("# / TYPES OF OBSERV") != -1) {
    182192        _out << "     4    P1    P2    L1    L2"
    183193                "                              # / TYPES OF OBSERV"  << endl;
     
    204214   
    205215    _out << "     2.10           OBSERVATION DATA    G (GPS)             RINEX VERSION / TYPE" << endl;
    206     _out << "BNC                 LM                  27-Aug-2006         PGM / RUN BY / DATE"  << endl;
     216    QString hlp = QDate::currentDate().toString("dd-MMM-yyyy         ");
     217    _out << _pgmName.toAscii().data() << _userName.toAscii().data()
     218         << hlp.toAscii().data() << "PGM / RUN BY / DATE" << endl;
    207219    _out.setf(ios::left);
    208220    _out << setw(60) << _statID.data()                               << "MARKER NAME"          << endl;
     
    228240                                "    hh    mm   ss.zzz0000").toAscii().data();
    229241    _out << "                 "                                      << "TIME OF FIRST OBS"    << endl;
    230     QString hlp = QString("GENERATED FROM STREAM %1").arg(_mountPoint)
    231                          .leftJustified(60, ' ', true);
     242    hlp = QString("GENERATED FROM STREAM %1").arg(_mountPoint)
     243                                             .leftJustified(60, ' ', true);
    232244    _out << hlp.toAscii().data() << "COMMENT" << endl;
    233245    _out << "                                                            END OF HEADER"        << endl;
Note: See TracChangeset for help on using the changeset viewer.