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