Changeset 2530 in ntrip


Ignore:
Timestamp:
Aug 3, 2010, 8:01:55 PM (14 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r2489 r2530  
    759759         << setw(8)  << setprecision(3) << _neu[0]              << " "
    760760         << setw(8)  << setprecision(3) << _neu[1]              << " "
    761          << setw(8)  << setprecision(3) << _neu[2];
     761         << setw(8)  << setprecision(3) << _neu[2]              << endl << endl;
    762762    emit newMessage(QByteArray(strC.str().c_str()), true);
    763763  }
  • trunk/BNC/bncrawfile.cpp

    r2529 r2530  
    109109  if (_inpFile) {
    110110    QString     line = _inpFile->readLine();
    111     QStringList lst  = line.split(' ');
    112    
    113     bncApp* app = (bncApp*) qApp;
    114     delete app->_currentDateAndTimeGPS;
    115     app->_currentDateAndTimeGPS =
    116       new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate));
    117 
    118     _staID  = lst.value(1).toAscii();
    119     _format = lst.value(2).toAscii();
    120     int nBytes = lst.value(3).toInt();
    121 
    122     data = _inpFile->read(nBytes);
    123 
    124     _inpFile->read(1); // read '\n' character
     111    if (!line.isEmpty()) {
     112      QStringList lst  = line.split(' ');
     113     
     114      bncApp* app = (bncApp*) qApp;
     115      delete app->_currentDateAndTimeGPS;
     116      app->_currentDateAndTimeGPS =
     117        new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate));
     118     
     119      _staID  = lst.value(1).toAscii();
     120      _format = lst.value(2).toAscii();
     121      int nBytes = lst.value(3).toInt();
     122     
     123      data = _inpFile->read(nBytes);
     124     
     125      _inpFile->read(1); // read '\n' character
     126    }
    125127  }
    126128
  • trunk/BNC/bncutils.cpp

    r2221 r2530  
    116116////////////////////////////////////////////////////////////////////////////
    117117QDateTime currentDateAndTimeGPS() {
    118   int    GPSWeek;
    119   double GPSWeeks;
    120   currentGPSWeeks(GPSWeek, GPSWeeks);
    121   return dateAndTimeFromGPSweek(GPSWeek, GPSWeeks);
     118  if ( ((bncApp*) qApp)->_currentDateAndTimeGPS ) {
     119    return *(((bncApp*) qApp)->_currentDateAndTimeGPS);
     120  }
     121  else {
     122    int    GPSWeek;
     123    double GPSWeeks;
     124    currentGPSWeeks(GPSWeek, GPSWeeks);
     125    return dateAndTimeFromGPSweek(GPSWeek, GPSWeeks);
     126  }
    122127}
    123128
Note: See TracChangeset for help on using the changeset viewer.