Changeset 3697 in ntrip


Ignore:
Timestamp:
Feb 16, 2012, 12:45:25 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rnxobsfile.cpp

    r3682 r3697  
    142142////////////////////////////////////////////////////////////////////////////
    143143const t_rnxObsFile::t_epo* t_rnxObsFile::nextEpochV3() {
    144   return 0; // TODO
     144  while (_stream->status() == QTextStream::Ok && !_stream->atEnd()) {
     145
     146    QString line = _stream->readLine();
     147
     148    if (line.isEmpty()) {
     149      continue;
     150    }
     151
     152    QTextStream in(line.mid(1).toAscii());
     153
     154    // Epoch Time
     155    // ----------
     156    int    year, month, day, hour, min, flag;
     157    double sec;
     158    in >> year >> month >> day >> hour >> min >> sec >> flag;
     159    _currEpo.tt.set(year, month, day, hour, min, sec);
     160
     161    // Number of Satellites
     162    // --------------------
     163    int numSat;
     164    readInt(line, 32, 3, numSat);
     165 
     166    _currEpo.satObs.resize(numSat);
     167
     168    // Observations
     169    // ------------
     170    for (int iSat = 0; iSat < numSat; iSat++) {
     171      line = _stream->readLine();
     172      QString prn = line.mid(0,3);
     173      for (int iType = 0; iType < _header.nTypes(); iType++) {
     174        int pos = 16*iType;
     175        readDbl(line, pos,     14, _currEpo.satObs[iSat][iType]);
     176        readInt(line, pos + 14, 1, _currEpo.satObs[iSat].lli);
     177        readInt(line, pos + 15, 1, _currEpo.satObs[iSat].snr);
     178      }
     179    }
     180  }
     181
     182  return 0;
    145183}
    146184
Note: See TracChangeset for help on using the changeset viewer.