Changeset 3673 in ntrip


Ignore:
Timestamp:
Feb 12, 2012, 10:12:36 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rnxobsfile.cpp

    r3672 r3673  
    131131////////////////////////////////////////////////////////////////////////////
    132132t_irc t_rnxObsFile::getEpoch() {
     133  if (version() < 3.0) {
     134    return getEpochV2();
     135  }
     136  else {
     137    return getEpochV3();
     138  }
     139}
     140
     141// Retrieve single Epoch (RINEX Version 3)
     142////////////////////////////////////////////////////////////////////////////
     143t_irc t_rnxObsFile::getEpochV3() {
     144  return failure; // TODO
     145}
     146
     147// Retrieve single Epoch (RINEX Version 2)
     148////////////////////////////////////////////////////////////////////////////
     149t_irc t_rnxObsFile::getEpochV2() {
    133150  while (_stream->status() == QTextStream::Ok && !_stream->atEnd()) {
    134151    QString line = _stream->readLine();
     
    136153      continue;
    137154    }
     155    QTextStream in(line.toAscii());
     156    int    year, month, day, hour, min, flag;
     157    double sec;
     158    in >> year >> month >> day >> hour >> min >> sec >> flag;
     159    if      (year <  80) {
     160      year += 2000;
     161    }
     162    else if (year < 100) {
     163      year += 1900;
     164    }
     165
     166    int numSat;
     167    readInt(line, 29, 3, numSat);
    138168  }
    139169  return success;
  • trunk/BNC/rnxobsfile.h

    r3672 r3673  
    6060  ~t_rnxObsFile();
    6161
     62  float version() const {return _header.version();}
    6263  t_irc getEpoch();
    6364
    6465 private:
     66  t_irc getEpochV2();
     67  t_irc getEpochV3();
     68
    6569  t_rnxObsHeader _header;
    6670  QFile*         _file;
Note: See TracChangeset for help on using the changeset viewer.