Changeset 3704 in ntrip


Ignore:
Timestamp:
Feb 16, 2012, 3:32:19 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncpostprocess.cpp

    r3696 r3704  
    153153      obs.GPSWeek  = epo->tt.gpsw();
    154154      obs.GPSWeeks = epo->tt.gpssec();
    155       for (int iType = 0; iType < _rnxObsFile->nTypes(); iType++) {
    156         QByteArray type = _rnxObsFile->obsType(iType).toAscii();
     155      for (int iType = 0; iType < _rnxObsFile->nTypes(obs.satSys); iType++) {
     156        QByteArray type = _rnxObsFile->obsType(obs.satSys,iType).toAscii();
    157157        if      (type == "C1") {
    158158          obs.C1 = satObs[iType];
  • trunk/BNC/rnxobsfile.cpp

    r3703 r3704  
    9999        QString hlp;
    100100        in >> hlp;
    101         _obsTypes << hlp;
     101        _obsTypesV2 << hlp;
    102102      }
    103103    }
     
    181181      line = _stream->readLine();
    182182      _currEpo.satObs[iSat].prn = line.mid(0,3);
    183       for (int iType = 0; iType < _header.nTypes(); iType++) {
     183      char sys = _currEpo.satObs[iSat].prn[0].toAscii();
     184      for (int iType = 0; iType < _header.nTypes(sys); iType++) {
    184185        int pos = 16*iType;
    185186        readDbl(line, pos,     14, _currEpo.satObs[iSat][iType]);
     
    248249
    249250      _currEpo.satObs[iSat].prn = prn;
    250       _currEpo.satObs[iSat].ReSize(_header.nTypes());
     251      char sys = prn[0].toAscii();
     252      _currEpo.satObs[iSat].ReSize(_header.nTypes(sys));
    251253    }
    252254
     
    257259      pos  = 0;
    258260      QString prn = _currEpo.satObs[iSat].prn;
    259       for (int iType = 0; iType < _header.nTypes(); iType++) {
     261      char sys = prn[0].toAscii();
     262      for (int iType = 0; iType < _header.nTypes(sys); iType++) {
    260263        if (iType > 0 && iType % 5 == 0) {
    261264          line = _stream->readLine();
  • trunk/BNC/rnxobsfile.h

    r3680 r3704  
    4242    t_irc read(QTextStream* stream);
    4343    float version() const {return _version;}
    44     int   nTypes() const {return _obsTypes.size();}
    45     const QString& obsType(int index) const {return _obsTypes.at(index);}
     44    int   nTypes(char sys) const {
     45      if (_version < 3.0) {
     46        return _obsTypesV2.size();
     47      }
     48      else {
     49        if (_obsTypesV3.find(sys) != _obsTypesV3.end()) {
     50          return _obsTypesV3.size();
     51        }
     52        else {
     53          return 0;
     54        }
     55      }
     56    }
     57    QString obsType(char sys, int index) const {
     58      if (_version < 3.0) {
     59        return _obsTypesV2.at(index);
     60      }
     61      else {
     62        if (_obsTypesV3.find(sys) != _obsTypesV3.end()) {
     63          return _obsTypesV3[sys].at(index);
     64        }
     65        else {
     66          return QString();
     67        }
     68      }
     69    }
    4670    const QString& antennaName() const {return _antennaName;}
    4771    const QString& markerName() const {return _markerName;}
     
    4973    const ColumnVector& antNEU() const {return _antNEU;}
    5074   private:
    51     float        _version;
    52     QString      _antennaName;
    53     QString      _markerName;
    54     ColumnVector _antNEU;
    55     ColumnVector _xyz;
    56     QStringList  _obsTypes;
     75    float                   _version;
     76    QString                 _antennaName;
     77    QString                 _markerName;
     78    ColumnVector            _antNEU;
     79    ColumnVector            _xyz;
     80    QStringList             _obsTypesV2;
     81    QMap<char, QStringList> _obsTypesV3;
    5782  };
    5883 
     
    6186  ~t_rnxObsFile();
    6287
    63   int   nTypes() const {return _header.nTypes();}
    64   const QString& obsType(int index) const {return _header.obsType(index);}
     88  int   nTypes(char sys) const {return _header.nTypes(sys);}
     89  QString obsType(char sys, int index) const {return _header.obsType(sys, index);}
    6590  const QString& antennaName() const {return _header.antennaName();}
    6691  const QString& markerName() const {return _header.markerName();}
Note: See TracChangeset for help on using the changeset viewer.