Changeset 3704 in ntrip
- Timestamp:
- Feb 16, 2012, 3:32:19 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpostprocess.cpp
r3696 r3704 153 153 obs.GPSWeek = epo->tt.gpsw(); 154 154 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(); 157 157 if (type == "C1") { 158 158 obs.C1 = satObs[iType]; -
trunk/BNC/rnxobsfile.cpp
r3703 r3704 99 99 QString hlp; 100 100 in >> hlp; 101 _obsTypes << hlp;101 _obsTypesV2 << hlp; 102 102 } 103 103 } … … 181 181 line = _stream->readLine(); 182 182 _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++) { 184 185 int pos = 16*iType; 185 186 readDbl(line, pos, 14, _currEpo.satObs[iSat][iType]); … … 248 249 249 250 _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)); 251 253 } 252 254 … … 257 259 pos = 0; 258 260 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++) { 260 263 if (iType > 0 && iType % 5 == 0) { 261 264 line = _stream->readLine(); -
trunk/BNC/rnxobsfile.h
r3680 r3704 42 42 t_irc read(QTextStream* stream); 43 43 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 } 46 70 const QString& antennaName() const {return _antennaName;} 47 71 const QString& markerName() const {return _markerName;} … … 49 73 const ColumnVector& antNEU() const {return _antNEU;} 50 74 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; 57 82 }; 58 83 … … 61 86 ~t_rnxObsFile(); 62 87 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);} 65 90 const QString& antennaName() const {return _header.antennaName();} 66 91 const QString& markerName() const {return _header.markerName();}
Note:
See TracChangeset
for help on using the changeset viewer.