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