Changeset 3677 in ntrip


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

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rnxobsfile.cpp

    r3676 r3677  
    4040
    4141#include <iostream>
     42#include <iomanip>
    4243#include "rnxobsfile.h"
    4344#include "bncutils.h"
     
    170171    readInt(line, 29, 3, numSat);
    171172 
     173    _currEpo.satObs.resize(numSat);
     174
    172175    // Read Satellite Numbers
    173176    // ----------------------
     
    181184      pos += 3;
    182185
    183       _currEpo.prns << prn;
    184       _currEpo.satObs[prn].ReSize(_header.nTypes());
     186      _currEpo.satObs[iSat].prn = prn;
     187      _currEpo.satObs[iSat].ReSize(_header.nTypes());
    185188    }
    186189
     
    190193      line = _stream->readLine();
    191194      pos  = 0;
    192       QString prn = _currEpo.prns[iSat];
     195      QString prn = _currEpo.satObs[iSat].prn;
    193196      for (int iType = 0; iType < _header.nTypes(); iType++) {
    194197        if (iType > 0 && iType % 5 == 0) {
     
    196199          pos  = 0;
    197200        }
    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        readDbl(line, pos,     14, _currEpo.satObs[iSat][iType]);
     202        readInt(line, pos + 14, 1, _currEpo.satObs[iSat].lli);
     203        readInt(line, pos + 15, 1, _currEpo.satObs[iSat].snr);
    201204        pos += 16;
    202205      }
    203206
     207      cout.setf(ios::fixed);
    204208      cout << "prn: " << prn.toAscii().data() << " "
    205            << _currEpo.satObs[prn][0] << endl;
     209           << setprecision(3) << _currEpo.satObs[iSat][0] << endl;
    206210    }
    207211
  • trunk/BNC/rnxobsfile.h

    r3676 r3677  
    6262  class t_satObs : public ColumnVector {
    6363   public:
    64     int lli;
    65     int snr;
     64    QString prn;
     65    int     lli;
     66    int     snr;
    6667  };
    6768
     
    6970   public:
    7071    void clear() {
    71       prns.clear();
    7272      satObs.clear();
    7373    }
    74     QStringList             prns;
    75     QMap<QString, t_satObs> satObs;
     74    QVector<t_satObs> satObs;
    7675  };
    7776
Note: See TracChangeset for help on using the changeset viewer.