| [6176] | 1 | #include <iostream>
|
|---|
| [6177] | 2 | #include <iomanip>
|
|---|
| [6176] | 3 | #include <sstream>
|
|---|
| [11047] | 4 | #include <cstdlib>
|
|---|
| [6495] | 5 | #include <newmatio.h>
|
|---|
| [6144] | 6 |
|
|---|
| 7 | #include "satObs.h"
|
|---|
| [6178] | 8 |
|
|---|
| [6144] | 9 | using namespace std;
|
|---|
| 10 |
|
|---|
| [6466] | 11 | // Constructor
|
|---|
| [6144] | 12 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 13 | t_clkCorr::t_clkCorr() {
|
|---|
| [11000] | 14 | _updateInt = 0;
|
|---|
| 15 | _iod = 0;
|
|---|
| 16 | _dClk = 0.0;
|
|---|
| 17 | _dotDClk = 0.0;
|
|---|
| [6160] | 18 | _dotDotDClk = 0.0;
|
|---|
| [6144] | 19 | }
|
|---|
| 20 |
|
|---|
| [8483] | 21 | //
|
|---|
| [6144] | 22 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 23 | void t_clkCorr::writeEpoch(ostream* out, const QList<t_clkCorr>& corrList) {
|
|---|
| [6456] | 24 | if (!out || corrList.size() == 0) {
|
|---|
| 25 | return;
|
|---|
| 26 | }
|
|---|
| [6457] | 27 | out->setf(ios::fixed);
|
|---|
| 28 | bncTime epoTime;
|
|---|
| 29 | QListIterator<t_clkCorr> it(corrList);
|
|---|
| 30 | while (it.hasNext()) {
|
|---|
| 31 | const t_clkCorr& corr = it.next();
|
|---|
| 32 | if (!epoTime.valid()) {
|
|---|
| 33 | epoTime = corr._time;
|
|---|
| [11000] | 34 | *out << "> CLOCK " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 35 | << corr._updateInt << " "
|
|---|
| 36 | << corrList.size() << ' ' << corr._staID << endl;
|
|---|
| [6457] | 37 | }
|
|---|
| [7058] | 38 | *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' '
|
|---|
| [11000] | 39 | << setw(10) << setprecision(4) << corr._dClk * t_CST::c << ' ' // m
|
|---|
| 40 | << setw(10) << setprecision(4) << corr._dotDClk * t_CST::c * 1.e3 << ' ' // m/s => mm/s
|
|---|
| 41 | << setw(10) << setprecision(4) << corr._dotDotDClk * t_CST::c * 1.e3 << endl; // m/s² => mm/s²
|
|---|
| [6457] | 42 | }
|
|---|
| [6456] | 43 | out->flush();
|
|---|
| [6144] | 44 | }
|
|---|
| 45 |
|
|---|
| [8483] | 46 | //
|
|---|
| [6144] | 47 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 48 | void t_clkCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_clkCorr>& corrList) {
|
|---|
| [11000] | 49 | bncTime epoTime;
|
|---|
| [6556] | 50 | unsigned int updateInt;
|
|---|
| [11000] | 51 | int numCorr;
|
|---|
| 52 | string staID;
|
|---|
| [6556] | 53 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::clkCorr) {
|
|---|
| [6502] | 54 | return;
|
|---|
| 55 | }
|
|---|
| [6503] | 56 | for (int ii = 0; ii < numCorr; ii++) {
|
|---|
| [6504] | 57 | t_clkCorr corr;
|
|---|
| [11000] | 58 | corr._time = epoTime;
|
|---|
| [6556] | 59 | corr._updateInt = updateInt;
|
|---|
| [11000] | 60 | corr._staID = staID;
|
|---|
| [6503] | 61 |
|
|---|
| 62 | string line;
|
|---|
| [6507] | 63 | getline(inStream, line);
|
|---|
| [6503] | 64 | istringstream in(line.c_str());
|
|---|
| [8483] | 65 |
|
|---|
| [6504] | 66 | in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk;
|
|---|
| [10599] | 67 |
|
|---|
| 68 | char sys = corr._prn.system();
|
|---|
| [11000] | 69 | int num = corr._prn.number();
|
|---|
| [10599] | 70 | int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
|
|---|
| 71 | corr._prn.setFlag(flag);
|
|---|
| 72 |
|
|---|
| [11000] | 73 | corr._dClk /= (t_CST::c);
|
|---|
| 74 | corr._dotDClk /= (t_CST::c * 1.e3);
|
|---|
| [10565] | 75 | corr._dotDotDClk /= (t_CST::c * 1.e3);
|
|---|
| [7014] | 76 |
|
|---|
| [6504] | 77 | corrList.push_back(corr);
|
|---|
| [6503] | 78 | }
|
|---|
| [6180] | 79 | }
|
|---|
| 80 |
|
|---|
| [6466] | 81 | // Constructor
|
|---|
| [6180] | 82 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 83 | t_orbCorr::t_orbCorr() {
|
|---|
| [6589] | 84 | _updateInt = 0;
|
|---|
| [11000] | 85 | _iod = 0;
|
|---|
| 86 | _system = 'R';
|
|---|
| 87 | _xr.ReSize(3);
|
|---|
| 88 | _xr = 0.0;
|
|---|
| 89 | _dotXr.ReSize(3);
|
|---|
| 90 | _dotXr = 0.0;
|
|---|
| [10998] | 91 | _ssrFormat = ssrUnknown;
|
|---|
| [6144] | 92 | }
|
|---|
| 93 |
|
|---|
| [8483] | 94 | //
|
|---|
| [6144] | 95 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 96 | void t_orbCorr::writeEpoch(ostream* out, const QList<t_orbCorr>& corrList) {
|
|---|
| [6456] | 97 | if (!out || corrList.size() == 0) {
|
|---|
| 98 | return;
|
|---|
| 99 | }
|
|---|
| [6460] | 100 | out->setf(ios::fixed);
|
|---|
| 101 | bncTime epoTime;
|
|---|
| 102 | QListIterator<t_orbCorr> it(corrList);
|
|---|
| 103 | while (it.hasNext()) {
|
|---|
| 104 | const t_orbCorr& corr = it.next();
|
|---|
| 105 | if (!epoTime.valid()) {
|
|---|
| 106 | epoTime = corr._time;
|
|---|
| [11000] | 107 | *out << "> ORBIT " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 108 | << corr._updateInt << " "
|
|---|
| 109 | << corrList.size() << ' ' << corr._staID << endl;
|
|---|
| [10998] | 110 | *out << " " << static_cast<int>(corr._ssrFormat) << endl;
|
|---|
| [6460] | 111 | }
|
|---|
| [7058] | 112 | *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' '
|
|---|
| [11000] | 113 | << setw(10) << setprecision(4) << corr._xr[0] << ' '
|
|---|
| 114 | << setw(10) << setprecision(4) << corr._xr[1] << ' '
|
|---|
| 115 | << setw(10) << setprecision(4) << corr._xr[2] << " "
|
|---|
| 116 | << setw(10) << setprecision(4) << corr._dotXr[0] * 1.e3 << ' ' // m/s => mm/s
|
|---|
| 117 | << setw(10) << setprecision(4) << corr._dotXr[1] * 1.e3 << ' ' // m/s => mm/s
|
|---|
| 118 | << setw(10) << setprecision(4) << corr._dotXr[2] * 1.e3 << endl; // m/s => mm/s
|
|---|
| [6460] | 119 | }
|
|---|
| [6456] | 120 | out->flush();
|
|---|
| [6144] | 121 | }
|
|---|
| 122 |
|
|---|
| [8483] | 123 | //
|
|---|
| [6455] | 124 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 125 | void t_orbCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_orbCorr>& corrList) {
|
|---|
| [11000] | 126 | bncTime epoTime;
|
|---|
| [6556] | 127 | unsigned int updateInt;
|
|---|
| [11000] | 128 | int numCorr;
|
|---|
| 129 | string staID;
|
|---|
| [6556] | 130 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::orbCorr) {
|
|---|
| [6504] | 131 | return;
|
|---|
| 132 | }
|
|---|
| [10998] | 133 |
|
|---|
| 134 | e_ssrFormat ssrFormat = ssrUnknown;
|
|---|
| [11047] | 135 |
|
|---|
| 136 | // TEMPORARY BACKWARD COMPATIBILITY - remove later on:
|
|---|
| 137 | // .ssr files written before the SSR format line (a single integer) was
|
|---|
| 138 | // added after the "> ORBIT" epoch line don't have it - their first line
|
|---|
| 139 | // is already the first satellite. Such a line is kept (firstLine) and
|
|---|
| 140 | // processed as the first correction below, with ssrFormat unknown.
|
|---|
| 141 | // To revert: read the format line unconditionally again, i.e. drop the
|
|---|
| 142 | // "only one integer on the line" test and the firstLine handling in the
|
|---|
| 143 | // loop below.
|
|---|
| 144 | string firstLine;
|
|---|
| 145 | getline(inStream, firstLine);
|
|---|
| [10998] | 146 | {
|
|---|
| [11047] | 147 | istringstream in(firstLine.c_str());
|
|---|
| 148 | int ssrFormatInt = 0;
|
|---|
| 149 | string rest;
|
|---|
| 150 | if ((in >> ssrFormatInt) && !(in >> rest)) { // format line
|
|---|
| [10998] | 151 | ssrFormat = static_cast<e_ssrFormat>(ssrFormatInt);
|
|---|
| [11047] | 152 | firstLine.clear();
|
|---|
| [10998] | 153 | }
|
|---|
| 154 | }
|
|---|
| 155 |
|
|---|
| [6504] | 156 | for (int ii = 0; ii < numCorr; ii++) {
|
|---|
| 157 | t_orbCorr corr;
|
|---|
| [11000] | 158 | corr._time = epoTime;
|
|---|
| [6556] | 159 | corr._updateInt = updateInt;
|
|---|
| [11000] | 160 | corr._staID = staID;
|
|---|
| [10998] | 161 | corr._ssrFormat = ssrFormat;
|
|---|
| [6504] | 162 |
|
|---|
| 163 | string line;
|
|---|
| [11047] | 164 | if (ii == 0 && !firstLine.empty()) { // TEMPORARY BACKWARD COMPATIBILITY, see above
|
|---|
| 165 | line = firstLine;
|
|---|
| 166 | }
|
|---|
| 167 | else {
|
|---|
| 168 | getline(inStream, line);
|
|---|
| 169 | }
|
|---|
| [6504] | 170 | istringstream in(line.c_str());
|
|---|
| [8483] | 171 |
|
|---|
| [11000] | 172 | in >> corr._prn >> corr._iod >> corr._xr[0] >> corr._xr[1] >> corr._xr[2] >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2];
|
|---|
| [6504] | 173 |
|
|---|
| [10599] | 174 | char sys = corr._prn.system();
|
|---|
| [11000] | 175 | int num = corr._prn.number();
|
|---|
| [10599] | 176 | int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
|
|---|
| 177 | corr._prn.setFlag(flag);
|
|---|
| 178 |
|
|---|
| [9685] | 179 | corr._dotXr[0] /= 1.e3; // mm/s => m/s
|
|---|
| 180 | corr._dotXr[1] /= 1.e3; // mm/s => m/s
|
|---|
| 181 | corr._dotXr[2] /= 1.e3; // mm/s => m/s
|
|---|
| [9682] | 182 |
|
|---|
| [6504] | 183 | corrList.push_back(corr);
|
|---|
| 184 | }
|
|---|
| [6455] | 185 | }
|
|---|
| [6475] | 186 |
|
|---|
| [8483] | 187 | // Constructor
|
|---|
| [6475] | 188 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 189 | t_URA::t_URA() {
|
|---|
| [11000] | 190 | _updateInt = 0;
|
|---|
| 191 | _iod = 0;
|
|---|
| 192 | _ura = 0.0;
|
|---|
| [8483] | 193 | }
|
|---|
| 194 |
|
|---|
| 195 | //
|
|---|
| 196 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 197 | void t_URA::writeEpoch(ostream* out, const QList<t_URA>& corrList) {
|
|---|
| [8483] | 198 | if (!out || corrList.size() == 0) {
|
|---|
| 199 | return;
|
|---|
| 200 | }
|
|---|
| 201 | out->setf(ios::fixed);
|
|---|
| 202 | bncTime epoTime;
|
|---|
| 203 | QListIterator<t_URA> it(corrList);
|
|---|
| 204 | while (it.hasNext()) {
|
|---|
| 205 | const t_URA& corr = it.next();
|
|---|
| 206 | if (!epoTime.valid()) {
|
|---|
| 207 | epoTime = corr._time;
|
|---|
| [11000] | 208 | *out << "> URA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 209 | << corr._updateInt << " "
|
|---|
| 210 | << corrList.size() << ' ' << corr._staID << endl;
|
|---|
| [8483] | 211 | }
|
|---|
| 212 | *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' '
|
|---|
| [11000] | 213 | << setw(10) << setprecision(4) << corr._ura << endl;
|
|---|
| [8483] | 214 | }
|
|---|
| 215 | out->flush();
|
|---|
| 216 | }
|
|---|
| 217 |
|
|---|
| 218 | //
|
|---|
| 219 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 220 | void t_URA::readEpoch(const string& epoLine, istream& inStream, QList<t_URA>& corrList) {
|
|---|
| [11000] | 221 | bncTime epoTime;
|
|---|
| [8483] | 222 | unsigned int updateInt;
|
|---|
| [11000] | 223 | int numCorr;
|
|---|
| 224 | string staID;
|
|---|
| [8483] | 225 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::URA) {
|
|---|
| 226 | return;
|
|---|
| 227 | }
|
|---|
| 228 | for (int ii = 0; ii < numCorr; ii++) {
|
|---|
| 229 | t_URA corr;
|
|---|
| [11000] | 230 | corr._time = epoTime;
|
|---|
| [8483] | 231 | corr._updateInt = updateInt;
|
|---|
| [11000] | 232 | corr._staID = staID;
|
|---|
| [8483] | 233 |
|
|---|
| 234 | string line;
|
|---|
| 235 | getline(inStream, line);
|
|---|
| 236 | istringstream in(line.c_str());
|
|---|
| 237 |
|
|---|
| 238 | in >> corr._prn >> corr._iod >> corr._ura;
|
|---|
| 239 |
|
|---|
| [10599] | 240 | char sys = corr._prn.system();
|
|---|
| [11000] | 241 | int num = corr._prn.number();
|
|---|
| [10599] | 242 | int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
|
|---|
| 243 | corr._prn.setFlag(flag);
|
|---|
| 244 |
|
|---|
| [8483] | 245 | corrList.push_back(corr);
|
|---|
| 246 | }
|
|---|
| 247 | }
|
|---|
| 248 |
|
|---|
| 249 | //
|
|---|
| 250 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 251 | void t_satCodeBias::writeEpoch(ostream* out, const QList<t_satCodeBias>& biasList) {
|
|---|
| [6476] | 252 | if (!out || biasList.size() == 0) {
|
|---|
| 253 | return;
|
|---|
| 254 | }
|
|---|
| 255 | out->setf(ios::fixed);
|
|---|
| 256 | bncTime epoTime;
|
|---|
| 257 | QListIterator<t_satCodeBias> it(biasList);
|
|---|
| 258 | while (it.hasNext()) {
|
|---|
| 259 | const t_satCodeBias& satCodeBias = it.next();
|
|---|
| 260 | if (!epoTime.valid()) {
|
|---|
| 261 | epoTime = satCodeBias._time;
|
|---|
| [11000] | 262 | *out << "> CODE_BIAS " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 263 | << satCodeBias._updateInt << " "
|
|---|
| [11047] | 264 | << biasList.size() << ' ' << satCodeBias._staID << ' '
|
|---|
| 265 | << satCodeBias._ssrIOD << ' ' << satCodeBias._ssrProviderID << endl;
|
|---|
| [6476] | 266 | }
|
|---|
| [6567] | 267 | *out << satCodeBias._prn.toString() << " " << setw(2) << satCodeBias._bias.size();
|
|---|
| [6477] | 268 | for (unsigned ii = 0; ii < satCodeBias._bias.size(); ii++) {
|
|---|
| 269 | const t_frqCodeBias& frqCodeBias = satCodeBias._bias[ii];
|
|---|
| 270 | *out << " " << frqCodeBias._rnxType2ch << ' '
|
|---|
| [11000] | 271 | << setw(10) << setprecision(4) << frqCodeBias._value;
|
|---|
| [6477] | 272 | }
|
|---|
| [6476] | 273 | *out << endl;
|
|---|
| 274 | }
|
|---|
| 275 | out->flush();
|
|---|
| [6475] | 276 | }
|
|---|
| 277 |
|
|---|
| [8483] | 278 | //
|
|---|
| [6475] | 279 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 280 | void t_satCodeBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satCodeBias>& biasList) {
|
|---|
| [11000] | 281 | bncTime epoTime;
|
|---|
| [6556] | 282 | unsigned int updateInt;
|
|---|
| [11000] | 283 | int numSat;
|
|---|
| 284 | string staID;
|
|---|
| [6556] | 285 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numSat, staID) != t_corrSSR::codeBias) {
|
|---|
| [6505] | 286 | return;
|
|---|
| 287 | }
|
|---|
| [11047] | 288 | int ssrIOD, ssrProviderID;
|
|---|
| 289 | t_corrSSR::readSsrIOD(epoLine, ssrIOD, ssrProviderID);
|
|---|
| [6505] | 290 | for (int ii = 0; ii < numSat; ii++) {
|
|---|
| 291 | t_satCodeBias satCodeBias;
|
|---|
| [11000] | 292 | satCodeBias._time = epoTime;
|
|---|
| [6556] | 293 | satCodeBias._updateInt = updateInt;
|
|---|
| [11000] | 294 | satCodeBias._staID = staID;
|
|---|
| [11047] | 295 | satCodeBias._ssrIOD = ssrIOD;
|
|---|
| 296 | satCodeBias._ssrProviderID = ssrProviderID;
|
|---|
| [6505] | 297 |
|
|---|
| 298 | string line;
|
|---|
| [6507] | 299 | getline(inStream, line);
|
|---|
| [6505] | 300 | istringstream in(line.c_str());
|
|---|
| [8483] | 301 |
|
|---|
| [6567] | 302 | int numBias;
|
|---|
| 303 | in >> satCodeBias._prn >> numBias;
|
|---|
| [6505] | 304 |
|
|---|
| [10599] | 305 | char sys = satCodeBias._prn.system();
|
|---|
| [11000] | 306 | int num = satCodeBias._prn.number();
|
|---|
| [10599] | 307 | int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
|
|---|
| 308 | satCodeBias._prn.setFlag(flag);
|
|---|
| 309 |
|
|---|
| [6505] | 310 | while (in.good()) {
|
|---|
| 311 | t_frqCodeBias frqCodeBias;
|
|---|
| 312 | in >> frqCodeBias._rnxType2ch >> frqCodeBias._value;
|
|---|
| 313 | if (!frqCodeBias._rnxType2ch.empty()) {
|
|---|
| 314 | satCodeBias._bias.push_back(frqCodeBias);
|
|---|
| 315 | }
|
|---|
| 316 | }
|
|---|
| 317 |
|
|---|
| 318 | biasList.push_back(satCodeBias);
|
|---|
| 319 | }
|
|---|
| [6475] | 320 | }
|
|---|
| [6481] | 321 |
|
|---|
| [8483] | 322 | //
|
|---|
| [6481] | 323 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 324 | void t_satPhaseBias::writeEpoch(ostream* out, const QList<t_satPhaseBias>& biasList) {
|
|---|
| [6493] | 325 | if (!out || biasList.size() == 0) {
|
|---|
| 326 | return;
|
|---|
| 327 | }
|
|---|
| 328 | out->setf(ios::fixed);
|
|---|
| 329 | bncTime epoTime;
|
|---|
| 330 | QListIterator<t_satPhaseBias> it(biasList);
|
|---|
| 331 | while (it.hasNext()) {
|
|---|
| 332 | const t_satPhaseBias& satPhaseBias = it.next();
|
|---|
| 333 | if (!epoTime.valid()) {
|
|---|
| 334 | epoTime = satPhaseBias._time;
|
|---|
| [11000] | 335 | *out << "> PHASE_BIAS " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 336 | << satPhaseBias._updateInt << " "
|
|---|
| [11047] | 337 | << biasList.size() << ' ' << satPhaseBias._staID << ' '
|
|---|
| 338 | << satPhaseBias._ssrIOD << ' ' << satPhaseBias._ssrProviderID << endl;
|
|---|
| [10999] | 339 |
|
|---|
| 340 | if (satPhaseBias._ssrFormat == e_ssrFormat::ssrRtcmNew) {
|
|---|
| 341 | *out << " " << static_cast<int>(satPhaseBias._ssrFormat) << " "
|
|---|
| [11000] | 342 | << satPhaseBias._satYawInfoInd << " "
|
|---|
| 343 | << satPhaseBias._extPBPhaseInd << endl;
|
|---|
| [10999] | 344 | }
|
|---|
| [11000] | 345 | else {
|
|---|
| 346 | *out << " " << static_cast<int>(satPhaseBias._ssrFormat) << " "
|
|---|
| 347 | << satPhaseBias._dispBiasConsistInd << " "
|
|---|
| 348 | << satPhaseBias._MelbWuebConsistInd << endl;
|
|---|
| 349 | }
|
|---|
| [6493] | 350 | }
|
|---|
| [11000] | 351 | if (satPhaseBias._ssrFormat == e_ssrFormat::ssrRtcmNew) {
|
|---|
| 352 | *out << satPhaseBias._prn.toString() << ' '
|
|---|
| 353 | << setw(12) << setprecision(8) << satPhaseBias._yaw * 180.0 / M_PI << ' '
|
|---|
| 354 | << setw(12) << setprecision(8) << satPhaseBias._yawRate * 180.0 / M_PI << " "
|
|---|
| 355 | << setw(2) << satPhaseBias._bias.size();
|
|---|
| 356 | for (unsigned ii = 0; ii < satPhaseBias._bias.size(); ii++) {
|
|---|
| 357 | const t_frqPhaseBias& frqPhaseBias = satPhaseBias._bias[ii];
|
|---|
| 358 | *out << " " << frqPhaseBias._rnxType2ch << ' '
|
|---|
| 359 | << setw(10) << setprecision(4) << frqPhaseBias._value << ' '
|
|---|
| 360 | << setw(3) << frqPhaseBias._fixIndicator << ' '
|
|---|
| 361 | << setw(3) << frqPhaseBias._fixWideLaneIndicator << ' '
|
|---|
| 362 | << setw(3) << frqPhaseBias._jumpCounter;
|
|---|
| 363 | }
|
|---|
| 364 | *out << endl;
|
|---|
| [6493] | 365 | }
|
|---|
| [11000] | 366 | else {
|
|---|
| 367 | *out << satPhaseBias._prn.toString() << ' '
|
|---|
| 368 | << setw(12) << setprecision(8) << satPhaseBias._yaw * 180.0 / M_PI << ' '
|
|---|
| 369 | << setw(12) << setprecision(8) << satPhaseBias._yawRate * 180.0 / M_PI << " "
|
|---|
| 370 | << setw(2) << satPhaseBias._bias.size();
|
|---|
| 371 | for (unsigned ii = 0; ii < satPhaseBias._bias.size(); ii++) {
|
|---|
| 372 | const t_frqPhaseBias& frqPhaseBias = satPhaseBias._bias[ii];
|
|---|
| 373 | *out << " " << frqPhaseBias._rnxType2ch << ' '
|
|---|
| 374 | << setw(10) << setprecision(4) << frqPhaseBias._value << ' '
|
|---|
| 375 | << setw(3) << frqPhaseBias._fixIndicator << ' '
|
|---|
| 376 | << setw(3) << frqPhaseBias._fixWideLaneIndicator << ' '
|
|---|
| 377 | << setw(3) << frqPhaseBias._jumpCounter;
|
|---|
| 378 | }
|
|---|
| 379 | *out << endl;
|
|---|
| 380 | }
|
|---|
| [6493] | 381 | }
|
|---|
| 382 | out->flush();
|
|---|
| [6481] | 383 | }
|
|---|
| [8483] | 384 |
|
|---|
| 385 | //
|
|---|
| [6481] | 386 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 387 | void t_satPhaseBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satPhaseBias>& biasList) {
|
|---|
| [11000] | 388 | bncTime epoTime;
|
|---|
| [6556] | 389 | unsigned int updateInt;
|
|---|
| [11000] | 390 | int numSat;
|
|---|
| 391 | string staID;
|
|---|
| [10999] | 392 | unsigned int metadata1;
|
|---|
| 393 | unsigned int metadata2;
|
|---|
| [11000] | 394 | e_ssrFormat ssrFormat = ssrUnknown;
|
|---|
| [6556] | 395 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numSat, staID) != t_corrSSR::phaseBias) {
|
|---|
| [6506] | 396 | return;
|
|---|
| 397 | }
|
|---|
| [11047] | 398 | int ssrIOD, ssrProviderID;
|
|---|
| 399 | t_corrSSR::readSsrIOD(epoLine, ssrIOD, ssrProviderID);
|
|---|
| [6859] | 400 | for (int ii = 0; ii <= numSat; ii++) {
|
|---|
| [6506] | 401 | t_satPhaseBias satPhaseBias;
|
|---|
| [11000] | 402 | satPhaseBias._time = epoTime;
|
|---|
| [6556] | 403 | satPhaseBias._updateInt = updateInt;
|
|---|
| [11000] | 404 | satPhaseBias._staID = staID;
|
|---|
| [11047] | 405 | satPhaseBias._ssrIOD = ssrIOD;
|
|---|
| 406 | satPhaseBias._ssrProviderID = ssrProviderID;
|
|---|
| [6506] | 407 |
|
|---|
| 408 | string line;
|
|---|
| [6507] | 409 | getline(inStream, line);
|
|---|
| [6506] | 410 | istringstream in(line.c_str());
|
|---|
| [6857] | 411 |
|
|---|
| [6859] | 412 | if (ii == 0) {
|
|---|
| [10998] | 413 | int ssrFormatInt = 0;
|
|---|
| [10999] | 414 | in >> ssrFormatInt >> metadata1 >> metadata2;
|
|---|
| [10998] | 415 | ssrFormat = static_cast<e_ssrFormat>(ssrFormatInt);
|
|---|
| [6859] | 416 | continue;
|
|---|
| 417 | }
|
|---|
| [10998] | 418 | satPhaseBias._ssrFormat = ssrFormat;
|
|---|
| [11000] | 419 | switch (ssrFormat) {
|
|---|
| 420 | case e_ssrFormat::ssrRtcmNew:
|
|---|
| [11047] | 421 | satPhaseBias._satYawInfoInd = metadata1;
|
|---|
| 422 | satPhaseBias._extPBPhaseInd = metadata2;
|
|---|
| [11000] | 423 | break;
|
|---|
| 424 | case e_ssrFormat::ssrRtcmOld:
|
|---|
| 425 | case e_ssrFormat::ssrUnknown:
|
|---|
| [11047] | 426 | satPhaseBias._dispBiasConsistInd = metadata1;
|
|---|
| 427 | satPhaseBias._MelbWuebConsistInd = metadata2;
|
|---|
| [11000] | 428 | break;
|
|---|
| [10999] | 429 | }
|
|---|
| [6567] | 430 | int numBias;
|
|---|
| [8617] | 431 | double yawDeg, yawDegRate;
|
|---|
| [11000] | 432 | in >> satPhaseBias._prn >> yawDeg >> yawDegRate >> numBias;
|
|---|
| [8617] | 433 | satPhaseBias._yaw = yawDeg * M_PI / 180.0;
|
|---|
| 434 | satPhaseBias._yawRate = yawDegRate * M_PI / 180.0;
|
|---|
| [6506] | 435 |
|
|---|
| [10599] | 436 | char sys = satPhaseBias._prn.system();
|
|---|
| [11000] | 437 | int num = satPhaseBias._prn.number();
|
|---|
| [10599] | 438 | int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
|
|---|
| 439 | satPhaseBias._prn.setFlag(flag);
|
|---|
| 440 |
|
|---|
| [6506] | 441 | while (in.good()) {
|
|---|
| 442 | t_frqPhaseBias frqPhaseBias;
|
|---|
| [11000] | 443 | in >> frqPhaseBias._rnxType2ch >> frqPhaseBias._value >> frqPhaseBias._fixIndicator >> frqPhaseBias._fixWideLaneIndicator >> frqPhaseBias._jumpCounter;
|
|---|
| [6506] | 444 | if (!frqPhaseBias._rnxType2ch.empty()) {
|
|---|
| 445 | satPhaseBias._bias.push_back(frqPhaseBias);
|
|---|
| 446 | }
|
|---|
| 447 | }
|
|---|
| 448 |
|
|---|
| 449 | biasList.push_back(satPhaseBias);
|
|---|
| 450 | }
|
|---|
| [6481] | 451 | }
|
|---|
| [6482] | 452 |
|
|---|
| [8483] | 453 | //
|
|---|
| [6482] | 454 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 455 | void t_vTec::write(ostream* out, const t_vTec& vTec) {
|
|---|
| [6493] | 456 | if (!out || vTec._layers.size() == 0) {
|
|---|
| 457 | return;
|
|---|
| 458 | }
|
|---|
| 459 | out->setf(ios::fixed);
|
|---|
| 460 | bncTime epoTime = vTec._time;
|
|---|
| [11000] | 461 | *out << "> VTEC " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 462 | << vTec._updateInt << " "
|
|---|
| 463 | << vTec._layers.size() << ' ' << vTec._staID << endl;
|
|---|
| [6495] | 464 | for (unsigned ii = 0; ii < vTec._layers.size(); ii++) {
|
|---|
| 465 | const t_vTecLayer& layer = vTec._layers[ii];
|
|---|
| [11000] | 466 | *out << setw(2) << ii + 1 << ' '
|
|---|
| 467 | << setw(2) << layer._C.Nrows() - 1 << ' '
|
|---|
| 468 | << setw(2) << layer._C.Ncols() - 1 << ' '
|
|---|
| 469 | << setw(10) << setprecision(1) << layer._height << endl
|
|---|
| 470 | << setw(10) << setprecision(4) << layer._C
|
|---|
| 471 | << setw(10) << setprecision(4) << layer._S;
|
|---|
| [6495] | 472 | }
|
|---|
| [6493] | 473 | out->flush();
|
|---|
| [6482] | 474 | }
|
|---|
| 475 |
|
|---|
| [8483] | 476 | //
|
|---|
| [6482] | 477 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11007] | 478 | void t_vTec::read(const string& epoLine, istream& inStream, t_vTec& vTec) {
|
|---|
| [11000] | 479 | bncTime epoTime;
|
|---|
| [6556] | 480 | unsigned int updateInt;
|
|---|
| [11000] | 481 | int numLayers;
|
|---|
| 482 | string staID;
|
|---|
| [6556] | 483 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numLayers, staID) != t_corrSSR::vTec) {
|
|---|
| [6507] | 484 | return;
|
|---|
| 485 | }
|
|---|
| 486 | if (numLayers <= 0) {
|
|---|
| 487 | return;
|
|---|
| 488 | }
|
|---|
| [11000] | 489 | vTec._time = epoTime;
|
|---|
| [6556] | 490 | vTec._updateInt = updateInt;
|
|---|
| [11000] | 491 | vTec._staID = staID;
|
|---|
| [6507] | 492 | for (int ii = 0; ii < numLayers; ii++) {
|
|---|
| 493 | t_vTecLayer layer;
|
|---|
| 494 |
|
|---|
| 495 | string line;
|
|---|
| 496 | getline(inStream, line);
|
|---|
| 497 | istringstream in(line.c_str());
|
|---|
| 498 |
|
|---|
| 499 | int dummy, maxDeg, maxOrd;
|
|---|
| [6515] | 500 | in >> dummy >> maxDeg >> maxOrd >> layer._height;
|
|---|
| [6507] | 501 |
|
|---|
| [11000] | 502 | layer._C.ReSize(maxDeg + 1, maxOrd + 1);
|
|---|
| 503 | layer._S.ReSize(maxDeg + 1, maxOrd + 1);
|
|---|
| [6507] | 504 |
|
|---|
| [6878] | 505 | for (int iDeg = 0; iDeg <= maxDeg; iDeg++) {
|
|---|
| 506 | for (int iOrd = 0; iOrd <= maxOrd; iOrd++) {
|
|---|
| [6508] | 507 | inStream >> layer._C[iDeg][iOrd];
|
|---|
| 508 | }
|
|---|
| 509 | }
|
|---|
| [6878] | 510 | for (int iDeg = 0; iDeg <= maxDeg; iDeg++) {
|
|---|
| 511 | for (int iOrd = 0; iOrd <= maxOrd; iOrd++) {
|
|---|
| [6508] | 512 | inStream >> layer._S[iDeg][iOrd];
|
|---|
| 513 | }
|
|---|
| 514 | }
|
|---|
| [6507] | 515 |
|
|---|
| 516 | vTec._layers.push_back(layer);
|
|---|
| 517 | }
|
|---|
| [6482] | 518 | }
|
|---|
| [6498] | 519 |
|
|---|
| [8483] | 520 | //
|
|---|
| [6498] | 521 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11037] | 522 | void t_satAntenna::writeEpoch(ostream* out, const QList<t_satAntenna>& antList) {
|
|---|
| 523 | if (!out || antList.size() == 0) {
|
|---|
| 524 | return;
|
|---|
| 525 | }
|
|---|
| 526 | out->setf(ios::fixed);
|
|---|
| 527 | bncTime epoTime;
|
|---|
| 528 | QListIterator<t_satAntenna> it(antList);
|
|---|
| 529 | while (it.hasNext()) {
|
|---|
| 530 | const t_satAntenna& satAntenna = it.next();
|
|---|
| 531 | if (!epoTime.valid()) {
|
|---|
| 532 | epoTime = satAntenna._time;
|
|---|
| 533 | *out << "> SAT_ANTENNA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 534 | << 0 << " " << antList.size() << ' ' << satAntenna._staID << endl;
|
|---|
| 535 | }
|
|---|
| 536 | // header fields are genuinely per system (e.g. GPS/GLONASS/Galileo carry
|
|---|
| 537 | // different maximumOffNadirAngle), so they are written per satellite
|
|---|
| 538 | // rather than once per epoch like t_satPhaseBias's metadata line
|
|---|
| 539 | *out << satAntenna._prn.toString() << ' '
|
|---|
| 540 | << setw(4) << satAntenna._ssrProviderID << ' '
|
|---|
| 541 | << setw(2) << satAntenna._satelliteAntennaIOD << ' '
|
|---|
| 542 | << setw(1) << satAntenna._phaseCenterInfoInd << ' '
|
|---|
| 543 | << setw(1) << satAntenna._groupDelayInfoInd << ' '
|
|---|
| 544 | << setw(1) << satAntenna._nadirAngleDependentCorrInd << ' '
|
|---|
| 545 | << setw(2) << satAntenna._maximumOffNadirAngle << ' '
|
|---|
| 546 | << setw(2) << satAntenna._nadirAngleRangeExtension << " "
|
|---|
| 547 | << setw(2) << satAntenna._freq.size();
|
|---|
| 548 | for (unsigned ii = 0; ii < satAntenna._freq.size(); ii++) {
|
|---|
| 549 | const t_frqAntenna& frqAntenna = satAntenna._freq[ii];
|
|---|
| [11041] | 550 | *out << " " << frqAntenna._frqType << ' '
|
|---|
| [11037] | 551 | << frqAntenna._nadirCorrectionIndicator << ' '
|
|---|
| 552 | << setw(10) << setprecision(4) << frqAntenna._nadirCorrection;
|
|---|
| 553 | for (unsigned jj = 0; jj < frqAntenna._nadirAngleCorrection.size(); jj++) {
|
|---|
| 554 | *out << ' ' << setw(9) << setprecision(4) << frqAntenna._nadirAngleCorrection[jj];
|
|---|
| 555 | }
|
|---|
| 556 | }
|
|---|
| 557 | *out << endl;
|
|---|
| 558 | }
|
|---|
| 559 | out->flush();
|
|---|
| 560 | }
|
|---|
| 561 |
|
|---|
| 562 | //
|
|---|
| 563 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 564 | void t_satAntenna::readEpoch(const string& epoLine, istream& inStream, QList<t_satAntenna>& antList) {
|
|---|
| 565 | bncTime epoTime;
|
|---|
| 566 | unsigned int updateInt;
|
|---|
| 567 | int numSat;
|
|---|
| 568 | string staID;
|
|---|
| 569 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numSat, staID) != t_corrSSR::satAntenna) {
|
|---|
| 570 | return;
|
|---|
| 571 | }
|
|---|
| 572 | for (int ii = 0; ii < numSat; ii++) {
|
|---|
| 573 | t_satAntenna satAntenna;
|
|---|
| 574 | satAntenna._time = epoTime;
|
|---|
| 575 | satAntenna._staID = staID;
|
|---|
| 576 |
|
|---|
| 577 | string line;
|
|---|
| 578 | getline(inStream, line);
|
|---|
| 579 | istringstream in(line.c_str());
|
|---|
| 580 |
|
|---|
| 581 | int numFreq;
|
|---|
| 582 | in >> satAntenna._prn
|
|---|
| 583 | >> satAntenna._ssrProviderID
|
|---|
| 584 | >> satAntenna._satelliteAntennaIOD
|
|---|
| 585 | >> satAntenna._phaseCenterInfoInd
|
|---|
| 586 | >> satAntenna._groupDelayInfoInd
|
|---|
| 587 | >> satAntenna._nadirAngleDependentCorrInd
|
|---|
| 588 | >> satAntenna._maximumOffNadirAngle
|
|---|
| 589 | >> satAntenna._nadirAngleRangeExtension
|
|---|
| 590 | >> numFreq;
|
|---|
| 591 |
|
|---|
| 592 | char sys = satAntenna._prn.system();
|
|---|
| 593 | int num = satAntenna._prn.number();
|
|---|
| 594 | int flag = t_corrSSR::getSsrNavTypeFlag(sys, num);
|
|---|
| 595 | satAntenna._prn.setFlag(flag);
|
|---|
| 596 |
|
|---|
| 597 | unsigned int numAngles = satAntenna._nadirAngleDependentCorrInd ?
|
|---|
| 598 | satAntenna._maximumOffNadirAngle + 1 : 0;
|
|---|
| 599 |
|
|---|
| 600 | for (int jj = 0; jj < numFreq; jj++) {
|
|---|
| 601 | t_frqAntenna frqAntenna;
|
|---|
| [11041] | 602 | in >> frqAntenna._frqType >> frqAntenna._nadirCorrectionIndicator >> frqAntenna._nadirCorrection;
|
|---|
| [11037] | 603 | for (unsigned kk = 0; kk < numAngles; kk++) {
|
|---|
| [11047] | 604 | string valStr; // may be "nan" (invalid value), which operator>> can't parse
|
|---|
| 605 | in >> valStr;
|
|---|
| 606 | frqAntenna._nadirAngleCorrection.push_back(strtod(valStr.c_str(), 0));
|
|---|
| [11037] | 607 | }
|
|---|
| 608 | satAntenna._freq.push_back(frqAntenna);
|
|---|
| 609 | }
|
|---|
| 610 |
|
|---|
| 611 | antList.push_back(satAntenna);
|
|---|
| 612 | }
|
|---|
| 613 | }
|
|---|
| 614 |
|
|---|
| 615 | //
|
|---|
| 616 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [11008] | 617 | void t_metaData::write(ostream* out, const t_metaData& md) {
|
|---|
| 618 | if (!out || md._entries.size() == 0) {
|
|---|
| 619 | return;
|
|---|
| 620 | }
|
|---|
| 621 | out->setf(ios::fixed);
|
|---|
| 622 | bncTime epoTime = md._time;
|
|---|
| 623 | *out << "> META_DATA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1, ' ') << " "
|
|---|
| 624 | << 0 << " " << md._entries.size() << ' ' << md._staID << endl;
|
|---|
| 625 | *out << md._ssrIOD << ' ' << md._providerID << ' ' << md._solutionID << endl;
|
|---|
| 626 | for (unsigned ii = 0; ii < md._entries.size(); ii++) {
|
|---|
| 627 | const t_metaDataEntry& entry = md._entries[ii];
|
|---|
| 628 | *out << setw(2) << entry._typeIndicator << ' '
|
|---|
| 629 | << setw(1) << entry._applicationIndicator << ' '
|
|---|
| 630 | << setw(1) << entry._nonDefaultIndicator << ' '
|
|---|
| 631 | << setw(2) << entry._nonDefaultIdentifier << ' '
|
|---|
| 632 | << setw(1) << entry._dataIODIndicator << ' '
|
|---|
| 633 | << setw(3) << entry._dataIOD << endl;
|
|---|
| 634 | }
|
|---|
| 635 | out->flush();
|
|---|
| 636 | }
|
|---|
| 637 |
|
|---|
| 638 | //
|
|---|
| 639 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 640 | void t_metaData::read(const string& epoLine, istream& inStream, t_metaData& md) {
|
|---|
| 641 | bncTime epoTime;
|
|---|
| 642 | unsigned int updateInt;
|
|---|
| 643 | int numEntries;
|
|---|
| 644 | string staID;
|
|---|
| 645 | if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numEntries, staID) != t_corrSSR::metaData) {
|
|---|
| 646 | return;
|
|---|
| 647 | }
|
|---|
| 648 | if (numEntries <= 0) {
|
|---|
| 649 | return;
|
|---|
| 650 | }
|
|---|
| 651 | md._time = epoTime;
|
|---|
| 652 | md._staID = staID;
|
|---|
| 653 |
|
|---|
| 654 | string line;
|
|---|
| 655 | getline(inStream, line);
|
|---|
| 656 | istringstream inHdr(line.c_str());
|
|---|
| 657 | inHdr >> md._ssrIOD >> md._providerID >> md._solutionID;
|
|---|
| 658 |
|
|---|
| 659 | for (int ii = 0; ii < numEntries; ii++) {
|
|---|
| 660 | getline(inStream, line);
|
|---|
| 661 | istringstream in(line.c_str());
|
|---|
| 662 | t_metaDataEntry entry;
|
|---|
| 663 | in >> entry._typeIndicator >> entry._applicationIndicator >> entry._nonDefaultIndicator
|
|---|
| 664 | >> entry._nonDefaultIdentifier >> entry._dataIODIndicator >> entry._dataIOD;
|
|---|
| 665 | md._entries.push_back(entry);
|
|---|
| 666 | }
|
|---|
| 667 | }
|
|---|
| 668 |
|
|---|
| 669 | //
|
|---|
| 670 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| [8483] | 671 | t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime,
|
|---|
| [11000] | 672 | unsigned int& updateInt, int& numEntries,
|
|---|
| [11007] | 673 | string& staID) {
|
|---|
| [6498] | 674 |
|
|---|
| [6500] | 675 | istringstream inLine(line.c_str());
|
|---|
| 676 |
|
|---|
| [11000] | 677 | char epoChar;
|
|---|
| [6500] | 678 | string typeString;
|
|---|
| [11000] | 679 | int year, month, day, hour, min;
|
|---|
| [6500] | 680 | double sec;
|
|---|
| 681 |
|
|---|
| [11000] | 682 | inLine >> epoChar >> typeString >> year >> month >> day >> hour >> min >> sec >> updateInt >> numEntries >> staID;
|
|---|
| [6500] | 683 |
|
|---|
| 684 | if (epoChar == '>') {
|
|---|
| 685 | epoTime.set(year, month, day, hour, min, sec);
|
|---|
| [11000] | 686 | if (typeString == "CLOCK") {
|
|---|
| [6500] | 687 | return clkCorr;
|
|---|
| 688 | }
|
|---|
| 689 | else if (typeString == "ORBIT") {
|
|---|
| 690 | return orbCorr;
|
|---|
| 691 | }
|
|---|
| 692 | else if (typeString == "CODE_BIAS") {
|
|---|
| 693 | return codeBias;
|
|---|
| 694 | }
|
|---|
| 695 | else if (typeString == "PHASE_BIAS") {
|
|---|
| 696 | return phaseBias;
|
|---|
| 697 | }
|
|---|
| 698 | else if (typeString == "VTEC") {
|
|---|
| 699 | return vTec;
|
|---|
| 700 | }
|
|---|
| [8483] | 701 | else if (typeString == "URA") {
|
|---|
| 702 | return URA;
|
|---|
| 703 | }
|
|---|
| [11008] | 704 | else if (typeString == "META_DATA") {
|
|---|
| 705 | return metaData;
|
|---|
| 706 | }
|
|---|
| [11037] | 707 | else if (typeString == "SAT_ANTENNA") {
|
|---|
| 708 | return satAntenna;
|
|---|
| 709 | }
|
|---|
| [6500] | 710 | }
|
|---|
| 711 |
|
|---|
| 712 | return unknown;
|
|---|
| [6498] | 713 | }
|
|---|
| [10599] | 714 |
|
|---|
| [11047] | 715 | // Optional SSR IOD and Provider ID trailing the staID in CODE_BIAS and
|
|---|
| 716 | // PHASE_BIAS epoch lines (older files don't have them: -1 = unknown)
|
|---|
| 717 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 718 | void t_corrSSR::readSsrIOD(const string& line, int& ssrIOD, int& ssrProviderID) {
|
|---|
| 719 | istringstream inLine(line.c_str());
|
|---|
| 720 | string hlp;
|
|---|
| 721 | for (int ii = 0; ii < 11; ii++) { // '>', type, 6 x date/time, updateInt, numEntries, staID
|
|---|
| 722 | inLine >> hlp;
|
|---|
| 723 | }
|
|---|
| 724 | if (!(inLine >> ssrIOD >> ssrProviderID)) {
|
|---|
| 725 | ssrIOD = -1;
|
|---|
| 726 | ssrProviderID = -1;
|
|---|
| 727 | }
|
|---|
| 728 | }
|
|---|
| 729 |
|
|---|
| [10599] | 730 | // Set NAV type to force NAVtype usage according SSR standard
|
|---|
| 731 | /////////////////////////////////////////////////////////////
|
|---|
| [11007] | 732 | t_eph::e_type t_corrSSR::getSsrNavTypeFlag(char sys, int num) {
|
|---|
| [10599] | 733 |
|
|---|
| 734 | t_eph::e_type flag = t_eph::undefined;
|
|---|
| 735 |
|
|---|
| 736 | switch (sys) {
|
|---|
| [11000] | 737 | case 'G':
|
|---|
| 738 | case 'J':
|
|---|
| 739 | case 'I': // not part of the SSR standard
|
|---|
| 740 | flag = t_eph::LNAV;
|
|---|
| 741 | break;
|
|---|
| 742 | case 'R':
|
|---|
| 743 | flag = t_eph::FDMA_M;
|
|---|
| 744 | break;
|
|---|
| 745 | case 'E':
|
|---|
| 746 | flag = t_eph::INAV;
|
|---|
| 747 | break;
|
|---|
| 748 | case 'C':
|
|---|
| 749 | if (num < 6) { // GEO
|
|---|
| 750 | flag = t_eph::D2;
|
|---|
| 751 | }
|
|---|
| 752 | else if (num > 58 && num < 63) { // GEO
|
|---|
| 753 | flag = t_eph::D2;
|
|---|
| 754 | }
|
|---|
| 755 | else {
|
|---|
| 756 | flag = t_eph::D1;
|
|---|
| 757 | }
|
|---|
| 758 | break;
|
|---|
| 759 | case 'S':
|
|---|
| 760 | flag = t_eph::SBASL1;
|
|---|
| 761 | break;
|
|---|
| [10599] | 762 | }
|
|---|
| 763 |
|
|---|
| 764 | return flag;
|
|---|
| 765 | }
|
|---|