Changeset 559 in ntrip


Ignore:
Timestamp:
Nov 3, 2007, 10:04:52 AM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.cpp

    r538 r559  
    6161  void converttime(struct converttimeinfo *c, int week, int tow);
    6262  void updatetime(int *week, int *tow, int tk, int fixnumleap);
    63   int  HandleRunBy(char *buffer, int buffersize, const char **u, int rinex3);
    64 }
    65 
     63}
    6664
    6765// Constructor
     
    9290  _ephFileGlonass   = 0;
    9391  _ephStreamGlonass = 0;
     92
     93  _pgmName  = _bncVersion.leftJustified(20, ' ', true);
     94#ifdef WIN32
     95  _userName = QString("${USERNAME}");
     96#else
     97  _userName = QString("${USER}");
     98#endif
     99  expandEnvVar(_userName);
     100  _userName = _userName.leftJustified(20, ' ', true);
    94101}
    95102
     
    294301        *_ephStreamGPS << line;
    295302       
    296         char buffer[100];
    297         HandleRunBy(buffer, sizeof(buffer), 0, 1);
    298         line.sprintf("%s\n%60sEND OF HEADER\n", buffer, "");
     303        QString hlp = QDateTime::currentDateTime().toString("yyyyMMdd hhmmss UTC").leftJustified(20, ' ', true);
     304        *_ephStreamGPS << _pgmName.toAscii().data()
     305                       << _userName.toAscii().data()
     306                       << hlp.toAscii().data()
     307                       << "PGM / RUN BY / DATE" << endl;
     308
     309        line.sprintf("%60sEND OF HEADER\n", "");
    299310        *_ephStreamGPS << line;
    300311       
     
    312323        *_ephStreamGPS << line;
    313324         
    314         char buffer[100];
    315         HandleRunBy(buffer, sizeof(buffer), 0, 0);
    316         line.sprintf("%s\n%60sEND OF HEADER\n", buffer, "");
     325        QString hlp = QDate::currentDate().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
     326        *_ephStreamGPS << _pgmName.toAscii().data()
     327                       << _userName.toAscii().data()
     328                       << hlp.toAscii().data()
     329                       << "PGM / RUN BY / DATE" << endl;
     330
     331        line.sprintf("%60sEND OF HEADER\n", "");
    317332        *_ephStreamGPS << line;
    318333
     
    325340        *_ephStreamGlonass << line;
    326341       
    327         char buffer[100];
    328         HandleRunBy(buffer, sizeof(buffer), 0, 0);
    329         line.sprintf("%s\n%60sEND OF HEADER\n", buffer, "");
     342        QString hlp = QDate::currentDate().toString("dd-MMM-yyyy").leftJustified(20, ' ', true);
     343        *_ephStreamGlonass << _pgmName.toAscii().data()
     344                           << _userName.toAscii().data()
     345                           << hlp.toAscii().data()
     346                           << "PGM / RUN BY / DATE" << endl;
     347
     348        line.sprintf("%60sEND OF HEADER\n", "");
    330349        *_ephStreamGlonass << line;
    331350
  • trunk/BNC/bncapp.h

    r534 r559  
    6262    gpsephemeris*     _gpsEph[PRN_GPS_END - PRN_GPS_START + 1];
    6363    glonassephemeris* _glonassEph[PRN_GLONASS_END - PRN_GLONASS_START + 1];
     64    QString           _userName;
     65    QString           _pgmName;
    6466};
    6567#endif
Note: See TracChangeset for help on using the changeset viewer.