| [1025] | 1 | #ifndef EPHEMERIS_H
|
|---|
| 2 | #define EPHEMERIS_H
|
|---|
| 3 |
|
|---|
| [2221] | 4 | #include <newmat.h>
|
|---|
| [3174] | 5 | #include <QtCore>
|
|---|
| [1025] | 6 | #include <stdio.h>
|
|---|
| 7 | #include <string>
|
|---|
| [4018] | 8 | #include "bnctime.h"
|
|---|
| [5749] | 9 | #include "bncconst.h"
|
|---|
| [5776] | 10 | #include "t_prn.h"
|
|---|
| [6812] | 11 | #include "gnss.h"
|
|---|
| [6139] | 12 |
|
|---|
| [6141] | 13 | class t_orbCorr;
|
|---|
| 14 | class t_clkCorr;
|
|---|
| [5749] | 15 |
|
|---|
| [1025] | 16 | class t_eph {
|
|---|
| 17 | public:
|
|---|
| [10619] | 18 | enum e_system {unknown, GPS, QZSS, GLONASS, Galileo, SBAS, BDS, NavIC};
|
|---|
| [8215] | 19 | enum e_checkState {unchecked, ok, bad, outdated, unhealthy};
|
|---|
| [10599] | 20 | enum e_type {undefined, LNAV, FDMA, FDMA_M, FNAV, INAV, D1, D2, SBASL1, CNAV, CNV1, CNV2, CNV3, L1NV, L1OC, L3OC};
|
|---|
| [4005] | 21 |
|
|---|
| [5749] | 22 | t_eph();
|
|---|
| [7278] | 23 | virtual ~t_eph();
|
|---|
| [4018] | 24 |
|
|---|
| [10587] | 25 | virtual e_system system() const = 0;
|
|---|
| [4013] | 26 | virtual QString toString(double version) const = 0;
|
|---|
| [7169] | 27 | virtual unsigned int IOD() const = 0;
|
|---|
| [8187] | 28 | virtual unsigned int isUnhealthy() const = 0;
|
|---|
| [10577] | 29 | virtual int slotNum() const {return 0;}
|
|---|
| [4018] | 30 | bncTime TOC() const {return _TOC;}
|
|---|
| [6109] | 31 | bool isNewerThan(const t_eph* eph) const {return earlierTime(eph, this);}
|
|---|
| [10577] | 32 | void setCheckState(e_checkState checkState) {_checkState = checkState;}
|
|---|
| [6518] | 33 | e_checkState checkState() const {return _checkState;}
|
|---|
| [9673] | 34 | QString checkStateToString() {
|
|---|
| 35 | switch (_checkState) {
|
|---|
| [9765] | 36 | case unchecked: return "unchecked";
|
|---|
| 37 | case ok: return "ok";
|
|---|
| 38 | case bad: return "bad";
|
|---|
| 39 | case outdated: return "outdated";
|
|---|
| 40 | case unhealthy: return "unhealthy";
|
|---|
| 41 | default: return "unknown";
|
|---|
| [9673] | 42 | }
|
|---|
| 43 | }
|
|---|
| [10587] | 44 | e_type type() const {return _type;}
|
|---|
| [10603] | 45 | void setType(QString typeStr);
|
|---|
| [10599] | 46 | t_prn prn() const {return _prn;}
|
|---|
| [10577] | 47 | t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
|
|---|
| 48 | void setOrbCorr(const t_orbCorr* orbCorr);
|
|---|
| 49 | void setClkCorr(const t_clkCorr* clkCorr);
|
|---|
| [10954] | 50 | const t_orbCorr* orbCorr() const {return _orbCorr;}
|
|---|
| 51 | const t_clkCorr* clkCorr() const {return _clkCorr;}
|
|---|
| [3174] | 52 | const QDateTime& receptDateTime() const {return _receptDateTime;}
|
|---|
| [9212] | 53 | const QString receptStaID() const {return _receptStaID;}
|
|---|
| [6109] | 54 | static QString rinexDateStr(const bncTime& tt, const t_prn& prn, double version);
|
|---|
| 55 | static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version);
|
|---|
| [10587] | 56 | static QString typeStr(e_type type, const t_prn& prn, double version);
|
|---|
| [6109] | 57 | static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;}
|
|---|
| [8799] | 58 | static bool prnSort(const t_eph* eph1, const t_eph* eph2) {return eph1->prn() < eph2->prn();}
|
|---|
| [1025] | 59 |
|
|---|
| [7278] | 60 | protected:
|
|---|
| [6213] | 61 | virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0;
|
|---|
| [9765] | 62 | t_prn _prn;
|
|---|
| 63 | bncTime _TOC;
|
|---|
| 64 | QDateTime _receptDateTime;
|
|---|
| 65 | QString _receptStaID;
|
|---|
| 66 | e_checkState _checkState;
|
|---|
| [10587] | 67 | e_type _type; // defined in RINEX 4
|
|---|
| [9765] | 68 | t_orbCorr* _orbCorr;
|
|---|
| 69 | t_clkCorr* _clkCorr;
|
|---|
| [1025] | 70 | };
|
|---|
| 71 |
|
|---|
| 72 | class t_ephGPS : public t_eph {
|
|---|
| [5852] | 73 | friend class t_ephEncoder;
|
|---|
| [6812] | 74 | friend class RTCM3Decoder;
|
|---|
| [1025] | 75 | public:
|
|---|
| [7625] | 76 | t_ephGPS() {
|
|---|
| [10899] | 77 | _clock_bias = 0.0;
|
|---|
| 78 | _clock_drift = 0.0;
|
|---|
| 79 | _clock_driftrate = 0.0;
|
|---|
| 80 | _IODE = 0.0;
|
|---|
| 81 | _Crs = 0.0;
|
|---|
| 82 | _Delta_n = 0.0;
|
|---|
| 83 | _M0 = 0.0;
|
|---|
| 84 | _Cuc = 0.0;
|
|---|
| 85 | _e = 0.0;
|
|---|
| 86 | _Cus = 0.0;
|
|---|
| 87 | _sqrt_A = 0.0;
|
|---|
| 88 | _TOEsec = 0.0;
|
|---|
| 89 | _Cic = 0.0;
|
|---|
| 90 | _OMEGA0 = 0.0;
|
|---|
| 91 | _Cis = 0.0;
|
|---|
| 92 | _i0 = 0.0;
|
|---|
| 93 | _Crc = 0.0;
|
|---|
| 94 | _omega = 0.0;
|
|---|
| 95 | _OMEGADOT = 0.0;
|
|---|
| 96 | _IDOT = 0.0;
|
|---|
| 97 | _L2Codes = 0.0;
|
|---|
| 98 | _TOEweek = 0.0;
|
|---|
| 99 | _L2PFlag = 0.0;
|
|---|
| 100 | _ura = 0.0;
|
|---|
| 101 | _health = 0.0;
|
|---|
| 102 | _TGD = 0.0;
|
|---|
| 103 | _IODC = 0.0;
|
|---|
| 104 | _TOT = 0.0;
|
|---|
| 105 | _fitInterval = 0.0;
|
|---|
| 106 | _ADOT = 0.0;
|
|---|
| 107 | _top = 0.0;
|
|---|
| 108 | _Delta_n_dot = 0.0;
|
|---|
| 109 | _URAI = 0.0;
|
|---|
| 110 | _URAI_NED0 = 0.0;
|
|---|
| 111 | _URAI_NED1 = 0.0;
|
|---|
| 112 | _URAI_NED2 = 0.0;
|
|---|
| 113 | _URAI_ED = 0.0;
|
|---|
| 114 | _ISC_L1CA = 0.0;
|
|---|
| 115 | _ISC_L2C = 0.0;
|
|---|
| 116 | _ISC_L5I5 = 0.0;
|
|---|
| 117 | _ISC_L5Q5 = 0.0;
|
|---|
| 118 | _ISC_L1Cd = 0.0;
|
|---|
| 119 | _ISC_L1Cp = 0.0;
|
|---|
| 120 | _RSF = 0.0;
|
|---|
| 121 | _ISC_S = 0.0;
|
|---|
| 122 | _ISC_L1D = 0.0;
|
|---|
| 123 | _ISC_L1P = 0.0;
|
|---|
| 124 | _wnop = 0.0;
|
|---|
| 125 | _flags_unknown = true;
|
|---|
| 126 | _intSF = 0.0;
|
|---|
| 127 | _ephSF = 0.0;
|
|---|
| 128 | _L2Cphasing = 0.0;
|
|---|
| 129 | _alert = 0.0;
|
|---|
| 130 | _s_bits_after_IDOT = 0.0;
|
|---|
| 131 | _s_bits_after_i0 = 0.0;
|
|---|
| 132 | _receptStaID = "";
|
|---|
| [7625] | 133 | }
|
|---|
| [10603] | 134 | t_ephGPS(double rnxVersion, const QStringList& lines, const QString typeStr);
|
|---|
| [2221] | 135 | virtual ~t_ephGPS() {}
|
|---|
| [4005] | 136 |
|
|---|
| [10587] | 137 | virtual e_system system() const {
|
|---|
| [8168] | 138 | switch (_prn.system()) {
|
|---|
| 139 | case 'J':
|
|---|
| 140 | return t_eph::QZSS;
|
|---|
| 141 | case 'I':
|
|---|
| [10619] | 142 | return t_eph::NavIC;
|
|---|
| [8168] | 143 | };
|
|---|
| 144 | return t_eph::GPS;
|
|---|
| 145 | }
|
|---|
| [4013] | 146 | virtual QString toString(double version) const;
|
|---|
| [8139] | 147 | virtual unsigned int IOD() const { return static_cast<unsigned int>(_IODE); }
|
|---|
| [10628] | 148 | //virtual unsigned int isUnhealthy() const { return static_cast<unsigned int>(_health);}
|
|---|
| 149 | virtual unsigned int isUnhealthy() const;
|
|---|
| [4366] | 150 | double TGD() const {return _TGD;} // Timing Group Delay (P1-P2 DCB)
|
|---|
| 151 |
|
|---|
| [1025] | 152 | private:
|
|---|
| [6213] | 153 | virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
|
|---|
| [6109] | 154 |
|
|---|
| [7278] | 155 | double _clock_bias; // [s]
|
|---|
| 156 | double _clock_drift; // [s/s]
|
|---|
| [4018] | 157 | double _clock_driftrate; // [s/s^2]
|
|---|
| [1025] | 158 |
|
|---|
| [10619] | 159 | double _IODE; // IODEC in case of NavIC
|
|---|
| [7278] | 160 | double _Crs; // [m]
|
|---|
| [4018] | 161 | double _Delta_n; // [rad/s]
|
|---|
| [7278] | 162 | double _M0; // [rad]
|
|---|
| [1025] | 163 |
|
|---|
| [7278] | 164 | double _Cuc; // [rad]
|
|---|
| [9786] | 165 | double _e; // []
|
|---|
| [7278] | 166 | double _Cus; // [rad]
|
|---|
| [4018] | 167 | double _sqrt_A; // [m^0.5]
|
|---|
| [1025] | 168 |
|
|---|
| [9786] | 169 | double _TOEsec; // [s of GPS week]
|
|---|
| [7278] | 170 | double _Cic; // [rad]
|
|---|
| 171 | double _OMEGA0; // [rad]
|
|---|
| 172 | double _Cis; // [rad]
|
|---|
| [4018] | 173 |
|
|---|
| [7278] | 174 | double _i0; // [rad]
|
|---|
| 175 | double _Crc; // [m]
|
|---|
| 176 | double _omega; // [rad]
|
|---|
| [4018] | 177 | double _OMEGADOT; // [rad/s]
|
|---|
| 178 |
|
|---|
| 179 | double _IDOT; // [rad/s]
|
|---|
| [10619] | 180 | double _L2Codes; // Codes on L2 channel (not valid for NavIC)
|
|---|
| [9786] | 181 | double _TOEweek; // GPS week # to go with TOE, cont. number, not mode 1024
|
|---|
| [10619] | 182 | double _L2PFlag; // L2 P data flag (not valid for NavIC and QZSS)
|
|---|
| [4018] | 183 |
|
|---|
| [9316] | 184 | mutable double _ura; // SV accuracy [m]
|
|---|
| [4018] | 185 | double _health; // SV health
|
|---|
| [7278] | 186 | double _TGD; // [s]
|
|---|
| [10619] | 187 | double _IODC; // (not valid for NavIC)
|
|---|
| [4018] | 188 |
|
|---|
| [8790] | 189 | double _TOT; // Transmission time
|
|---|
| [10619] | 190 | double _fitInterval; // Fit interval in hours (not valid for NavIC)
|
|---|
| [9786] | 191 |
|
|---|
| 192 | double _ADOT; // [m/s]
|
|---|
| 193 | double _top; // [s]
|
|---|
| [9788] | 194 | double _Delta_n_dot; // [rad/s^2]
|
|---|
| [9786] | 195 |
|
|---|
| [10577] | 196 | double _URAI; // [] user range accuracy index
|
|---|
| [9786] | 197 | double _URAI_NED0; // []
|
|---|
| 198 | double _URAI_NED1; // []
|
|---|
| 199 | double _URAI_NED2; // []
|
|---|
| 200 | double _URAI_ED; // []
|
|---|
| 201 |
|
|---|
| [10577] | 202 | double _ISC_L1CA; // [s] inter signal correction
|
|---|
| [9786] | 203 | double _ISC_L2C; // [s]
|
|---|
| 204 | double _ISC_L5I5; // [s]
|
|---|
| 205 | double _ISC_L5Q5; // [s]
|
|---|
| 206 | double _ISC_L1Cd; // [s]
|
|---|
| 207 | double _ISC_L1Cp; // [s]
|
|---|
| 208 |
|
|---|
| [10619] | 209 | double _RSF; // [-] Reference Signal Flag for NavIC
|
|---|
| [10577] | 210 | double _ISC_S; // [s]
|
|---|
| 211 | double _ISC_L1D; // [s]
|
|---|
| 212 | double _ISC_L1P; // [s]
|
|---|
| 213 |
|
|---|
| [10587] | 214 | bool _flags_unknown; // [-] status flags are unknown => BNK; fitInterval LNAV from QZSS or GPS
|
|---|
| 215 | double _intSF; // [-] integrity status flag
|
|---|
| 216 | double _ephSF; // [-] ephemeris status flag (QZSS)
|
|---|
| 217 | double _L2Cphasing; // [-] L2C phasing flag
|
|---|
| 218 | double _alert; // [-] alert flag
|
|---|
| [10899] | 219 | double _s_bits_after_IDOT;// [-] spare bits after IDOT for NavIC
|
|---|
| 220 | double _s_bits_after_i0; // [-] spare bits after I0 for NavIC
|
|---|
| [10577] | 221 |
|
|---|
| 222 | double _wnop; // GPS continuous week number with the ambiguity resolved (same as _TOEweek?)
|
|---|
| [1025] | 223 | };
|
|---|
| 224 |
|
|---|
| [2221] | 225 | class t_ephGlo : public t_eph {
|
|---|
| [5853] | 226 | friend class t_ephEncoder;
|
|---|
| [6812] | 227 | friend class RTCM3Decoder;
|
|---|
| [2221] | 228 | public:
|
|---|
| [7625] | 229 | t_ephGlo() {
|
|---|
| [10587] | 230 | _xv.ReSize(6);
|
|---|
| 231 | _xv = 0.0;
|
|---|
| 232 | _gps_utc = 0.0;
|
|---|
| 233 | _tau = 0.0;
|
|---|
| 234 | _tau1 = 0.0;
|
|---|
| 235 | _tau2 = 0.0;
|
|---|
| 236 | _tauC = 0.0;
|
|---|
| 237 | _Tin = 0.0;
|
|---|
| 238 | _gamma = 0.0;
|
|---|
| 239 | _tki = 0.0;
|
|---|
| 240 | _x_pos = 0.0;
|
|---|
| 241 | _x_vel = 0.0;
|
|---|
| 242 | _x_acc = 0.0;
|
|---|
| 243 | _health = 0.0;
|
|---|
| 244 | _y_pos = 0.0;
|
|---|
| 245 | _y_vel = 0.0;
|
|---|
| 246 | _y_acc = 0.0;
|
|---|
| 247 | _frq_num = 0.0;
|
|---|
| 248 | _z_pos = 0.0;
|
|---|
| 249 | _z_vel = 0.0;
|
|---|
| 250 | _z_acc = 0.0;
|
|---|
| 251 | _E = 0.0;
|
|---|
| 252 | _EE = 0.0;
|
|---|
| 253 | _ET = 0.0;
|
|---|
| 254 | _RE = 0.0;
|
|---|
| 255 | _RT = 0.0;
|
|---|
| 256 | _P1 = 0.0;
|
|---|
| 257 | _P2 = 0.0;
|
|---|
| 258 | _P3 = 0.0;
|
|---|
| 259 | _M_M = 0.0;
|
|---|
| 260 | _M_FE = 0.0;
|
|---|
| 261 | _M_FT = 0.0;
|
|---|
| 262 | _M_l3 = 0.0;
|
|---|
| 263 | _M_l5 = 0.0;
|
|---|
| 264 | _M_NA = 0.0;
|
|---|
| 265 | _M_NT = 0.0;
|
|---|
| 266 | _M_N4 = 0.0;
|
|---|
| 267 | _M_P = 0.0;
|
|---|
| 268 | _M_P4 = 0.0;
|
|---|
| 269 | _X_PC = 0.0;
|
|---|
| 270 | _Y_PC = 0.0;
|
|---|
| 271 | _Z_PC = 0.0;
|
|---|
| 272 | _TOT = 0.0;
|
|---|
| 273 | _yaw = 0.0;
|
|---|
| 274 | _sn = 0.0;
|
|---|
| 275 | _sat_type = 0.0;
|
|---|
| 276 | _TGD_L2OCp = 0.0;
|
|---|
| 277 | _TGD_L3OCp = 0.0;
|
|---|
| 278 | _M_tau_GPS = 0.0;
|
|---|
| 279 | _M_delta_tau = 0.0;
|
|---|
| 280 | _attitude_P2 = 0.0;
|
|---|
| 281 | _angular_rate = 0.0;
|
|---|
| 282 | _angular_acc = 0.0;
|
|---|
| 283 | _angular_rate_max = 0.0;
|
|---|
| 284 | _data_validity = 0;
|
|---|
| [10614] | 285 | _healthflags_unknown = true;
|
|---|
| 286 | _statusflags_unknown = true;
|
|---|
| [10587] | 287 | _almanac_health = 0.0;
|
|---|
| [8182] | 288 | _almanac_health_availablility_indicator = 0.0;
|
|---|
| 289 | _additional_data_availability = 0.0;
|
|---|
| [10587] | 290 |
|
|---|
| [7625] | 291 | }
|
|---|
| [10603] | 292 | t_ephGlo(double rnxVersion, const QStringList& lines, const QString typeStr);
|
|---|
| [2221] | 293 | virtual ~t_ephGlo() {}
|
|---|
| 294 |
|
|---|
| [10587] | 295 | virtual e_system system() const {return t_eph::GLONASS;}
|
|---|
| [4013] | 296 | virtual QString toString(double version) const;
|
|---|
| [7169] | 297 | virtual unsigned int IOD() const;
|
|---|
| [8187] | 298 | virtual unsigned int isUnhealthy() const;
|
|---|
| [10587] | 299 | virtual int slotNum() const {return int(_frq_num);}
|
|---|
| [10599] | 300 | virtual bool validMdata() const {return (_M_M ? true : false);}
|
|---|
| [2221] | 301 | private:
|
|---|
| [6213] | 302 | virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
|
|---|
| [6109] | 303 | static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc);
|
|---|
| [2221] | 304 |
|
|---|
| [10599] | 305 | mutable bncTime _tt; // time
|
|---|
| 306 | mutable ColumnVector _xv; // status vector (position, velocity) at time _tt
|
|---|
| [2221] | 307 |
|
|---|
| [10587] | 308 | double _gps_utc; // [s]
|
|---|
| 309 | double _tau; // [s]
|
|---|
| 310 | double _tau1; // [s]
|
|---|
| 311 | double _tau2; // [s]
|
|---|
| 312 | double _tauC; // GLONASS time scale correction to UTC(SU) [sec]
|
|---|
| 313 | double _Tin; // sec of day UTC(SU) [s]
|
|---|
| [4018] | 314 |
|
|---|
| [10587] | 315 | double _gamma; // [-]
|
|---|
| 316 | mutable double _tki; // message frame time
|
|---|
| [4018] | 317 |
|
|---|
| [10587] | 318 | double _x_pos; // [km]
|
|---|
| 319 | double _x_vel; // [km/s]
|
|---|
| 320 | double _x_acc; // [km/s^2]
|
|---|
| 321 | double _health; // 0 = OK. MSB of Bn word
|
|---|
| [4018] | 322 |
|
|---|
| [10587] | 323 | double _y_pos; // [km]
|
|---|
| 324 | double _y_vel; // [km/s]
|
|---|
| 325 | double _y_acc; // [km/s^2]
|
|---|
| 326 | double _frq_num; // ICD-GLONASS data position
|
|---|
| [8182] | 327 |
|
|---|
| [10587] | 328 | double _z_pos; // [km]
|
|---|
| 329 | double _z_vel; // [km/s]
|
|---|
| 330 | double _z_acc; // [km/s^2]
|
|---|
| [8182] | 331 |
|
|---|
| [10587] | 332 | double _E; // Age of current Information [days]
|
|---|
| 333 | double _EE; // Age Of Data eph [days]
|
|---|
| 334 | double _ET; // Age Of Data clk [days]
|
|---|
| [8182] | 335 |
|
|---|
| [10587] | 336 | double _TGD_L2OCp; // [sec]
|
|---|
| 337 | double _TGD_L3OCp; // [sec]
|
|---|
| 338 |
|
|---|
| 339 | double _almanac_health ; // almanac health bit; 1 = healthy, 1 = not healthy
|
|---|
| 340 | double _almanac_health_availablility_indicator; // 1 = reported in eph record, 0 = not reported
|
|---|
| 341 | double _additional_data_availability;
|
|---|
| 342 |
|
|---|
| 343 | double _sat_type; // 0 = GLO_SAT, 1 = GLO_SAT_M (M type), 2 = GLO_SAT_K (K type)
|
|---|
| 344 | double _RE; // source flags; 01 = relay; 10 = prediction (propagation), 11 = use of inter-satellite measurements
|
|---|
| 345 | double _RT; // source flags; 01 = relay, 10 = prediction (propagation), 11 = use of inter-satellite measurements
|
|---|
| 346 |
|
|---|
| 347 | double _P1; // update and validity interval [-]; 00 = 0 min, 01 = 30 min, 10 ) 45 min, 11 = 60 min
|
|---|
| 348 | double _P2; // flag of oddness or evenness of the value of tb for intervals 30 or 60 minutes [-]
|
|---|
| 349 | double _P3; // flag indicating a number of satellites for which almanac is transmitted within given frame [-]
|
|---|
| 350 |
|
|---|
| 351 | double _M_M; // type of satellite transmitting navigation signal: 0 = GLONASS, 1 = GLONASS-M/K satellite [-]
|
|---|
| 352 | double _M_FE; // Indicator for predicted satellite User Range Accuracy (URAI_orb) [-]
|
|---|
| 353 | double _M_FT; // Indicator for predicted satellite User Range Accuracy (URAI_clk) [-]
|
|---|
| 354 | double _M_l3; // health bit on string 3 GLO-M/K only
|
|---|
| 355 | double _M_l5; // health flag
|
|---|
| 356 | double _M_NA; // calendar day number within the 4-year period [days]
|
|---|
| 357 | double _M_NT; // current date, calendar number of day within 4-year interval [days]
|
|---|
| 358 | double _M_N4; // 4-year interval number starting from 1996
|
|---|
| 359 | double _M_P; // control segment parameter that indicates the satellite operation mode with respect of time parameters
|
|---|
| 360 | double _M_P4; // flag to show that ephemeris parameters are present [-] GLO-M/K only
|
|---|
| 361 | double _M_tau_GPS; // correction to GPS time relative to GLONASS time [days]
|
|---|
| 362 | double _M_delta_tau; // [s]
|
|---|
| 363 |
|
|---|
| 364 | bool _statusflags_unknown;// status flags are unknown => BNK in RNX NAV file if message type is FDMA
|
|---|
| 365 | bool _healthflags_unknown;// health flags are unknown => BNK in RNX NAV file if message type is FDMA
|
|---|
| 366 | int _data_validity; // data validity; 0 = valid, 1 = invalid
|
|---|
| 367 |
|
|---|
| 368 | double _attitude_P2; // 0 = nominal yaw steering, 1 = rate-limited yaw maneuver
|
|---|
| 369 | double _yaw; // [rad]
|
|---|
| 370 | double _sn; // sign flag
|
|---|
| 371 | double _angular_rate; // [rad/sec]
|
|---|
| 372 | double _angular_rate_max; // [rad/sec]
|
|---|
| 373 | double _angular_acc; // [rad/sec^2]
|
|---|
| 374 |
|
|---|
| 375 | double _X_PC; // X PC coord [m] GLO manufacturer coordinate system
|
|---|
| 376 | double _Y_PC; // Y PC coord [m] GLO manufacturer coordinate system
|
|---|
| 377 | double _Z_PC; // Y PC coord [m] GLO manufacturer coordinate system
|
|---|
| 378 | double _TOT; // Time of transmission
|
|---|
| [2221] | 379 | };
|
|---|
| 380 |
|
|---|
| [2770] | 381 | class t_ephGal : public t_eph {
|
|---|
| [5853] | 382 | friend class t_ephEncoder;
|
|---|
| [6812] | 383 | friend class RTCM3Decoder;
|
|---|
| [2770] | 384 | public:
|
|---|
| [7625] | 385 | t_ephGal() {
|
|---|
| 386 | _clock_bias = 0.0;
|
|---|
| 387 | _clock_drift = 0.0;
|
|---|
| 388 | _clock_driftrate = 0.0;
|
|---|
| 389 | _IODnav = 0.0;
|
|---|
| 390 | _Crs = 0.0;
|
|---|
| 391 | _Delta_n = 0.0;
|
|---|
| 392 | _M0 = 0.0;
|
|---|
| 393 | _Cuc = 0.0;
|
|---|
| 394 | _e = 0.0;
|
|---|
| 395 | _Cus = 0.0;
|
|---|
| 396 | _sqrt_A = 0.0;
|
|---|
| 397 | _TOEsec = 0.0;
|
|---|
| 398 | _Cic = 0.0;
|
|---|
| 399 | _OMEGA0 = 0.0;
|
|---|
| 400 | _Cis = 0.0;
|
|---|
| 401 | _i0 = 0.0;
|
|---|
| 402 | _Crc = 0.0;
|
|---|
| 403 | _omega = 0.0;
|
|---|
| 404 | _OMEGADOT = 0.0;
|
|---|
| 405 | _IDOT = 0.0;
|
|---|
| 406 | _TOEweek = 0.0;
|
|---|
| 407 | _SISA = 0.0;
|
|---|
| [10587] | 408 | _E5a_HS = 0.0;
|
|---|
| 409 | _E5b_HS = 0.0;
|
|---|
| 410 | _E1B_HS = 0.0;
|
|---|
| [7625] | 411 | _BGD_1_5A = 0.0;
|
|---|
| 412 | _BGD_1_5B = 0.0;
|
|---|
| 413 | _TOT = 0.0;
|
|---|
| [10579] | 414 | _inav = false;
|
|---|
| 415 | _fnav = false;
|
|---|
| [10587] | 416 | _E1B_DataInvalid = false;
|
|---|
| 417 | _E5a_DataInvalid = false;
|
|---|
| 418 | _E5b_DataInvalid = false;
|
|---|
| [9212] | 419 | _receptStaID = "";
|
|---|
| [7625] | 420 | };
|
|---|
| [10603] | 421 | t_ephGal(double rnxVersion, const QStringList& lines, const QString typeStr);
|
|---|
| [2770] | 422 | virtual ~t_ephGal() {}
|
|---|
| [4005] | 423 |
|
|---|
| [4013] | 424 | virtual QString toString(double version) const;
|
|---|
| [10587] | 425 | virtual e_system system() const {return t_eph::Galileo;}
|
|---|
| [7169] | 426 | virtual unsigned int IOD() const { return static_cast<unsigned long>(_IODnav); }
|
|---|
| [8187] | 427 | virtual unsigned int isUnhealthy() const;
|
|---|
| [2770] | 428 |
|
|---|
| [6109] | 429 | private:
|
|---|
| [6213] | 430 | virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
|
|---|
| [2770] | 431 |
|
|---|
| [7278] | 432 | double _clock_bias; // [s]
|
|---|
| 433 | double _clock_drift; // [s/s]
|
|---|
| [2770] | 434 | double _clock_driftrate; // [s/s^2]
|
|---|
| [4018] | 435 |
|
|---|
| [6812] | 436 | double _IODnav;
|
|---|
| [7278] | 437 | double _Crs; // [m]
|
|---|
| [2770] | 438 | double _Delta_n; // [rad/s]
|
|---|
| [7278] | 439 | double _M0; // [rad]
|
|---|
| [4018] | 440 |
|
|---|
| [7278] | 441 | double _Cuc; // [rad]
|
|---|
| 442 | double _e; //
|
|---|
| 443 | double _Cus; // [rad]
|
|---|
| [2770] | 444 | double _sqrt_A; // [m^0.5]
|
|---|
| [4018] | 445 |
|
|---|
| [7278] | 446 | double _TOEsec; // [s]
|
|---|
| 447 | double _Cic; // [rad]
|
|---|
| 448 | double _OMEGA0; // [rad]
|
|---|
| 449 | double _Cis; // [rad]
|
|---|
| [4018] | 450 |
|
|---|
| [7278] | 451 | double _i0; // [rad]
|
|---|
| 452 | double _Crc; // [m]
|
|---|
| 453 | double _omega; // [rad]
|
|---|
| [2770] | 454 | double _OMEGADOT; // [rad/s]
|
|---|
| [4018] | 455 |
|
|---|
| [2770] | 456 | double _IDOT; // [rad/s]
|
|---|
| [10587] | 457 | double _TOEweek; // [-]
|
|---|
| [4018] | 458 | // spare
|
|---|
| 459 |
|
|---|
| [6798] | 460 | mutable double _SISA; // Signal In Space Accuracy
|
|---|
| [10587] | 461 | double _E5a_HS; // [0..3] E5a Health Status
|
|---|
| 462 | double _E5b_HS; // [0..3] E5b Health Status
|
|---|
| 463 | double _E1B_HS; // [0..3] E1B Health Status
|
|---|
| [7278] | 464 | double _BGD_1_5A; // group delay [s]
|
|---|
| 465 | double _BGD_1_5B; // group delay [s]
|
|---|
| [2770] | 466 |
|
|---|
| [6809] | 467 | double _TOT; // [s]
|
|---|
| [10579] | 468 | bool _inav; // Data comes from I/NAV when <code>true</code>
|
|---|
| 469 | bool _fnav; // Data comes from F/NAV when <code>true</code>
|
|---|
| [10587] | 470 | bool _E1B_DataInvalid; // E1B Data is not valid
|
|---|
| 471 | bool _E5a_DataInvalid; // E5a Data is not valid
|
|---|
| 472 | bool _E5b_DataInvalid; // E5b Data is not valid
|
|---|
| [2770] | 473 | };
|
|---|
| 474 |
|
|---|
| [6380] | 475 | class t_ephSBAS : public t_eph {
|
|---|
| 476 | friend class t_ephEncoder;
|
|---|
| [6812] | 477 | friend class RTCM3Decoder;
|
|---|
| [6380] | 478 | public:
|
|---|
| [7625] | 479 | t_ephSBAS() {
|
|---|
| [10587] | 480 | _IODN = 0;
|
|---|
| 481 | _TOT = 0.0;
|
|---|
| 482 | _agf0 = 0.0;
|
|---|
| 483 | _agf1 = 0.0;
|
|---|
| 484 | _x_pos = 0.0;
|
|---|
| 485 | _x_vel = 0.0;
|
|---|
| 486 | _x_acc = 0.0;
|
|---|
| 487 | _y_pos = 0.0;
|
|---|
| 488 | _y_vel = 0.0;
|
|---|
| 489 | _y_acc = 0.0;
|
|---|
| 490 | _z_pos = 0.0;
|
|---|
| 491 | _z_vel = 0.0;
|
|---|
| 492 | _z_acc = 0.0;
|
|---|
| 493 | _ura = 0.0;
|
|---|
| 494 | _health = 0.0;
|
|---|
| 495 | _receptStaID = "";
|
|---|
| [7625] | 496 | }
|
|---|
| [10603] | 497 | t_ephSBAS(double rnxVersion, const QStringList& lines, const QString typeStr);
|
|---|
| [6380] | 498 | virtual ~t_ephSBAS() {}
|
|---|
| 499 |
|
|---|
| [10587] | 500 | virtual e_system system() const {return t_eph::SBAS;}
|
|---|
| [7169] | 501 | virtual unsigned int IOD() const;
|
|---|
| [9774] | 502 | virtual unsigned int isUnhealthy() const;
|
|---|
| [6380] | 503 | virtual QString toString(double version) const;
|
|---|
| 504 |
|
|---|
| 505 | private:
|
|---|
| [6381] | 506 | virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
|
|---|
| [6380] | 507 |
|
|---|
| [6536] | 508 | int _IODN;
|
|---|
| [10587] | 509 | double _TOT; // not used (set to 0.9999e9)
|
|---|
| 510 | double _agf0; // [s] clock correction
|
|---|
| 511 | double _agf1; // [s/s] clock correction drift
|
|---|
| [6380] | 512 |
|
|---|
| [10587] | 513 | double _x_pos; // [m]
|
|---|
| 514 | double _x_vel; // [m/s]
|
|---|
| 515 | double _x_acc; // [m/s^2]
|
|---|
| [6380] | 516 |
|
|---|
| [10587] | 517 | double _y_pos; // [m]
|
|---|
| 518 | double _y_vel; // [m/s]
|
|---|
| 519 | double _y_acc; // [m/s^2]
|
|---|
| [6380] | 520 |
|
|---|
| [10587] | 521 | double _z_pos; // [m]
|
|---|
| 522 | double _z_vel; // [m/s]
|
|---|
| 523 | double _z_acc; // [m/s^2]
|
|---|
| [6380] | 524 |
|
|---|
| [6798] | 525 | mutable double _ura;
|
|---|
| [6390] | 526 | double _health;
|
|---|
| [6380] | 527 | };
|
|---|
| 528 |
|
|---|
| [6600] | 529 | class t_ephBDS : public t_eph {
|
|---|
| [6400] | 530 | friend class t_ephEncoder;
|
|---|
| [6812] | 531 | friend class RTCM3Decoder;
|
|---|
| [6400] | 532 | public:
|
|---|
| [8482] | 533 | t_ephBDS() {
|
|---|
| [9789] | 534 | _TOT = 0.0;
|
|---|
| 535 | _AODE = 0;
|
|---|
| 536 | _AODC = 0;
|
|---|
| [10587] | 537 | _ura = 0.0;
|
|---|
| [9789] | 538 | _clock_bias = 0.0;
|
|---|
| 539 | _clock_drift = 0.0;
|
|---|
| 540 | _clock_driftrate = 0.0;
|
|---|
| [10587] | 541 | _ADOT = 0.0;
|
|---|
| [9789] | 542 | _Crs = 0.0;
|
|---|
| 543 | _Delta_n = 0.0;
|
|---|
| 544 | _M0 = 0.0;
|
|---|
| 545 | _Cuc = 0.0;
|
|---|
| 546 | _e = 0.0;
|
|---|
| 547 | _Cus = 0.0;
|
|---|
| 548 | _sqrt_A = 0.0;
|
|---|
| 549 | _Cic = 0.0;
|
|---|
| 550 | _OMEGA0 = 0.0;
|
|---|
| 551 | _Cis = 0.0;
|
|---|
| 552 | _i0 = 0.0;
|
|---|
| 553 | _Crc = 0.0;
|
|---|
| 554 | _omega = 0.0;
|
|---|
| 555 | _OMEGADOT = 0.0;
|
|---|
| 556 | _IDOT = 0.0;
|
|---|
| 557 | _TOEsec = 0.0;
|
|---|
| 558 | _BDTweek = 0.0;
|
|---|
| 559 | _Delta_n_dot = 0.0;
|
|---|
| 560 | _satType = 0.0;
|
|---|
| 561 | _top = 0.0;
|
|---|
| 562 | _SISAI_oe = 0.0;
|
|---|
| 563 | _SISAI_ocb = 0.0;
|
|---|
| 564 | _SISAI_oc1 = 0.0;
|
|---|
| 565 | _SISAI_oc2 = 0.0;
|
|---|
| 566 | _ISC_B1Cd = 0.0;
|
|---|
| 567 | _ISC_B2ad = 0.0;
|
|---|
| 568 | _TGD1 = 0.0;
|
|---|
| 569 | _TGD2 = 0.0;
|
|---|
| 570 | _TGD_B1Cp = 0.0;
|
|---|
| 571 | _TGD_B2ap = 0.0;
|
|---|
| 572 | _TGD_B2bI = 0.0;
|
|---|
| 573 | _SISMAI = 0.0;
|
|---|
| 574 | _SatH1 = 0;
|
|---|
| 575 | _health = 0;
|
|---|
| 576 | _INTEGRITYF_B1C = 0.0;
|
|---|
| 577 | _INTEGRITYF_B2aB1C = 0.0;
|
|---|
| 578 | _INTEGRITYF_B2b = 0.0;
|
|---|
| 579 | _IODC = 0.0;
|
|---|
| 580 | _IODE = 0.0;
|
|---|
| 581 | _receptStaID = "";
|
|---|
| [7625] | 582 | }
|
|---|
| [10603] | 583 | t_ephBDS(double rnxVersion, const QStringList& lines, const QString typeStr);
|
|---|
| [6600] | 584 | virtual ~t_ephBDS() {}
|
|---|
| [6400] | 585 |
|
|---|
| [10587] | 586 | virtual e_system system() const {return t_eph::BDS;}
|
|---|
| [7169] | 587 | virtual unsigned int IOD() const;
|
|---|
| [9789] | 588 | virtual unsigned int isUnhealthy() const;
|
|---|
| [6400] | 589 | virtual QString toString(double version) const;
|
|---|
| 590 |
|
|---|
| 591 | private:
|
|---|
| 592 | virtual t_irc position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
|
|---|
| 593 |
|
|---|
| [9788] | 594 | double _TOT; // [s] of BDT week
|
|---|
| [6400] | 595 | bncTime _TOE;
|
|---|
| 596 | int _AODE;
|
|---|
| 597 | int _AODC;
|
|---|
| [10587] | 598 | mutable double _ura; // user range accuracy [m]
|
|---|
| [9788] | 599 | double _clock_bias; // [s]
|
|---|
| 600 | double _clock_drift; // [s/s]
|
|---|
| 601 | double _clock_driftrate; // [s/s^2]
|
|---|
| [10587] | 602 | double _ADOT; // [m/s]
|
|---|
| [9788] | 603 | double _Crs; // [m]
|
|---|
| 604 | double _Delta_n; // [rad/s]
|
|---|
| 605 | double _M0; // [rad]
|
|---|
| 606 | double _Cuc; // [rad]
|
|---|
| [10587] | 607 | double _e; // [-]
|
|---|
| [9788] | 608 | double _Cus; // [rad]
|
|---|
| 609 | double _sqrt_A; // [m^0.5]
|
|---|
| 610 | double _Cic; // [rad]
|
|---|
| 611 | double _OMEGA0; // [rad]
|
|---|
| 612 | double _Cis; // [rad]
|
|---|
| 613 | double _i0; // [rad]
|
|---|
| 614 | double _Crc; // [m]
|
|---|
| 615 | double _omega; // [rad]
|
|---|
| 616 | double _OMEGADOT; // [rad/s]
|
|---|
| 617 | double _IDOT; // [rad/s]
|
|---|
| 618 | double _TOEsec; // [s] of BDT week
|
|---|
| 619 | double _BDTweek; // BDT week
|
|---|
| 620 |
|
|---|
| 621 | double _Delta_n_dot; // [rad/s^2]
|
|---|
| 622 | double _satType; // 0..reserved, 1..GEO, 2..IGSO, 3..MEO
|
|---|
| 623 | double _top; // [s]
|
|---|
| 624 |
|
|---|
| [10587] | 625 | double _SISAI_oe; // [-]
|
|---|
| 626 | double _SISAI_ocb; // [-]
|
|---|
| 627 | double _SISAI_oc1; // [-]
|
|---|
| 628 | double _SISAI_oc2; // [-]
|
|---|
| [9788] | 629 |
|
|---|
| 630 | double _ISC_B1Cd; // [s]
|
|---|
| 631 | double _ISC_B2ad; // [s]
|
|---|
| 632 |
|
|---|
| 633 | double _TGD1; // [s]
|
|---|
| 634 | double _TGD2; // [s]
|
|---|
| 635 | double _TGD_B1Cp; // [s]
|
|---|
| 636 | double _TGD_B2ap; // [s]
|
|---|
| 637 | double _TGD_B2bI; // [s]
|
|---|
| 638 |
|
|---|
| [10587] | 639 | double _SISMAI; // [-]
|
|---|
| [9788] | 640 |
|
|---|
| [10587] | 641 | int _SatH1; // [-]
|
|---|
| 642 | int _health; // [-]
|
|---|
| [9788] | 643 |
|
|---|
| 644 | double _INTEGRITYF_B1C; // 3 bits word from sf 3
|
|---|
| 645 | double _INTEGRITYF_B2aB1C;// 6 bits word with integrity bits in msg 10-11, 30.34 or 40
|
|---|
| 646 | double _INTEGRITYF_B2b; // 3 bits word from msg 10
|
|---|
| 647 |
|
|---|
| [10587] | 648 | double _IODC; // [-]
|
|---|
| 649 | double _IODE; // [-] IODE are the same as the 8 LSBs of IODC
|
|---|
| [9788] | 650 |
|
|---|
| [6400] | 651 | };
|
|---|
| [10533] | 652 |
|
|---|
| [1025] | 653 | #endif
|
|---|