Changeset 3660 in ntrip for trunk/BNC/RTCM3/ephemeris.cpp


Ignore:
Timestamp:
Feb 3, 2012, 5:51:07 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/ephemeris.cpp

    r3659 r3660  
    793793//////////////////////////////////////////////////////////////////////////////
    794794t_ephGPS::t_ephGPS(float rnxVersion, const QStringList& lines) {
    795 
    796   _ok = false;
     795  cout << "t_ephGPS: " << rnxVersion << " " << lines.size() << endl;
     796  if (lines.size() != 8) {
     797    _ok = false;
     798    return;
     799  }
     800  QRegExp rex;
     801  if (rnxVersion < 3.0) {
     802    rex.setPattern("(.{2}).(.{2}).(.{2}).(.{2}).(.{2}).(.{2}).(.{5})(.{19})(.{19})(.{19})");
     803    cout << lines[0].toAscii().data() << endl;
     804    if (rex.exactMatch(lines[0])) {
     805      QStringList hlp = rex.capturedTexts();
     806      _prn = 'G' + QString("%1").arg(hlp[0], 2, QChar('0'));
     807      int    year  = hlp[1].toInt();
     808      int    month = hlp[2].toInt();
     809      int    day   = hlp[3].toInt();
     810      int    hour  = hlp[4].toInt();
     811      int    min   = hlp[5].toInt();
     812      double sec   = hlp[6].toDouble();
     813      cout << _prn.toAscii().data() << " " << year << " " << month << " "
     814           << day << " " << hour << " " << min << " " << sec << endl;
     815    }
     816  }
    797817}
    798818
Note: See TracChangeset for help on using the changeset viewer.