Changeset 6498 in ntrip
- Timestamp:
- Dec 29, 2014, 2:30:31 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/corrfile.cpp
r6483 r6498 62 62 void t_corrFile::syncRead(const bncTime& tt) { 63 63 64 QList<t_clkCorr> clkCorrList; 65 QList<t_orbCorr> orbCorrList; 66 QList<t_satCodeBias> satCodeBiasList; 67 QList<t_satPhaseBias> satPhaseBiasList; 68 t_vTec vTec; 64 while (_stream.good() && (!_lastEpoTime.valid() || _lastEpoTime <= tt)) { 69 65 70 while (!stopRead(tt) && _stream.good()) { 71 if (stopRead(tt)) { 66 if (_lastLine.empty()) { 67 getline(_stream, _lastLine); stripWhiteSpace(_lastLine); 68 if (!_stream.good()) { 69 throw "t_corrFile: end of file"; 70 } 71 else if (_lastLine.empty() || _lastLine[0] == '!') { 72 continue; 73 } 74 else if (_lastLine[0] != '>') { 75 throw "t_corrFile: error"; 76 } 77 } 78 79 t_corrSSR::e_type corrType = t_corrSSR::readEpoLine(_lastLine, _lastEpoTime); 80 if (corrType == t_corrSSR::unknown) { 81 throw "t_corrFile: unknown line " + _lastLine; 82 } 83 else if (_lastEpoTime > tt) { 72 84 break; 73 85 } 74 } 75 76 if (orbCorrList.size() > 0) { 77 emit newOrbCorrections(orbCorrList); 78 } 79 if (clkCorrList.size() > 0) { 80 emit newClkCorrections(clkCorrList); 81 } 82 if (satCodeBiasList.size() > 0) { 83 emit newCodeBiases(satCodeBiasList); 84 } 85 if (satPhaseBiasList.size() > 0) { 86 emit newPhaseBiases(satPhaseBiasList); 87 } 88 if (vTec._layers.size() > 0) { 89 emit newTec(vTec); 86 else if (corrType == t_corrSSR::clkCorr) { 87 QList<t_clkCorr> clkCorrList; 88 t_clkCorr::readEpoch(_lastLine, _stream, clkCorrList); 89 emit newClkCorrections(clkCorrList); 90 } 91 else if (corrType == t_corrSSR::orbCorr) { 92 QList<t_orbCorr> orbCorrList; 93 t_orbCorr::readEpoch(_lastLine, _stream, orbCorrList); 94 emit newOrbCorrections(orbCorrList); 95 } 96 else if (corrType == t_corrSSR::codeBias) { 97 QList<t_satCodeBias> satCodeBiasList; 98 t_satCodeBias::readEpoch(_lastLine, _stream, satCodeBiasList); 99 emit newCodeBiases(satCodeBiasList); 100 } 101 else if (corrType == t_corrSSR::phaseBias) { 102 QList<t_satPhaseBias> satPhaseBiasList; 103 t_satPhaseBias::readEpoch(_lastLine, _stream, satPhaseBiasList); 104 emit newPhaseBiases(satPhaseBiasList); 105 } 106 else if (corrType == t_corrSSR::vTec) { 107 t_vTec vTec; 108 t_vTec::read(_lastLine, _stream, vTec); 109 emit newTec(vTec); 110 } 90 111 } 91 112 } 92 93 // Read till a given time94 ////////////////////////////////////////////////////////////////////////////95 bool t_corrFile::stopRead(const bncTime& tt) {96 return true;97 } -
trunk/BNC/src/rinex/corrfile.h
r6483 r6498 49 49 50 50 private: 51 bool stopRead(const bncTime& tt);52 51 std::fstream _stream; 52 std::string _lastLine; 53 bncTime _lastEpoTime; 53 54 QMap<QString, int> _corrIODs; 54 55 }; -
trunk/BNC/src/satObs.cpp
r6496 r6498 43 43 // 44 44 //////////////////////////////////////////////////////////////////////////// 45 void t_clkCorr::readEpoch(const QStringList& lines, QList<t_clkCorr>& corrList) {45 void t_clkCorr::readEpoch(const string epoLine, std::istream& in, QList<t_clkCorr>& corrList) { 46 46 } 47 47 … … 84 84 // 85 85 //////////////////////////////////////////////////////////////////////////// 86 void t_orbCorr::readEpoch(const QStringList& lines, QList<t_orbCorr>& corrList) {86 void t_orbCorr::readEpoch(const string epoLine, std::istream& in, QList<t_orbCorr>& corrList) { 87 87 } 88 88 … … 116 116 // 117 117 //////////////////////////////////////////////////////////////////////////// 118 void t_satCodeBias::readEpoch(const QStringList& lines, QList<t_satCodeBias>& biasList) {118 void t_satCodeBias::readEpoch(const string epoLine, std::istream& in, QList<t_satCodeBias>& biasList) { 119 119 } 120 120 … … 153 153 // 154 154 //////////////////////////////////////////////////////////////////////////// 155 void t_satPhaseBias::readEpoch(const QStringList& lines, QList<t_satPhaseBias>& biasList) {155 void t_satPhaseBias::readEpoch(const string epoLine, std::istream& in, QList<t_satPhaseBias>& biasList) { 156 156 } 157 157 … … 180 180 // 181 181 //////////////////////////////////////////////////////////////////////////// 182 void t_vTec::read(const QStringList& lines, t_vTec& vTec) {182 void t_vTec::read(const string epoLine, std::istream& in, t_vTec& vTec) { 183 183 } 184 185 // 186 //////////////////////////////////////////////////////////////////////////// 187 t_corrSSR::e_type t_corrSSR::readEpoLine(const string line, bncTime& epoTime) { 188 189 } -
trunk/BNC/src/satObs.h
r6482 r6498 63 63 t_orbCorr(); 64 64 static void writeEpoch(std::ostream* out, const QList<t_orbCorr>& corrList); 65 static void readEpoch(const QStringList& lines, QList<t_orbCorr>& corrList);65 static void readEpoch(const std::string epoLine, std::istream& in, QList<t_orbCorr>& corrList); 66 66 std::string _staID; 67 67 t_prn _prn; … … 77 77 t_clkCorr(); 78 78 static void writeEpoch(std::ostream* out, const QList<t_clkCorr>& corrList); 79 static void readEpoch(const QStringList& lines, QList<t_clkCorr>& corrList);79 static void readEpoch(const std::string epoLine, std::istream& in, QList<t_clkCorr>& corrList); 80 80 std::string _staID; 81 81 t_prn _prn; … … 99 99 public: 100 100 static void writeEpoch(std::ostream* out, const QList<t_satCodeBias>& biasList); 101 static void readEpoch(const QStringList& lines, QList<t_satCodeBias>& biasList);101 static void readEpoch(const std::string epoLine, std::istream& in, QList<t_satCodeBias>& biasList); 102 102 std::string _staID; 103 103 t_prn _prn; … … 128 128 } 129 129 static void writeEpoch(std::ostream* out, const QList<t_satPhaseBias>& biasList); 130 static void readEpoch(const QStringList& lines, QList<t_satPhaseBias>& biasList);130 static void readEpoch(const std::string epoLine, std::istream& in, QList<t_satPhaseBias>& biasList); 131 131 std::string _staID; 132 132 t_prn _prn; … … 147 147 public: 148 148 static void write(std::ostream* out, const t_vTec& vTec); 149 static void read(const QStringList& lines, t_vTec& vTec);149 static void read(const std::string epoLine, std::istream& in, t_vTec& vTec); 150 150 std::string _staID; 151 151 bncTime _time; … … 153 153 }; 154 154 155 class t_corrSSR { 156 public: 157 enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, unknown}; 158 static e_type readEpoLine(const std::string line, bncTime& epoTime); 159 }; 160 155 161 #endif
Note:
See TracChangeset
for help on using the changeset viewer.