18#ifndef GNSS_SDR_GPS_CNAV_H
19#define GNSS_SDR_GPS_CNAV_H
35constexpr int32_t GPS_CNAV_DATA_PAGE_BITS = 300;
38const std::vector<std::pair<int32_t, int32_t> > CNAV_PRN({{9, 6}});
39const std::vector<std::pair<int32_t, int32_t> > CNAV_MSG_TYPE({{15, 6}});
40const std::vector<std::pair<int32_t, int32_t> > CNAV_TOW({{21, 17}});
41constexpr int32_t CNAV_TOW_LSB = 6;
42const std::vector<std::pair<int32_t, int32_t> > CNAV_ALERT_FLAG({{38, 1}});
45const std::vector<std::pair<int32_t, int32_t> > CNAV_WN({{39, 13}});
46const std::vector<std::pair<int32_t, int32_t> > CNAV_HEALTH({{52, 3}});
47const std::vector<std::pair<int32_t, int32_t> > CNAV_TOP1({{55, 11}});
48constexpr int32_t CNAV_TOP1_LSB = 300;
49const std::vector<std::pair<int32_t, int32_t> > CNAV_URA({{66, 5}});
51const std::vector<std::pair<int32_t, int32_t> > CNAV_TOE1({{71, 11}});
52constexpr int32_t CNAV_TOE1_LSB = 300;
54const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_A({{82, 26}});
55constexpr double CNAV_DELTA_A_LSB =
TWO_N9;
57const std::vector<std::pair<int32_t, int32_t> > CNAV_A_DOT({{108, 25}});
58constexpr double CNAV_A_DOT_LSB =
TWO_N21;
60const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_N0({{133, 17}});
62const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_N0_DOT({{150, 23}});
64const std::vector<std::pair<int32_t, int32_t> > CNAV_M0({{173, 33}});
66const std::vector<std::pair<int32_t, int32_t> > CNAV_E_ECCENTRICITY({{206, 33}});
67constexpr double CNAV_E_ECCENTRICITY_LSB =
TWO_N34;
68const std::vector<std::pair<int32_t, int32_t> > CNAV_OMEGA({{239, 33}});
70const std::vector<std::pair<int32_t, int32_t> > CNAV_INTEGRITY_FLAG({{272, 1}});
71const std::vector<std::pair<int32_t, int32_t> > CNAV_L2_PHASING_FLAG({{273, 1}});
74const std::vector<std::pair<int32_t, int32_t> > CNAV_TOE2({{39, 11}});
75constexpr int32_t CNAV_TOE2_LSB = 300;
76const std::vector<std::pair<int32_t, int32_t> > CNAV_OMEGA0({{50, 33}});
78const std::vector<std::pair<int32_t, int32_t> > CNAV_I0({{83, 33}});
80const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_OMEGA_DOT({{116, 17}});
82const std::vector<std::pair<int32_t, int32_t> > CNAV_I0_DOT({{133, 15}});
84const std::vector<std::pair<int32_t, int32_t> > CNAV_CIS({{148, 16}});
85constexpr double CNAV_CIS_LSB =
TWO_N30;
86const std::vector<std::pair<int32_t, int32_t> > CNAV_CIC({{164, 16}});
87constexpr double CNAV_CIC_LSB =
TWO_N30;
88const std::vector<std::pair<int32_t, int32_t> > CNAV_CRS({{180, 24}});
89constexpr double CNAV_CRS_LSB =
TWO_N8;
90const std::vector<std::pair<int32_t, int32_t> > CNAV_CRC({{204, 24}});
91constexpr double CNAV_CRC_LSB =
TWO_N8;
92const std::vector<std::pair<int32_t, int32_t> > CNAV_CUS({{228, 21}});
93constexpr double CNAV_CUS_LSB =
TWO_N30;
94const std::vector<std::pair<int32_t, int32_t> > CNAV_CUC({{249, 21}});
95constexpr double CNAV_CUC_LSB =
TWO_N30;
99const std::vector<std::pair<int32_t, int32_t> > CNAV_TOP2({{39, 11}});
100constexpr int32_t CNAV_TOP2_LSB = 300;
101const std::vector<std::pair<int32_t, int32_t> > CNAV_URA_NED0({{50, 5}});
102const std::vector<std::pair<int32_t, int32_t> > CNAV_URA_NED1({{55, 3}});
103const std::vector<std::pair<int32_t, int32_t> > CNAV_URA_NED2({{58, 3}});
104const std::vector<std::pair<int32_t, int32_t> > CNAV_TOC({{61, 11}});
105constexpr int32_t CNAV_TOC_LSB = 300;
106const std::vector<std::pair<int, int> > CNAV_AF0({{72, 26}});
107constexpr double CNAV_AF0_LSB =
TWO_N35;
108const std::vector<std::pair<int, int> > CNAV_AF1({{98, 20}});
109constexpr double CNAV_AF1_LSB =
TWO_N48;
110const std::vector<std::pair<int, int> > CNAV_AF2({{118, 10}});
111constexpr double CNAV_AF2_LSB =
TWO_N60;
112const std::vector<std::pair<int, int> > CNAV_TGD({{128, 13}});
113constexpr double CNAV_TGD_LSB =
TWO_N35;
114const std::vector<std::pair<int32_t, int32_t> > CNAV_ISCL1({{141, 13}});
115constexpr double CNAV_ISCL1_LSB =
TWO_N35;
116const std::vector<std::pair<int32_t, int32_t> > CNAV_ISCL2({{154, 13}});
117constexpr double CNAV_ISCL2_LSB =
TWO_N35;
118const std::vector<std::pair<int32_t, int32_t> > CNAV_ISCL5I({{167, 13}});
119constexpr double CNAV_ISCL5I_LSB =
TWO_N35;
120const std::vector<std::pair<int32_t, int32_t> > CNAV_ISCL5Q({{180, 13}});
121constexpr double CNAV_ISCL5Q_LSB =
TWO_N35;
123const std::vector<std::pair<int32_t, int32_t> > CNAV_ALPHA0({{193, 8}});
124constexpr double CNAV_ALPHA0_LSB =
TWO_N30;
125const std::vector<std::pair<int32_t, int32_t> > CNAV_ALPHA1({{201, 8}});
126constexpr double CNAV_ALPHA1_LSB =
TWO_N27;
127const std::vector<std::pair<int32_t, int32_t> > CNAV_ALPHA2({{209, 8}});
128constexpr double CNAV_ALPHA2_LSB =
TWO_N24;
129const std::vector<std::pair<int32_t, int32_t> > CNAV_ALPHA3({{217, 8}});
130constexpr double CNAV_ALPHA3_LSB =
TWO_N24;
131const std::vector<std::pair<int32_t, int32_t> > CNAV_BETA0({{225, 8}});
132constexpr double CNAV_BETA0_LSB =
TWO_P11;
133const std::vector<std::pair<int32_t, int32_t> > CNAV_BETA1({{233, 8}});
134constexpr double CNAV_BETA1_LSB =
TWO_P14;
135const std::vector<std::pair<int32_t, int32_t> > CNAV_BETA2({{241, 8}});
136constexpr double CNAV_BETA2_LSB =
TWO_P16;
137const std::vector<std::pair<int32_t, int32_t> > CNAV_BETA3({{249, 8}});
138constexpr double CNAV_BETA3_LSB =
TWO_P16;
139const std::vector<std::pair<int32_t, int32_t> > CNAV_WNOP({{257, 8}});
143const std::vector<std::pair<int32_t, int32_t> > CNAV_A0({{128, 16}});
144constexpr double CNAV_A0_LSB =
TWO_N35;
145const std::vector<std::pair<int32_t, int32_t> > CNAV_A1({{144, 13}});
146constexpr double CNAV_A1_LSB =
TWO_N51;
147const std::vector<std::pair<int32_t, int32_t> > CNAV_A2({{157, 7}});
148constexpr double CNAV_A2_LSB =
TWO_N68;
149const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_TLS({{164, 8}});
150constexpr int32_t CNAV_DELTA_TLS_LSB = 1;
151const std::vector<std::pair<int32_t, int32_t> > CNAV_TOT({{172, 16}});
152constexpr int32_t CNAV_TOT_LSB =
TWO_P4;
153const std::vector<std::pair<int32_t, int32_t> > CNAV_WN_OT({{188, 13}});
154constexpr int32_t CNAV_WN_OT_LSB = 1;
155const std::vector<std::pair<int32_t, int32_t> > CNAV_WN_LSF({{201, 13}});
156constexpr int32_t CNAV_WN_LSF_LSB = 1;
157const std::vector<std::pair<int32_t, int32_t> > CNAV_DN({{214, 4}});
158constexpr int32_t CNAV_DN_LSB = 1;
159const std::vector<std::pair<int32_t, int32_t> > CNAV_DELTA_TLSF({{218, 8}});
160constexpr int32_t CNAV_DELTA_TLSF_LSB = 1;
162constexpr double CNAV_A_REF = 26559710.0;
163constexpr double CNAV_OMEGA_DOT_REF = -2.6e-9;
164constexpr double CNAV_QZSS_A_REF = 42164200.0;
Defines useful mathematical constants and their scaled versions.
constexpr double TWO_N48
2^-46
constexpr double TWO_P16
2^16
constexpr double TWO_N68
2^-68
constexpr double TWO_P14
2^14
constexpr double TWO_N34
2^-34
constexpr double TWO_N44
2^-44
constexpr double TWO_N51
2^-51
constexpr double TWO_N9
2^-9
constexpr double TWO_N24
2^-24
constexpr double TWO_N27
2^-27
constexpr double TWO_P11
2^11
constexpr double TWO_N60
2^-60
constexpr double TWO_N8
2^-8
constexpr double TWO_N21
2^-21
constexpr double TWO_N35
2^-35
constexpr double TWO_N32
2^-32
constexpr double TWO_N57
2^-57
constexpr double TWO_P4
2^4
constexpr double TWO_N30
2^-30
constexpr double GNSS_PI
pi constant as defined for GNSS