Changeset 3676 in ntrip


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

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rnxobsfile.cpp

    r3675 r3676  
    131131////////////////////////////////////////////////////////////////////////////
    132132const t_rnxObsFile::t_epo* t_rnxObsFile::nextEpoch() {
     133
     134  _currEpo.clear();
     135
    133136  if (version() < 3.0) {
    134137    return nextEpochV2();
     
    167170    readInt(line, 29, 3, numSat);
    168171 
     172    // Read Satellite Numbers
     173    // ----------------------
    169174    int pos = 32;
    170175    for (int iSat = 0; iSat < numSat; iSat++) {
     
    174179      }
    175180      QString prn = line.mid(pos, 3);
    176      
    177       cout << "prn = " << prn.toAscii().data() << endl;
    178181      pos += 3;
     182
     183      _currEpo.prns << prn;
     184      _currEpo.satObs[prn].ReSize(_header.nTypes());
     185    }
     186
     187    // Read Observation Records
     188    // ------------------------
     189    for (int iSat = 0; iSat < numSat; iSat++) {
     190      line = _stream->readLine();
     191      pos  = 0;
     192      QString prn = _currEpo.prns[iSat];
     193      for (int iType = 0; iType < _header.nTypes(); iType++) {
     194        if (iType > 0 && iType % 5 == 0) {
     195          line = _stream->readLine();
     196          pos  = 0;
     197        }
     198        readDbl(line, pos,     14, _currEpo.satObs[prn][iType]);
     199        readInt(line, pos + 14, 1, _currEpo.satObs[prn].lli);
     200        readInt(line, pos + 15, 1, _currEpo.satObs[prn].snr);
     201        pos += 16;
     202      }
     203
     204      cout << "prn: " << prn.toAscii().data() << " "
     205           << _currEpo.satObs[prn][0] << endl;
    179206    }
    180207
  • trunk/BNC/rnxobsfile.h

    r3675 r3676  
    6060  ~t_rnxObsFile();
    6161
     62  class t_satObs : public ColumnVector {
     63   public:
     64    int lli;
     65    int snr;
     66  };
     67
    6268  class t_epo {
    6369   public:
    64     QMap<QString, ColumnVector> satObs;
     70    void clear() {
     71      prns.clear();
     72      satObs.clear();
     73    }
     74    QStringList             prns;
     75    QMap<QString, t_satObs> satObs;
    6576  };
    6677
Note: See TracChangeset for help on using the changeset viewer.