Changeset 3717 in ntrip
- Timestamp:
- Feb 23, 2012, 5:59:52 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpostprocess.cpp
r3710 r3717 45 45 #include "pppopt.h" 46 46 #include "bncpppclient.h" 47 #include "r nxobsfile.h"47 #include "rinex/rnxobsfile.h" 48 48 #include "rnxnavfile.h" 49 49 #include "corrfile.h" … … 136 136 // ------------------------- 137 137 int nEpo = 0; 138 const t_rnxObsFile::t_ epo* epo = 0;138 const t_rnxObsFile::t_rnxEpo* epo = 0; 139 139 while ( (epo = _rnxObsFile->nextEpoch()) != 0 ) { 140 140 ++nEpo; … … 144 144 } 145 145 146 for ( int iObs = 0; iObs < epo->satObs.size(); iObs++) {147 const t_rnxObsFile::t_ satObs& satObs = epo->satObs[iObs];146 for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) { 147 const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs]; 148 148 t_obs obs; 149 149 strncpy(obs.StatID, _rnxObsFile->markerName().toAscii().constData(), 150 150 sizeof(obs.StatID)); 151 obs.satSys = satObs.prn.toAscii().data()[0];152 obs.satNum = satObs.prn.mid(1).toInt();151 obs.satSys = rnxSat.satSys; 152 obs.satNum = rnxSat.satNum; 153 153 obs.GPSWeek = epo->tt.gpsw(); 154 154 obs.GPSWeeks = epo->tt.gpssec(); … … 156 156 QByteArray type = _rnxObsFile->obsType(obs.satSys,iType).toAscii(); 157 157 if (type.indexOf("C1") == 0 && obs.C1 == 0.0) { 158 obs.C1 = satObs[iType];158 obs.C1 = rnxSat.obs[iType]; 159 159 } 160 160 else if (type.indexOf("P1") == 0 && obs.P1 == 0.0) { 161 obs.P1 = satObs[iType];161 obs.P1 = rnxSat.obs[iType]; 162 162 } 163 163 else if (type.indexOf("L1") == 0 && obs.L1C == 0.0) { 164 obs.L1C = satObs[iType];164 obs.L1C = rnxSat.obs[iType]; 165 165 } 166 166 else if (type.indexOf("C2") == 0 && obs.C2 == 0.0) { 167 obs.C2 = satObs[iType];167 obs.C2 = rnxSat.obs[iType]; 168 168 } 169 169 else if (type.indexOf("P2") == 0 && obs.P2 == 0.0) { 170 obs.P2 = satObs[iType];170 obs.P2 = rnxSat.obs[iType]; 171 171 } 172 172 else if (type.indexOf("L2") == 0 && obs.L2C == 0.0) { 173 obs.L2C = satObs[iType];173 obs.L2C = rnxSat.obs[iType]; 174 174 } 175 175 } -
trunk/BNC/rinex/rnxobsfile.h
r3716 r3717 26 26 #define RNXOBSFILE_H 27 27 28 #include <QString> 29 28 30 #include <fstream> 29 #include <string>30 31 #include <vector> 31 32 #include <map> … … 58 59 }; 59 60 60 t_rnxObsFile(const std::string& fileName);61 t_rnxObsFile(const QString& fileName); 61 62 ~t_rnxObsFile(); 62 63 … … 64 65 double interval() const {return _header._interval;} 65 66 int nTypes(char sys) const {return _header.nTypes(sys);} 66 const std::string&fileName() const {return _fileName;}67 const std::string&obsType(char sys, int index) const {return _header.obsType(sys, index);}68 const std::string&antennaName() const {return _header._antennaName;}69 const std::string&markerName() const {return _header._markerName;}67 const QString& fileName() const {return _fileName;} 68 const QString& obsType(char sys, int index) const {return _header.obsType(sys, index);} 69 const QString& antennaName() const {return _header._antennaName;} 70 const QString& markerName() const {return _header._markerName;} 70 71 const ColumnVector& xyz() const {return _header._xyz;} 71 72 const ColumnVector& antNEU() const {return _header._antNEU;} … … 82 83 protected: 83 84 t_rnxObsFile() {}; 84 void open(const std::string& fileName);85 void open(const QString& fileName); 85 86 void close(); 86 87 … … 91 92 ~t_rnxObsHeader(); 92 93 93 t_irc 94 int 95 const std::string& obsType(char sys, int index) const;94 t_irc read(std::ifstream* stream, int maxLines = 0); 95 int nTypes(char sys) const; 96 const QString& obsType(char sys, int index) const; 96 97 97 static const std::string _emptyStr;98 float 99 double 100 std::string _antennaName;101 std::string _markerName;102 ColumnVector 103 ColumnVector 104 ColumnVector 105 ColumnVector 106 std::vector< std::string> _obsTypesV2;107 std::map<char, std::vector< std::string> > _obsTypesV3;108 int 109 int 98 static const QString _emptyStr; 99 float _version; 100 double _interval; 101 QString _antennaName; 102 QString _markerName; 103 ColumnVector _antNEU; 104 ColumnVector _antXYZ; 105 ColumnVector _antBSG; 106 ColumnVector _xyz; 107 std::vector<QString> _obsTypesV2; 108 std::map<char, std::vector<QString> > _obsTypesV3; 109 int _wlFactorsL1[MAXPRN_GPS+1]; 110 int _wlFactorsL2[MAXPRN_GPS+1]; 110 111 }; 111 112 112 113 const t_rnxEpo* nextEpochV2(); 113 114 const t_rnxEpo* nextEpochV3(); 114 void handleEpochFlag(int flag, const std::string& line);115 void handleEpochFlag(int flag, const QString& line); 115 116 116 std::string_fileName;117 QString _fileName; 117 118 t_rnxObsHeader _header; 118 119 std::ifstream* _stream;
Note:
See TracChangeset
for help on using the changeset viewer.