Changeset 6126 in ntrip for trunk/BNC/src
- Timestamp:
- Sep 11, 2014, 3:40:38 PM (10 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxobsfile.cpp
r6125 r6126 355 355 // Observation Type (satellite-system specific) 356 356 //////////////////////////////////////////////////////////////////////////// 357 QString t_rnxObsHeader::obsType(char sys, int index) const { 357 QString t_rnxObsHeader::obsType(char sys, int index, double version) const { 358 359 if (version == 0.0) { 360 version = _version; 361 } 358 362 if (_obsTypes.contains(sys)) { 359 return _obsTypes[sys].at(index); 360 } 361 else { 362 return ""; 363 } 363 QString origType = _obsTypes[sys].at(index); 364 if (int(version) == int(_version)) { 365 return origType; 366 } 367 else if (int(version) == 2) { 368 return t_rnxObsFile::type3to2(origType); 369 } 370 else if (int(version) == 3) { 371 return t_rnxObsFile::type2to3(sys, origType); 372 } 373 } 374 return ""; 364 375 } 365 376 … … 583 594 584 595 _currEpo.rnxSat.resize(numSat); 596 _currEpo.version = _header._version; 585 597 586 598 // Observations … … 660 672 661 673 _currEpo.rnxSat.resize(numSat); 674 _currEpo.version = _header._version; 662 675 663 676 // Read Satellite Numbers … … 834 847 *_stream << endl; 835 848 } 836 QString type = obsType(sys, iType );849 QString type = obsType(sys, iType, epo->version); 837 850 if (!rnxSat.obs.contains(type)) { 838 851 *_stream << QString().leftJustified(16); … … 886 899 *_stream << rnxSat.prn.toString().c_str(); 887 900 for (int iType = 0; iType < nTypes(sys); iType++) { 888 QString type = obsType(sys, iType );901 QString type = obsType(sys, iType, epo->version); 889 902 if (!rnxSat.obs.contains(type)) { 890 903 *_stream << QString().leftJustified(16); … … 1068 1081 } 1069 1082 1070 // Set Observations from RINEX File1071 ////////////////////////////////////////////////////////////////////////////1072 bool t_rnxObsFile::useType(const QStringList& useObsTypes, const QString& type) {1073 1074 if (useObsTypes.size() == 0) {1075 return true;1076 }1077 for (int ii = 0; ii < useObsTypes.size(); ii++) {1078 if (type.left(2) == useObsTypes[ii].left(2)) {1079 return true;1080 }1081 }1082 return false;1083 } -
trunk/BNC/src/rinex/rnxobsfile.h
r6120 r6126 54 54 int numSys() const; 55 55 int nTypes(char sys) const; 56 QString obsType(char sys, int index ) const;56 QString obsType(char sys, int index, double version = 0.0) const; 57 57 QStringList obsTypesStrings() const; 58 58 void write(QTextStream* stream, const QMap<QString, QString>* txtMap = 0) const; … … 103 103 class t_rnxEpo { 104 104 public: 105 t_rnxEpo() {clear();} 105 106 void clear() { 106 107 tt.reset(); 107 108 rnxSat.clear(); 109 version = 0.0; 108 110 } 109 111 bncTime tt; 110 112 std::vector<t_rnxSat> rnxSat; 113 double version; 111 114 }; 112 115 … … 121 124 int nTypes(char sys) const {return _header.nTypes(sys);} 122 125 const QString& fileName() const {return _fileName;} 123 QString obsType(char sys, int index) const {return _header.obsType(sys, index);} 126 QString obsType(char sys, int index, double version = 0.0) const { 127 return _header.obsType(sys, index, version); 128 } 124 129 const QString& antennaName() const {return _header._antennaName;} 125 130 const QString& markerName() const {return _header._markerName;} … … 172 177 t_rnxEpo* nextEpochV3(); 173 178 void handleEpochFlag(int flag, const QString& line, bool& headerReRead); 174 bool useType(const QStringList& useObsTypes, const QString& type);175 179 176 180 QMap<int, int> _indexMap2to2;
Note:
See TracChangeset
for help on using the changeset viewer.