Changeset 8483 in ntrip for trunk/BNC/src/satObs.cpp
- Timestamp:
- Sep 17, 2018, 2:53:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/satObs.cpp
r7058 r8483 18 18 } 19 19 20 // 20 // 21 21 //////////////////////////////////////////////////////////////////////////// 22 22 void t_clkCorr::writeEpoch(ostream* out, const QList<t_clkCorr>& corrList) { … … 43 43 } 44 44 45 // 45 // 46 46 //////////////////////////////////////////////////////////////////////////// 47 47 void t_clkCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_clkCorr>& corrList) { … … 62 62 getline(inStream, line); 63 63 istringstream in(line.c_str()); 64 64 65 65 in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk; 66 66 if (corr._prn.system() == 'E') { … … 85 85 } 86 86 87 // 87 // 88 88 //////////////////////////////////////////////////////////////////////////// 89 89 void t_orbCorr::writeEpoch(ostream* out, const QList<t_orbCorr>& corrList) { … … 113 113 } 114 114 115 // 115 // 116 116 //////////////////////////////////////////////////////////////////////////// 117 117 void t_orbCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_orbCorr>& corrList) { … … 132 132 getline(inStream, line); 133 133 istringstream in(line.c_str()); 134 134 135 135 in >> corr._prn >> corr._iod 136 >> corr._xr[0] >> corr._xr[1] >> corr._xr[2] 136 >> corr._xr[0] >> corr._xr[1] >> corr._xr[2] 137 137 >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2]; 138 138 … … 144 144 } 145 145 146 // 146 // Constructor 147 //////////////////////////////////////////////////////////////////////////// 148 t_URA::t_URA() { 149 _updateInt = 0; 150 _iod = 0; 151 _ura = 0.0; 152 } 153 154 // 155 //////////////////////////////////////////////////////////////////////////// 156 void t_URA::writeEpoch(ostream* out, const QList<t_URA>& corrList) { 157 if (!out || corrList.size() == 0) { 158 return; 159 } 160 out->setf(ios::fixed); 161 bncTime epoTime; 162 QListIterator<t_URA> it(corrList); 163 while (it.hasNext()) { 164 const t_URA& corr = it.next(); 165 if (!epoTime.valid()) { 166 epoTime = corr._time; 167 *out << "> URA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " " 168 << corr._updateInt << " " 169 << corrList.size() << ' ' << corr._staID << endl; 170 } 171 *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' ' 172 << setw(10) << setprecision(4) << corr._ura << endl; 173 } 174 out->flush(); 175 } 176 177 // 178 //////////////////////////////////////////////////////////////////////////// 179 void t_URA::readEpoch(const string& epoLine, istream& inStream, QList<t_URA>& corrList) { 180 bncTime epoTime; 181 unsigned int updateInt; 182 int numCorr; 183 string staID; 184 if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::URA) { 185 return; 186 } 187 for (int ii = 0; ii < numCorr; ii++) { 188 t_URA corr; 189 corr._time = epoTime; 190 corr._updateInt = updateInt; 191 corr._staID = staID; 192 193 string line; 194 getline(inStream, line); 195 istringstream in(line.c_str()); 196 197 in >> corr._prn >> corr._iod >> corr._ura; 198 199 corrList.push_back(corr); 200 } 201 } 202 203 // 147 204 //////////////////////////////////////////////////////////////////////////// 148 205 void t_satCodeBias::writeEpoch(ostream* out, const QList<t_satCodeBias>& biasList) { … … 172 229 } 173 230 174 // 231 // 175 232 //////////////////////////////////////////////////////////////////////////// 176 233 void t_satCodeBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satCodeBias>& biasList) { … … 191 248 getline(inStream, line); 192 249 istringstream in(line.c_str()); 193 250 194 251 int numBias; 195 252 in >> satCodeBias._prn >> numBias; … … 207 264 } 208 265 209 // 266 // 210 267 //////////////////////////////////////////////////////////////////////////// 211 268 void t_satPhaseBias::writeEpoch(ostream* out, const QList<t_satPhaseBias>& biasList) { … … 242 299 out->flush(); 243 300 } 244 245 // 301 302 // 246 303 //////////////////////////////////////////////////////////////////////////// 247 304 void t_satPhaseBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satPhaseBias>& biasList) { … … 290 347 } 291 348 292 // 349 // 293 350 //////////////////////////////////////////////////////////////////////////// 294 351 void t_vTec::write(ostream* out, const t_vTec& vTec) { … … 306 363 << setw(2) << layer._C.Nrows()-1 << ' ' 307 364 << setw(2) << layer._C.Ncols()-1 << ' ' 308 << setw(10) << setprecision(1) << layer._height << endl 309 << setw(10) << setprecision(4) << layer._C 365 << setw(10) << setprecision(1) << layer._height << endl 366 << setw(10) << setprecision(4) << layer._C 310 367 << setw(10) << setprecision(4) << layer._S; 311 368 } … … 313 370 } 314 371 315 // 372 // 316 373 //////////////////////////////////////////////////////////////////////////// 317 374 void t_vTec::read(const string& epoLine, istream& inStream, t_vTec& vTec) { … … 357 414 } 358 415 359 // 360 //////////////////////////////////////////////////////////////////////////// 361 t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime, 416 // 417 //////////////////////////////////////////////////////////////////////////// 418 t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime, 362 419 unsigned int& updateInt, int& numEntries, 363 420 string& staID) { … … 370 427 double sec; 371 428 372 inLine >> epoChar >> typeString 429 inLine >> epoChar >> typeString 373 430 >> year >> month >> day >> hour >> min >> sec >> updateInt >> numEntries >> staID; 374 431 … … 390 447 return vTec; 391 448 } 449 else if (typeString == "URA") { 450 return URA; 451 } 392 452 } 393 453
Note:
See TracChangeset
for help on using the changeset viewer.