0.4.1
Loading...
Searching...
No Matches
Code.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9/// @file Code.hpp
10/// @brief Code definitions
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2022-06-01
13
14#pragma once
15
16#include <bitset>
17#include <cstdint>
18#include <fmt/format.h>
19
22
23namespace NAV
24{
25
26/// @brief Enumerate for GNSS Codes
27///
28/// <table>
29/// <tr><th> System <th> Band <th> Code <th> Description
30/// <tr><td rowspan="16" valign="top"> GPS <td rowspan="7" valign="top"> L1 <td> L1C <td> C/A-code
31/// <tr> <td> L1S, L1L, L1X <td> L1C (data, pilot, combined)
32/// <tr> <td> L1P <td> P-code (unencrypted)
33/// <tr> <td> L1W <td> Semicodeless P(Y) tracking (Z-tracking)
34/// <tr> <td> L1Y <td> Y-code (with decryption)
35/// <tr> <td> L1M <td> M-code
36/// <tr> <td> L1N <td> codeless
37/// <tr> <td rowspan="8" valign="top"> L2 <td> L2C <td> C/A-code
38/// <tr> <td> L2D <td> Semi-codeless P(Y) tracking (L1 C/A+(P2-P1))
39/// <tr> <td> L2S, L2L, L2X <td> L2C-code (medium, long, combined)
40/// <tr> <td> L2P <td> P-code (unencrypted)
41/// <tr> <td> L2W <td> Semicodeless P(Y) tracking (Z-tracking)
42/// <tr> <td> L2Y <td> Y-code (with decryption)
43/// <tr> <td> L2M <td> M-code
44/// <tr> <td> L2N <td> codeless
45/// <tr> <td> L5 <td> L5I, L5Q, L5X <td> L5 (data, pilot, combined)
46/// <tr><td rowspan= "7" valign="top"> Galileo <td rowspan="3" valign="top"> E1 <td> L1A <td> PRS signal
47/// <tr> <td> L1B, L1C, L1X <td> OS (data, pilot, combined)
48/// <tr> <td> L1Z <td> PRS + OS(data+pilot)
49/// <tr> <td> E5a <td> L5I, L5Q, L5X <td> E5a (data, pilot, combined)
50/// <tr> <td rowspan="3" valign="top"> E6 <td> L6A <td> E6 PRS signal
51/// <tr> <td> L6B, L6C, L6X <td> E6 (data, pilot, combined)
52/// <tr> <td> L6Z <td> E6 PRS + OS(data+pilot)
53/// <tr> <td> E5b <td> L7I, L7Q, L7X <td> E5b (data, pilot, combined)
54/// <tr> <td> E5 <td> L8I, L8Q, L8X <td> E5 AltBOC (data, pilot, combined)
55/// <tr><td rowspan= "7" valign="top"> GLONASS <td rowspan="2" valign="top"> L1 <td> L1C <td> C/A-code
56/// <tr> <td> L1P <td> P-code
57/// <tr> <td rowspan="2" valign="top"> L2 <td> L2C <td> C/A-code
58/// <tr> <td> L2P <td> P-code
59/// <tr> <td> L3 <td> L3I, L3Q, L3X <td> L3 (data, pilot, combined)
60/// <tr> <td> G1a <td> L4A, L4B, L4X <td> G1a (data, pilot, combined)
61/// <tr> <td> G2b <td> L6A, L6B, L6X <td> G2a (data, pilot, combined)
62/// <tr><td rowspan= "8" valign="top"> BeiDou (BDS-2/3) <td> B1 <td> L1D, L1P, L1X <td> B1 (data, pilot, combined)
63/// <tr> <td> B1-2<td> L2I, L2Q, L2X <td> B1I(OS), B1Q, combined
64/// <tr> <td> B2a <td> L5D, L5P, L5X <td> B2a (data, pilot, combined)
65/// <tr> <td rowspan="2" valign="top"> B3 <td> L6I, L6Q, L6X <td> B3I, B3Q, combined
66/// <tr> <td> L6A <td> B3A
67/// <tr> <td rowspan="2" valign="top"> B2b <td> L7I, L7Q, L7X <td> BDS-2: B2I(OS), B2Q, combined
68/// <tr> <td> L7D, L7P, L7Z <td> BDS-3: data, pilot, combined
69/// <tr> <td> B2 <td> L8D, L8P, L8X <td> B2 (B2a+B2b): data, pilot, combined
70/// <tr><td rowspan= "9" valign="top"> QZSS <td rowspan="3" valign="top"> L1 <td> L1C <td> C/A-code
71/// <tr> <td> L1S, L1L, L1X <td> L1C (data, pilot, combined)
72/// <tr> <td> L1Z <td> L1-SAIF signal
73/// <tr> <td> L2 <td> L2S, L2L, L2X <td> L2C-code (medium, long, combined)
74/// <tr> <td rowspan="2" valign="top"> L5 <td> L5I, L5Q, L5X <td> L5 (data, pilot, combined)
75/// <tr> <td> L5D, L5P, L5Z <td> I, Q, combined
76/// <tr> <td rowspan="3" valign="top"> L6 <td> L6S, L6L, L6X <td> LEX signal (short, long, combined)
77/// <tr> <td> L6E <td> L6E
78/// <tr> <td> L6Z <td> L6(D+E)
79/// <tr><td rowspan= "4" valign="top"> IRNSS/NavIC <td rowspan="2" valign="top"> L5 <td> L5A <td> SPS Signal
80/// <tr> <td> L5B, L5C, L5X <td> RS (data, pilot, combined)
81/// <tr> <td rowspan="2" valign="top"> S <td> L9A <td> SPS signal
82/// <tr> <td> L9B, L9C, L9X <td> RS (data, pilot, combined)
83/// <tr><td rowspan= "2" valign="top"> SBAS <td> L1 <td> L1C <td> C/A-code
84/// <tr> <td> L5 <td> L5I, L5Q, L5X <td> L5 (data, pilot, combined)
85/// </table>
86/// @note See \cite SpringerHandbookGNSS2017 Springer Handbook GNSS Annex A, Table A.5, p. 1211
87/// @note See \cite RINEX-3.04 RINEX 3.04 Appendix A23, p. A43-A46 (97-100)
88class Code
89{
90 public:
91 /// @brief Enumeration of all Codes
92 enum Enum : uint8_t
93 {
94 None, ///< None
95
96 G1C, ///< GPS L1 - C/A-code
97 G1S, ///< GPS L1 - L1C-D (data)
98 G1L, ///< GPS L1 - L1C-P (pilot)
99 G1X, ///< GPS L1 - L1C-(D+P) (combined)
100 G1P, ///< GPS L1 - P-code (unencrypted)
101 G1W, ///< GPS L1 - Semicodeless P(Y) tracking (Z-tracking)
102 G1Y, ///< GPS L1 - Y-code (with decryption)
103 G1M, ///< GPS L1 - M-code
104 G1N, ///< GPS L1 - codeless
105 G2C, ///< GPS L2 - C/A-code
106 G2D, ///< GPS L2 - Semi-codeless P(Y) tracking (L1 C/A + (P2-P1))
107 G2S, ///< GPS L2 - L2C(M) (medium)
108 G2L, ///< GPS L2 - L2C(L) (long)
109 G2X, ///< GPS L2 - L2C(M+L) (combined)
110 G2P, ///< GPS L2 - P-code (unencrypted)
111 G2W, ///< GPS L2 - Semicodeless P(Y) tracking (Z-tracking)
112 G2Y, ///< GPS L2 - Y-code (with decryption)
113 G2M, ///< GPS L2 - M-code
114 G2N, ///< GPS L2 - codeless
115 G5I, ///< GPS L5 - Data
116 G5Q, ///< GPS L5 - Pilot
117 G5X, ///< GPS L5 - Combined
118
119 E1A, ///< GAL E1 - PRS signal
120 E1B, ///< GAL E1 - OS (data)
121 E1C, ///< GAL E1 - OS (pilot)
122 E1X, ///< GAL E1 - OS(B+C) (combined)
123 E1Z, ///< GAL E1 - PRS + OS (data + pilot)
124 E5I, ///< GAL E5a - Data
125 E5Q, ///< GAL E5a - Pilot
126 E5X, ///< GAL E5a - Combined
127 E6A, ///< GAL E6 - PRS signal
128 E6B, ///< GAL E6 - Data
129 E6C, ///< GAL E6 - Pilot
130 E6X, ///< GAL E6 - Combined (B+C)
131 E6Z, ///< GAL E6 - PRS + OS (A+B+C)
132 E7I, ///< GAL E5b - Data
133 E7Q, ///< GAL E5b - Pilot
134 E7X, ///< GAL E5b - Combined
135 E8I, ///< GAL E5(a+b) - AltBOC (data)
136 E8Q, ///< GAL E5(a+b) - AltBOC (pilot)
137 E8X, ///< GAL E5(a+b) - AltBOC (combined)
138
139 R1C, ///< GLO L1 - C/A-code
140 R1P, ///< GLO L1 - P-code
141 R2C, ///< GLO L2 - C/A-code
142 R2P, ///< GLO L2 - P-code
143 R3I, ///< GLO L3 - Data
144 R3Q, ///< GLO L3 - Pilot
145 R3X, ///< GLO L3 - Combined
146 R4A, ///< GLO G1a - L1OCd (data)
147 R4B, ///< GLO G1a - L1OCp (pilot)
148 R4X, ///< GLO G1a - L1OCd+L1OCp (combined)
149 R6A, ///< GLO G2a - L2CSI (data)
150 R6B, ///< GLO G2a - L2OCp (pilot)
151 R6X, ///< GLO G2a - L2CSI+L2OCp (combined)
152
153 B1D, ///< BeiDou B1 - Data (D)
154 B1P, ///< BeiDou B1 - Pilot(P)
155 B1X, ///< BeiDou B1 - D+P
156 B2I, ///< BeiDou B1-2 - B1I(OS)
157 B2Q, ///< BeiDou B1-2 - B1Q
158 B2X, ///< BeiDou B1-2 - B1I(OS), B1Q, combined
159 B5D, ///< BeiDou B2a - Data (D)
160 B5P, ///< BeiDou B2a - Pilot(P)
161 B5X, ///< BeiDou B2a - D+P
162 B6I, ///< BeiDou B3 - B3I
163 B6Q, ///< BeiDou B3 - B3Q
164 B6X, ///< BeiDou B3 - B3I, B3Q, combined
165 B6A, ///< BeiDou B3 - B3A
166 B7I, ///< BeiDou B2b (BDS-2) - B2I(OS)
167 B7Q, ///< BeiDou B2b (BDS-2) - B2Q
168 B7X, ///< BeiDou B2b (BDS-2) - B2I(OS), B2Q, combined
169 B7D, ///< BeiDou B2b (BDS-3) - Data (D)
170 B7P, ///< BeiDou B2b (BDS-3) - Pilot(P)
171 B7Z, ///< BeiDou B2b (BDS-3) - D+P
172 B8D, ///< BeiDou B2 (B2a+B2b) - Data (D)
173 B8P, ///< BeiDou B2 (B2a+B2b) - Pilot(P)
174 B8X, ///< BeiDou B2 (B2a+B2b) - D+P
175
176 J1C, ///< QZSS L1 - C/A-code
177 J1S, ///< QZSS L1 - L1C (data)
178 J1L, ///< QZSS L1 - L1C (pilot)
179 J1X, ///< QZSS L1 - L1C (combined)
180 J1Z, ///< QZSS L1 - L1-SAIF signal
181 J2S, ///< QZSS L2 - L2C-code (medium)
182 J2L, ///< QZSS L2 - L2C-code (long)
183 J2X, ///< QZSS L2 - L2C-code (combined)
184 J5I, ///< QZSS L5 - Data
185 J5Q, ///< QZSS L5 - Pilot
186 J5X, ///< QZSS L5 - Combined
187 J5D, ///< QZSS L5S - I
188 J5P, ///< QZSS L5S - Q
189 J5Z, ///< QZSS L5S - I+Q
190 J6S, ///< QZSS L6 - L6D LEX signal (short)
191 J6L, ///< QZSS L6 - L6P LEX signal (long)
192 J6X, ///< QZSS L6 - L6(D+P) LEX signal (combined)
193 J6E, ///< QZSS L6 - L6E
194 J6Z, ///< QZSS L6 - L6(D+E)
195
196 I5A, ///< IRNSS L5 - SPS Signal
197 I5B, ///< IRNSS L5 - RS (data)
198 I5C, ///< IRNSS L5 - RS (pilot)
199 I5X, ///< IRNSS L5 - RS (combined)
200 I9A, ///< IRNSS S - SPS signal
201 I9B, ///< IRNSS S - RS (data)
202 I9C, ///< IRNSS S - RS (pilot)
203 I9X, ///< IRNSS S - RS (combined)
204
205 S1C, ///< SBAS L1 - C/A-code
206 S5I, ///< SBAS L5 - Data
207 S5Q, ///< SBAS L5 - Pilot
208 S5X, ///< SBAS L5 - Combined
209 };
210 /// @brief Helper variables
211 enum : uint8_t
212 {
213 _GPS_START = G1C, ///< GPS start index in the Enum
214 _GPS_END = G5X, ///< GPS end index in the Enum
215 _GAL_START = E1A, ///< GAL start index in the Enum
216 _GAL_END = E8X, ///< GAL end index in the Enum
217 _GLO_START = R1C, ///< GLO start index in the Enum
218 _GLO_END = R6X, ///< GLO end index in the Enum
219 _BDS_START = B1D, ///< BDS start index in the Enum
220 _BDS_END = B8X, ///< BDS end index in the Enum
221 _QZSS_START = J1C, ///< QZSS start index in the Enum
222 _QZSS_END = J6Z, ///< QZSS end index in the Enum
223 _IRNSS_START = I5A, ///< IRNSS start index in the Enum
224 _IRNSS_END = I9X, ///< IRNSS end index in the Enum
225 _SBAS_START = S1C, ///< SBAS start index in the Enum
226 _SBAS_END = S5X, ///< SBAS end index in the Enum
227
228 _G01_START = G1C, ///< GPS L1 start index in the Enum
229 _G01_END = G1N, ///< GPS L1 end index in the Enum
230 _G02_START = G2C, ///< GPS L2 start index in the Enum
231 _G02_END = G2N, ///< GPS L2 end index in the Enum
232 _G05_START = G5I, ///< GPS L5 start index in the Enum
233 _G05_END = G5X, ///< GPS L5 end index in the Enum
234
235 _E01_START = E1A, ///< GAL E1 start index in the Enum
236 _E01_END = E1Z, ///< GAL E1 end index in the Enum
237 _E05_START = E5I, ///< GAL E5a start index in the Enum
238 _E05_END = E5X, ///< GAL E5a end index in the Enum
239 _E06_START = E6B, ///< GAL E6 start index in the Enum
240 _E06_END = E6X, ///< GAL E6 end index in the Enum
241 _E07_START = E7I, ///< GAL E5b start index in the Enum
242 _E07_END = E7X, ///< GAL E5b end index in the Enum
243 _E08_START = E8I, ///< GAL E5(a+b) start index in the Enum
244 _E08_END = E8X, ///< GAL E5(a+b) end index in the Enum
245
246 _R01_START = R1C, ///< GLO L1 start index in the Enum
247 _R01_END = R1P, ///< GLO L1 end index in the Enum
248 _R02_START = R2C, ///< GLO L2 start index in the Enum
249 _R02_END = R2P, ///< GLO L2 end index in the Enum
250 _R03_START = R3I, ///< GLO L3 start index in the Enum
251 _R03_END = R3X, ///< GLO L3 end index in the Enum
252 _R04_START = R4A, ///< GLO G1a start index in the Enum
253 _R04_END = R4X, ///< GLO G1a end index in the Enum
254 _R06_START = R6A, ///< GLO G2a start index in the Enum
255 _R06_END = R6X, ///< GLO G2a end index in the Enum
256
257 _B01_START = B1D, ///< BDS B1 start index in the Enum
258 _B01_END = B1X, ///< BDS B1 end index in the Enum
259 _B02_START = B2I, ///< BDS B1-2 start index in the Enum
260 _B02_END = B2X, ///< BDS B1-2 end index in the Enum
261 _B05_START = B5D, ///< BDS B2a start index in the Enum
262 _B05_END = B5X, ///< BDS B2a end index in the Enum
263 _B06_START = B6I, ///< BDS B3 start index in the Enum
264 _B06_END = B6A, ///< BDS B3 end index in the Enum
265 _B07_START = B7I, ///< BDS B2b start index in the Enum
266 _B07_END = B7Z, ///< BDS B2b end index in the Enum
267 _B08_START = B8D, ///< BDS B2 (B2a+B2b) start index in the Enum
268 _B08_END = B8X, ///< BDS B2 (B2a+B2b) end index in the Enum
269
270 _J01_START = J1C, ///< QZSS L1 start index in the Enum
271 _J01_END = J1Z, ///< QZSS L1 end index in the Enum
272 _J02_START = J2S, ///< QZSS L2 start index in the Enum
273 _J02_END = J2X, ///< QZSS L2 end index in the Enum
274 _J05_START = J5I, ///< QZSS L5 start index in the Enum
275 _J05_END = J5Z, ///< QZSS L5 end index in the Enum
276 _J06_START = J6S, ///< QZSS L6 start index in the Enum
277 _J06_END = J6Z, ///< QZSS L6 end index in the Enum
278
279 _I05_START = I5A, ///< IRNSS L5 start index in the Enum
280 _I05_END = I5X, ///< IRNSS L5 end index in the Enum
281 _I09_START = I9A, ///< IRNSS S start index in the Enum
282 _I09_END = I9X, ///< IRNSS S end index in the Enum
283
284 _S01_START = S1C, ///< SBAS L start index in the Enum
285 _S01_END = S1C, ///< SBAS L end index in the Enum
286 _S05_START = S5I, ///< SBAS L start index in the Enum
287 _S05_END = S5X, ///< SBAS L end index in the Enum
288
289 COUNT = S5X + 1 ///< Amount of Codes in the Enum
290 };
291
292 /// Typedef for the bitset with size of COUNT
293 using Set = std::bitset<COUNT>;
294
295 /// Default constructor for an empty code
296 constexpr Code() = default;
297
298 /// @brief Constructor from a biset
299 /// @param[in] set Bitset with values to construct the Code from
300 constexpr explicit Code(const Set& set) : value(set) {}
301
302 /// @brief Constructor from a satellite system
303 /// @param[in] sys System to set all codes for
304 explicit Code(SatelliteSystem_ sys);
305
306 /// @brief Constructor from a frequency
307 /// @param[in] freq Frequency to set all codes for
308 explicit Code(Frequency_ freq);
309
310 /// @brief Constructor from a single code value
311 /// @param[in] e Code enum value to construct the code from
312 Code(Enum e) { value.set(e, true); } // NOLINT(hicpp-explicit-conversions, google-explicit-constructor)
313
314 /// Implicit bool conversion operator. Allows if(...)
315 explicit operator bool() const { return value.any(); }
316
317 /// @brief std::bitset conversion operator
318 /// @return The bitset representation of the type
319 constexpr explicit operator Set() const { return value; }
320
321 /// @brief std::string conversion operator
322 /// @return A std::string representation of the type
323 explicit operator std::string() const;
324
325 /// @brief Generates a Code from frequency and attribute
326 /// @param[in] freq Frequency of the code
327 /// @param[in] attribute Attribute letter of the code
328 /// @return Code representation
329 static Code fromFreqAttr(Frequency freq, char attribute);
330
331 /// @brief Returns a short description for the code
332 /// @param[in] code GNSS signal code
333 static const char* GetCodeDescription(Code code);
334
335 /// @brief Returns a short description for the code
336 [[nodiscard]] const char* getDescription() const;
337
338 /// @brief Returns the frequency for the code
339 /// @param[in] code GNSS signal code
340 static Frequency GetCodeFequency(Code code);
341
342 /// @brief Returns the frequency for the code
343 [[nodiscard]] Frequency getFrequency() const;
344
345 /// @brief Checks if the codes are part of a combined code
346 /// @param[in] first First GNSS signal code
347 /// @param[in] second Second GNSS signal code
348 static bool IsCodeCombined(Code first, Code second);
349
350 /// @brief Returns a list with all possible codes
351 static std::vector<Code> GetAll();
352
353 /// @brief Returns the enum value for the code (only one must be set)
354 /// @param code GNSS signal code
355 static Enum GetCodeEnumValue(Code code);
356
357 /// @brief Returns the enum value for the code (only one must be set)
358 [[nodiscard]] Enum getEnumValue() const;
359
360 // #####################################################################################################################################
361
362 /// @brief Allows combining flags of the Code enum.
363 /// @param[in] lhs Left-hand side value.
364 /// @param[in] rhs Right-hand side value.
365 /// @return The binary ORed value.
366 friend Code operator|(const Code& lhs, const Code& rhs);
367 /// @brief Allows combining flags of the Code enum.
368 /// @param[in] lhs Left-hand side value.
369 /// @param[in] rhs Right-hand side value.
370 /// @return The binary ORed value.
371 friend Code operator|(const Code& lhs, const Enum& rhs);
372 /// @brief Allows combining flags of the Code enum.
373 /// @param[in] lhs Left-hand side value.
374 /// @param[in] rhs Right-hand side value.
375 /// @return The binary ORed value.
376 friend Code operator|(const Enum& lhs, const Code& rhs);
377
378 /// @brief Allows combining flags of the Code enum.
379 /// @param[in] rhs Right-hand side value.
380 /// @return The binary ORed value.
381 Code& operator|=(const Code& rhs);
382 /// @brief Allows combining flags of the Code enum.
383 /// @param[in] rhs Right-hand side value.
384 /// @return The binary ORed value.
385 Code& operator|=(const Enum& rhs);
386
387 /// @brief Allows combining flags of the Code enum.
388 /// @param[in] lhs Left-hand side value.
389 /// @param[in] rhs Right-hand side value.
390 /// @return The binary ANDed value.
391 friend Code operator&(const Code& lhs, const Code& rhs);
392 /// @brief Allows combining flags of the Code enum.
393 /// @param[in] lhs Left-hand side value.
394 /// @param[in] rhs Right-hand side value.
395 /// @return The binary ANDed value.
396 friend Code operator&(const Code& lhs, const Enum& rhs);
397 /// @brief Allows combining flags of the Code enum.
398 /// @param[in] lhs Left-hand side value.
399 /// @param[in] rhs Right-hand side value.
400 /// @return The binary ANDed value.
401 friend Code operator&(const Enum& lhs, const Code& rhs);
402
403 /// @brief Allows combining flags of the Code enum.
404 /// @param[in] rhs Right-hand side value.
405 /// @return The binary ANDed value.
406 Code& operator&=(const Code& rhs);
407 /// @brief Allows combining flags of the Code enum.
408 /// @param[in] rhs Right-hand side value.
409 /// @return The binary ANDed value.
410 Code& operator&=(const Enum& rhs);
411
412 /// @brief Allows negating flags of the Code enum.
413 Code operator~() const;
414
415 // #####################################################################################################################################
416
417 /// @brief Equal compares values
418 /// @param[in] lhs Left-hand side of the operator
419 /// @param[in] rhs Right-hand side of the operator
420 /// @return Whether the comparison was successful
421 friend bool operator==(const Code& lhs, const Code& rhs);
422
423 /// @brief Equal compares values
424 /// @param[in] lhs Left-hand side of the operator
425 /// @param[in] rhs Right-hand side of the operator
426 /// @return Whether the comparison was successful
427 friend bool operator==(const Code& lhs, const Enum& rhs);
428
429 /// @brief Equal compares values
430 /// @param[in] lhs Left-hand side of the operator
431 /// @param[in] rhs Right-hand side of the operator
432 /// @return Whether the comparison was successful
433 friend bool operator==(const Enum& lhs, const Code& rhs);
434
435 /// @brief Inequal compares values
436 /// @param[in] lhs Left-hand side of the operator
437 /// @param[in] rhs Right-hand side of the operator
438 /// @return Whether the comparison was successful
439 friend bool operator!=(const Code& lhs, const Code& rhs);
440 /// @brief Inequal compares values
441 /// @param[in] lhs Left-hand side of the operator
442 /// @param[in] rhs Right-hand side of the operator
443 /// @return Whether the comparison was successful
444 friend bool operator!=(const Code& lhs, const Enum& rhs);
445 /// @brief Inequal compares values
446 /// @param[in] lhs Left-hand side of the operator
447 /// @param[in] rhs Right-hand side of the operator
448 /// @return Whether the comparison was successful
449 friend bool operator!=(const Enum& lhs, const Code& rhs);
450
451 /// @brief Less than comparison
452 /// @param[in] lhs Left-hand side of the operator
453 /// @param[in] rhs Right hand side of the operator
454 /// @return True if lhs < rhs
455 friend bool operator<(const Code& lhs, const Code& rhs);
456
457 /// @brief Less than comparison
458 /// @param[in] lhs Left-hand side of the operator
459 /// @param[in] rhs Right hand side of the operator
460 /// @return True if lhs < rhs
461 friend bool operator<(const Code& lhs, const Enum& rhs);
462
463 /// @brief Less than comparison
464 /// @param[in] lhs Left-hand side of the operator
465 /// @param[in] rhs Right hand side of the operator
466 /// @return True if lhs < rhs
467 friend bool operator<(const Enum& lhs, const Code& rhs);
468
469 // #####################################################################################################################################
470
471 /// @brief Allows filtering Code with SatelliteSystem.
472 /// @param[in] lhs Left-hand side enum value.
473 /// @param[in] rhs Right-hand side enum value.
474 /// @return The binary ANDed value.
475 friend Code operator&(Code lhs, SatelliteSystem_ rhs);
476 /// @brief Allows filtering Code with SatelliteSystem.
477 /// @param[in] lhs Left-hand side enum value.
478 /// @param[in] rhs Right-hand side enum value.
479 /// @return The binary ANDed value.
480 friend Code operator&(SatelliteSystem_ lhs, Code rhs);
481 /// @brief Allows filtering Code with SatelliteSystem.
482 /// @param[in] rhs Right-hand side enum value.
483 /// @return The binary ANDed value.
484 Code& operator&=(const SatelliteSystem_& rhs);
485 /// @brief Allows filtering Code with SatelliteSystem.
486 /// @param[in] lhs Left-hand side enum value.
487 /// @param[in] rhs Right-hand side enum value.
488 /// @return The binary ANDed value.
489 friend Code operator&(Code lhs, SatelliteSystem rhs);
490 /// @brief Allows filtering Code with SatelliteSystem.
491 /// @param[in] lhs Left-hand side enum value.
492 /// @param[in] rhs Right-hand side enum value.
493 /// @return The binary ANDed value.
494 friend Code operator&(SatelliteSystem lhs, Code rhs);
495 /// @brief Allows filtering Code with SatelliteSystem.
496 /// @param[in] rhs Right-hand side enum value.
497 /// @return The binary ANDed value.
498 Code& operator&=(const SatelliteSystem& rhs);
499
500 /// @brief Allows filtering Code with SatelliteSystem.
501 /// @param[in] lhs Left-hand side enum value.
502 /// @param[in] rhs Right-hand side enum value.
503 /// @return The binary ORed value.
504 friend Code operator|(Code lhs, SatelliteSystem_ rhs);
505 /// @brief Allows filtering Code with SatelliteSystem.
506 /// @param[in] lhs Left-hand side enum value.
507 /// @param[in] rhs Right-hand side enum value.
508 /// @return The binary ORed value.
509 friend Code operator|(SatelliteSystem_ lhs, Code rhs);
510 /// @brief Allows filtering Code with SatelliteSystem.
511 /// @param[in] rhs Right-hand side enum value.
512 /// @return The binary ORed value.
513 Code& operator|=(const SatelliteSystem_& rhs);
514 /// @brief Allows filtering Code with SatelliteSystem.
515 /// @param[in] lhs Left-hand side enum value.
516 /// @param[in] rhs Right-hand side enum value.
517 /// @return The binary ORed value.
518 friend Code operator|(Code lhs, SatelliteSystem rhs);
519 /// @brief Allows filtering Code with SatelliteSystem.
520 /// @param[in] lhs Left-hand side enum value.
521 /// @param[in] rhs Right-hand side enum value.
522 /// @return The binary ORed value.
523 friend Code operator|(SatelliteSystem lhs, Code rhs);
524 /// @brief Allows filtering Code with SatelliteSystem.
525 /// @param[in] rhs Right-hand side enum value.
526 /// @return The binary ORed value.
527 Code& operator|=(const SatelliteSystem& rhs);
528
529 // #####################################################################################################################################
530
531 /// @brief Allows filtering Code with Frequency.
532 /// @param[in] lhs Left-hand side enum value.
533 /// @param[in] rhs Right-hand side enum value.
534 /// @return The binary ANDed value.
535 friend Code operator&(Code lhs, Frequency_ rhs);
536 /// @brief Allows filtering Code with Frequency.
537 /// @param[in] lhs Left-hand side enum value.
538 /// @param[in] rhs Right-hand side enum value.
539 /// @return The binary ANDed value.
540 friend Code operator&(Frequency_ lhs, Code rhs);
541 /// @brief Allows filtering Code with Frequency.
542 /// @param[in] rhs Right-hand side enum value.
543 /// @return The binary ANDed value.
544 Code& operator&=(const Frequency_& rhs);
545 /// @brief Allows filtering Code with Frequency.
546 /// @param[in] lhs Left-hand side enum value.
547 /// @param[in] rhs Right-hand side enum value.
548 /// @return The binary ANDed value.
549 friend Code operator&(Code lhs, Frequency rhs);
550 /// @brief Allows filtering Code with Frequency.
551 /// @param[in] lhs Left-hand side enum value.
552 /// @param[in] rhs Right-hand side enum value.
553 /// @return The binary ANDed value.
554 friend Code operator&(Frequency lhs, Code rhs);
555 /// @brief Allows filtering Code with Frequency.
556 /// @param[in] rhs Right-hand side enum value.
557 /// @return The binary ANDed value.
558 Code& operator&=(const Frequency& rhs);
559
560 /// @brief Allows filtering Code with Frequency.
561 /// @param[in] lhs Left-hand side enum value.
562 /// @param[in] rhs Right-hand side enum value.
563 /// @return The binary ORed value.
564 friend Code operator|(Code lhs, Frequency_ rhs);
565 /// @brief Allows filtering Code with Frequency.
566 /// @param[in] lhs Left-hand side enum value.
567 /// @param[in] rhs Right-hand side enum value.
568 /// @return The binary ORed value.
569 friend Code operator|(Frequency_ lhs, Code rhs);
570 /// @brief Allows filtering Code with Frequency.
571 /// @param[in] rhs Right-hand side enum value.
572 /// @return The binary ORed value.
573 Code& operator|=(const Frequency_& rhs);
574 /// @brief Allows filtering Code with Frequency.
575 /// @param[in] lhs Left-hand side enum value.
576 /// @param[in] rhs Right-hand side enum value.
577 /// @return The binary ORed value.
578 friend Code operator|(Code lhs, Frequency rhs);
579 /// @brief Allows filtering Code with Frequency.
580 /// @param[in] lhs Left-hand side enum value.
581 /// @param[in] rhs Right-hand side enum value.
582 /// @return The binary ORed value.
583 friend Code operator|(Frequency lhs, Code rhs);
584 /// @brief Allows filtering Code with Frequency.
585 /// @param[in] rhs Right-hand side enum value.
586 /// @return The binary ORed value.
587 Code& operator|=(const Frequency& rhs);
588
589 // #####################################################################################################################################
590
591 private:
592 /// Code bitset
594};
595
596// #########################################################################################################################################
597
598/// @brief Converts the provided link into a json object
599/// @param[out] j Json object which gets filled with the info
600/// @param[in] data Data to convert into json
601void to_json(json& j, const Code& data);
602/// @brief Converts the provided json object into a link object
603/// @param[in] j Json object with the needed values
604/// @param[out] data Object to fill from the json
605void from_json(const json& j, Code& data);
606
607// #########################################################################################################################################
608
609/// @brief Allows combining flags of the Code enum.
610/// @param[in] lhs Left-hand side value.
611/// @param[in] rhs Right-hand side value.
612/// @return The binary ORed value.
613Code operator|(const Code::Enum& lhs, const Code::Enum& rhs);
614/// @brief Allows combining flags of the Code enum.
615/// @param[in] lhs Left-hand side value.
616/// @param[in] rhs Right-hand side value.
617/// @return The binary ANDed value.
618Code operator&(const Code::Enum& lhs, const Code::Enum& rhs);
619
620const Code Code_G1S_G1L_G1X = Code::G1S | Code::G1L | Code::G1X; ///< L1C (data, pilot, combined)
621const Code Code_G2S_G2L_G2X = Code::G2S | Code::G2L | Code::G2X; ///< L2C-code (medium, long, combined)
622const Code Code_G5I_G5Q_G5X = Code::G5I | Code::G5Q | Code::G5X; ///< L5 (data, pilot, combined)
623
624const Code Code_E1B_E1C_E1X = Code::E1B | Code::E1C | Code::E1X; ///< OS (data, pilot, combined)
625const Code Code_E5I_E5Q_E5X = Code::E5I | Code::E5Q | Code::E5X; ///< E5a (data, pilot, combined)
626const Code Code_E6B_E6C_E6X = Code::E6B | Code::E6C | Code::E6X; ///< E6 (data, pilot, combined)
627const Code Code_E7I_E7Q_E7X = Code::E7I | Code::E7Q | Code::E7X; ///< E5b (data, pilot, combined)
628const Code Code_E8I_E8Q_E8X = Code::E8I | Code::E8Q | Code::E8X; ///< E5 AltBOC (data, pilot, combined)
629
630const Code Code_R3I_R3Q_R3X = Code::R3I | Code::R3Q | Code::R3X; ///< L3 (data, pilot, combined)
631const Code Code_R4A_R4B_R4X = Code::R4A | Code::R4B | Code::R4X; ///< G1a (data, pilot, combined)
632const Code Code_R6A_R6B_R6X = Code::R6A | Code::R6B | Code::R6X; ///< G2a (data, pilot, combined)
633
634const Code Code_B1D_B1P_B1X = Code::B1D | Code::B1P | Code::B1X; ///< B1 (data, pilot, combined)
635const Code Code_B2I_B2Q_B2X = Code::B2I | Code::B2Q | Code::B2X; ///< B1I(OS), B1Q, combined
636const Code Code_B5D_B5P_B5X = Code::B5D | Code::B5P | Code::B5X; ///< B2a (data, pilot, combined)
637const Code Code_B6I_B6Q_B6X = Code::B6I | Code::B6Q | Code::B6X; ///< B3I, B3Q, combined
638const Code Code_B7I_B7Q_B7X = Code::B7I | Code::B7Q | Code::B7X; ///< B2I(OS), B2Q, combined
639const Code Code_B7D_B7P_B7Z = Code::B7D | Code::B7P | Code::B7Z; ///< B2b (data, pilot, combined)
640const Code Code_B8D_B8P_B8X = Code::B8D | Code::B8P | Code::B8X; ///< B2 (B2a+B2b) (data, pilot, combined)
641
642const Code Code_J1S_J1L_J1X = Code::J1S | Code::J1L | Code::J1X; ///< L1C (data, pilot, combined)
643const Code Code_J2S_J2L_J2X = Code::J2S | Code::J2L | Code::J2X; ///< L2C-code (medium, long, combined)
644const Code Code_J5I_J5Q_J5X = Code::J5I | Code::J5Q | Code::J5X; ///< L5 (data, pilot, combined)
645const Code Code_J5D_J5P_J5Z = Code::J5D | Code::J5P | Code::J5Z; ///< L5 (data, pilot, combined)
646const Code Code_J6S_J6L_J6X = Code::J6S | Code::J6L | Code::J6X; ///< LEX signal (short, long, combined)
647
648const Code Code_I5B_I5C_I5X = Code::I5B | Code::I5C | Code::I5X; ///< RS (data, pilot, combined)
649const Code Code_I9B_I9C_I9X = Code::I9B | Code::I9C | Code::I9X; ///< RS (data, pilot, combined)
650
651const Code Code_S5I_S5Q_S5X = Code::S5I | Code::S5Q | Code::S5X; ///< L5 (data, pilot, combined)
652
653const Code Code_ALL = Code(Code::Set().set()); ///< All codes set
654/// Default selection for codes
656 & ~Code(Code::G1Y) // GPS L1 - Y-code (with decryption)
657 & ~Code(Code::G1M) // GPS L1 - M-code
658 & ~Code(Code::G2Y) // GPS L2 - Y-code (with decryption)
659 & ~Code(Code::G2M); // GPS L2 - M-code
660
661/// @brief Shows a ComboBox to select signal codes
662/// @param[in] label Label to show beside the combo box. This has to be a unique id for ImGui.
663/// @param[in, out] code Reference to the code object to select
664/// @param[in] filterFreq Frequencies to select codes for. Other Frequencies will be disabled.
665/// @param[in] singleSelect If true, only one code can be selected at a time
666bool ShowCodeSelector(const char* label, Code& code, const Frequency& filterFreq, bool singleSelect = false);
667
668} // namespace NAV
669
670/// @brief Stream insertion operator overload
671/// @param[in, out] os Output stream object to stream the time into
672/// @param[in] obj Object to print
673/// @return Returns the output stream object in order to chain stream insertions
674std::ostream& operator<<(std::ostream& os, const NAV::Code& obj);
675
676namespace std
677{
678
679/// @brief Hash function for Frequency (needed for unordered_map)
680template<>
681struct hash<NAV::Code>
682{
683 /// @brief Hash function for signal code
684 /// @param[in] c Signal code
685 /// @return Has value for the signal code
686 std::size_t operator()(const NAV::Code& c) const
687 {
688 return static_cast<size_t>(c.getEnumValue());
689 }
690};
691} // namespace std
692
693#ifndef DOXYGEN_IGNORE
694
695/// @brief Formatter for Code
696template<>
697struct fmt::formatter<NAV::Code> : fmt::formatter<std::string>
698{
699 /// @brief Defines how to format Code structs
700 /// @param[in] code Struct to format
701 /// @param[in, out] ctx Format context
702 /// @return Output iterator
703 template<typename FormatContext>
704 auto format(const NAV::Code& code, FormatContext& ctx) const
705 {
706 return fmt::formatter<std::string>::format(std::string(code), ctx);
707 }
708};
709
710#endif
std::ostream & operator<<(std::ostream &os, const NAV::Code &obj)
Stream insertion operator overload.
Definition Code.cpp:1291
nlohmann::json json
json namespace
Frequency definition for different satellite systems.
GNSS Satellite System.
Enumerate for GNSS Codes.
Definition Code.hpp:89
Code & operator|=(const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:686
Set value
Code bitset.
Definition Code.hpp:593
constexpr Code(const Set &set)
Constructor from a biset.
Definition Code.hpp:300
const char * getDescription() const
Returns a short description for the code.
Definition Code.cpp:487
std::bitset< COUNT > Set
Typedef for the bitset with size of COUNT.
Definition Code.hpp:293
Enum
Enumeration of all Codes.
Definition Code.hpp:93
@ E6B
GAL E6 - Data.
Definition Code.hpp:128
@ G2P
GPS L2 - P-code (unencrypted)
Definition Code.hpp:110
@ G2C
GPS L2 - C/A-code.
Definition Code.hpp:105
@ R3X
GLO L3 - Combined.
Definition Code.hpp:145
@ B7I
BeiDou B2b (BDS-2) - B2I(OS)
Definition Code.hpp:166
@ R1C
GLO L1 - C/A-code.
Definition Code.hpp:139
@ R6A
GLO G2a - L2CSI (data)
Definition Code.hpp:149
@ J2L
QZSS L2 - L2C-code (long)
Definition Code.hpp:182
@ G1L
GPS L1 - L1C-P (pilot)
Definition Code.hpp:98
@ G2D
GPS L2 - Semi-codeless P(Y) tracking (L1 C/A + (P2-P1))
Definition Code.hpp:106
@ B6Q
BeiDou B3 - B3Q.
Definition Code.hpp:163
@ I5X
IRNSS L5 - RS (combined)
Definition Code.hpp:199
@ J6L
QZSS L6 - L6P LEX signal (long)
Definition Code.hpp:191
@ E7I
GAL E5b - Data.
Definition Code.hpp:132
@ E5Q
GAL E5a - Pilot.
Definition Code.hpp:125
@ B5P
BeiDou B2a - Pilot(P)
Definition Code.hpp:160
@ B7D
BeiDou B2b (BDS-3) - Data (D)
Definition Code.hpp:169
@ B5X
BeiDou B2a - D+P.
Definition Code.hpp:161
@ S1C
SBAS L1 - C/A-code.
Definition Code.hpp:205
@ S5Q
SBAS L5 - Pilot.
Definition Code.hpp:207
@ G1Y
GPS L1 - Y-code (with decryption)
Definition Code.hpp:102
@ G1X
GPS L1 - L1C-(D+P) (combined)
Definition Code.hpp:99
@ E1B
GAL E1 - OS (data)
Definition Code.hpp:120
@ G1M
GPS L1 - M-code.
Definition Code.hpp:103
@ J5I
QZSS L5 - Data.
Definition Code.hpp:184
@ J1Z
QZSS L1 - L1-SAIF signal.
Definition Code.hpp:180
@ J5P
QZSS L5S - Q.
Definition Code.hpp:188
@ G1N
GPS L1 - codeless.
Definition Code.hpp:104
@ G2X
GPS L2 - L2C(M+L) (combined)
Definition Code.hpp:109
@ J6X
QZSS L6 - L6(D+P) LEX signal (combined)
Definition Code.hpp:192
@ J5D
QZSS L5S - I.
Definition Code.hpp:187
@ E6X
GAL E6 - Combined (B+C)
Definition Code.hpp:130
@ J1L
QZSS L1 - L1C (pilot)
Definition Code.hpp:178
@ J1S
QZSS L1 - L1C (data)
Definition Code.hpp:177
@ I5C
IRNSS L5 - RS (pilot)
Definition Code.hpp:198
@ J5Z
QZSS L5S - I+Q.
Definition Code.hpp:189
@ I5B
IRNSS L5 - RS (data)
Definition Code.hpp:197
@ J1X
QZSS L1 - L1C (combined)
Definition Code.hpp:179
@ J6E
QZSS L6 - L6E.
Definition Code.hpp:193
@ E8X
GAL E5(a+b) - AltBOC (combined)
Definition Code.hpp:137
@ R2C
GLO L2 - C/A-code.
Definition Code.hpp:141
@ B6A
BeiDou B3 - B3A.
Definition Code.hpp:165
@ G2Y
GPS L2 - Y-code (with decryption)
Definition Code.hpp:112
@ G5X
GPS L5 - Combined.
Definition Code.hpp:117
@ E5I
GAL E5a - Data.
Definition Code.hpp:124
@ E1Z
GAL E1 - PRS + OS (data + pilot)
Definition Code.hpp:123
@ R3Q
GLO L3 - Pilot.
Definition Code.hpp:144
@ J1C
QZSS L1 - C/A-code.
Definition Code.hpp:176
@ J5Q
QZSS L5 - Pilot.
Definition Code.hpp:185
@ E6Z
GAL E6 - PRS + OS (A+B+C)
Definition Code.hpp:131
@ R3I
GLO L3 - Data.
Definition Code.hpp:143
@ None
None.
Definition Code.hpp:94
@ G1P
GPS L1 - P-code (unencrypted)
Definition Code.hpp:100
@ B1P
BeiDou B1 - Pilot(P)
Definition Code.hpp:154
@ J2X
QZSS L2 - L2C-code (combined)
Definition Code.hpp:183
@ G1C
GPS L1 - C/A-code.
Definition Code.hpp:96
@ B1D
BeiDou B1 - Data (D)
Definition Code.hpp:153
@ G1W
GPS L1 - Semicodeless P(Y) tracking (Z-tracking)
Definition Code.hpp:101
@ G2L
GPS L2 - L2C(L) (long)
Definition Code.hpp:108
@ I5A
IRNSS L5 - SPS Signal.
Definition Code.hpp:196
@ R1P
GLO L1 - P-code.
Definition Code.hpp:140
@ R6B
GLO G2a - L2OCp (pilot)
Definition Code.hpp:150
@ I9X
IRNSS S - RS (combined)
Definition Code.hpp:203
@ E7X
GAL E5b - Combined.
Definition Code.hpp:134
@ B8X
BeiDou B2 (B2a+B2b) - D+P.
Definition Code.hpp:174
@ B2Q
BeiDou B1-2 - B1Q.
Definition Code.hpp:157
@ R4X
GLO G1a - L1OCd+L1OCp (combined)
Definition Code.hpp:148
@ J5X
QZSS L5 - Combined.
Definition Code.hpp:186
@ B8D
BeiDou B2 (B2a+B2b) - Data (D)
Definition Code.hpp:172
@ E8I
GAL E5(a+b) - AltBOC (data)
Definition Code.hpp:135
@ G5Q
GPS L5 - Pilot.
Definition Code.hpp:116
@ B7P
BeiDou B2b (BDS-3) - Pilot(P)
Definition Code.hpp:170
@ G2W
GPS L2 - Semicodeless P(Y) tracking (Z-tracking)
Definition Code.hpp:111
@ G2M
GPS L2 - M-code.
Definition Code.hpp:113
@ R2P
GLO L2 - P-code.
Definition Code.hpp:142
@ G2N
GPS L2 - codeless.
Definition Code.hpp:114
@ E1A
GAL E1 - PRS signal.
Definition Code.hpp:119
@ S5X
SBAS L5 - Combined.
Definition Code.hpp:208
@ E8Q
GAL E5(a+b) - AltBOC (pilot)
Definition Code.hpp:136
@ B5D
BeiDou B2a - Data (D)
Definition Code.hpp:159
@ J6S
QZSS L6 - L6D LEX signal (short)
Definition Code.hpp:190
@ R4B
GLO G1a - L1OCp (pilot)
Definition Code.hpp:147
@ G5I
GPS L5 - Data.
Definition Code.hpp:115
@ S5I
SBAS L5 - Data.
Definition Code.hpp:206
@ I9A
IRNSS S - SPS signal.
Definition Code.hpp:200
@ B6X
BeiDou B3 - B3I, B3Q, combined.
Definition Code.hpp:164
@ B7X
BeiDou B2b (BDS-2) - B2I(OS), B2Q, combined.
Definition Code.hpp:168
@ E1X
GAL E1 - OS(B+C) (combined)
Definition Code.hpp:122
@ E6A
GAL E6 - PRS signal.
Definition Code.hpp:127
@ B2I
BeiDou B1-2 - B1I(OS)
Definition Code.hpp:156
@ E6C
GAL E6 - Pilot.
Definition Code.hpp:129
@ B7Q
BeiDou B2b (BDS-2) - B2Q.
Definition Code.hpp:167
@ J6Z
QZSS L6 - L6(D+E)
Definition Code.hpp:194
@ R6X
GLO G2a - L2CSI+L2OCp (combined)
Definition Code.hpp:151
@ G1S
GPS L1 - L1C-D (data)
Definition Code.hpp:97
@ I9C
IRNSS S - RS (pilot)
Definition Code.hpp:202
@ B2X
BeiDou B1-2 - B1I(OS), B1Q, combined.
Definition Code.hpp:158
@ B7Z
BeiDou B2b (BDS-3) - D+P.
Definition Code.hpp:171
@ E7Q
GAL E5b - Pilot.
Definition Code.hpp:133
@ B8P
BeiDou B2 (B2a+B2b) - Pilot(P)
Definition Code.hpp:173
@ B6I
BeiDou B3 - B3I.
Definition Code.hpp:162
@ B1X
BeiDou B1 - D+P.
Definition Code.hpp:155
@ E1C
GAL E1 - OS (pilot)
Definition Code.hpp:121
@ G2S
GPS L2 - L2C(M) (medium)
Definition Code.hpp:107
@ I9B
IRNSS S - RS (data)
Definition Code.hpp:201
@ E5X
GAL E5a - Combined.
Definition Code.hpp:126
@ J2S
QZSS L2 - L2C-code (medium)
Definition Code.hpp:181
@ R4A
GLO G1a - L1OCd (data)
Definition Code.hpp:146
static Frequency GetCodeFequency(Code code)
Returns the frequency for the code.
Definition Code.cpp:492
Frequency getFrequency() const
Returns the frequency for the code.
Definition Code.cpp:611
Code & operator&=(const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:719
friend bool operator!=(const Code &lhs, const Code &rhs)
Inequal compares values.
Definition Code.cpp:752
static Enum GetCodeEnumValue(Code code)
Returns the enum value for the code (only one must be set)
Definition Code.cpp:657
friend Code operator&(const Code &lhs, const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:697
friend Code operator|(const Code &lhs, const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:673
Enum getEnumValue() const
Returns the enum value for the code (only one must be set)
Definition Code.cpp:666
Code(Enum e)
Constructor from a single code value.
Definition Code.hpp:312
friend bool operator==(const Code &lhs, const Code &rhs)
Equal compares values.
Definition Code.cpp:737
static bool IsCodeCombined(Code first, Code second)
Checks if the codes are part of a combined code.
Definition Code.cpp:616
static Code fromFreqAttr(Frequency freq, char attribute)
Generates a Code from frequency and attribute.
Definition Code.cpp:188
Code operator~() const
Allows negating flags of the Code enum.
Definition Code.cpp:730
constexpr Code()=default
Default constructor for an empty code.
static std::vector< Code > GetAll()
Returns a list with all possible codes.
Definition Code.cpp:646
@ _S05_START
SBAS L start index in the Enum.
Definition Code.hpp:286
@ _GAL_START
GAL start index in the Enum.
Definition Code.hpp:215
@ _GPS_END
GPS end index in the Enum.
Definition Code.hpp:214
@ _J06_END
QZSS L6 end index in the Enum.
Definition Code.hpp:277
@ _GAL_END
GAL end index in the Enum.
Definition Code.hpp:216
@ _R04_END
GLO G1a end index in the Enum.
Definition Code.hpp:253
@ _R04_START
GLO G1a start index in the Enum.
Definition Code.hpp:252
@ _B06_END
BDS B3 end index in the Enum.
Definition Code.hpp:264
@ _I09_END
IRNSS S end index in the Enum.
Definition Code.hpp:282
@ _E01_START
GAL E1 start index in the Enum.
Definition Code.hpp:235
@ _E06_START
GAL E6 start index in the Enum.
Definition Code.hpp:239
@ _G05_START
GPS L5 start index in the Enum.
Definition Code.hpp:232
@ _B08_END
BDS B2 (B2a+B2b) end index in the Enum.
Definition Code.hpp:268
@ _R01_START
GLO L1 start index in the Enum.
Definition Code.hpp:246
@ _B05_START
BDS B2a start index in the Enum.
Definition Code.hpp:261
@ _B07_START
BDS B2b start index in the Enum.
Definition Code.hpp:265
@ _J05_START
QZSS L5 start index in the Enum.
Definition Code.hpp:274
@ _IRNSS_END
IRNSS end index in the Enum.
Definition Code.hpp:224
@ _S01_END
SBAS L end index in the Enum.
Definition Code.hpp:285
@ _J05_END
QZSS L5 end index in the Enum.
Definition Code.hpp:275
@ _J01_END
QZSS L1 end index in the Enum.
Definition Code.hpp:271
@ _E07_START
GAL E5b start index in the Enum.
Definition Code.hpp:241
@ _R03_END
GLO L3 end index in the Enum.
Definition Code.hpp:251
@ _R03_START
GLO L3 start index in the Enum.
Definition Code.hpp:250
@ _E01_END
GAL E1 end index in the Enum.
Definition Code.hpp:236
@ _B05_END
BDS B2a end index in the Enum.
Definition Code.hpp:262
@ _QZSS_END
QZSS end index in the Enum.
Definition Code.hpp:222
@ _E08_END
GAL E5(a+b) end index in the Enum.
Definition Code.hpp:244
@ _GLO_START
GLO start index in the Enum.
Definition Code.hpp:217
@ _G02_END
GPS L2 end index in the Enum.
Definition Code.hpp:231
@ _GPS_START
GPS start index in the Enum.
Definition Code.hpp:213
@ _IRNSS_START
IRNSS start index in the Enum.
Definition Code.hpp:223
@ _B01_START
BDS B1 start index in the Enum.
Definition Code.hpp:257
@ _J02_START
QZSS L2 start index in the Enum.
Definition Code.hpp:272
@ _B06_START
BDS B3 start index in the Enum.
Definition Code.hpp:263
@ _QZSS_START
QZSS start index in the Enum.
Definition Code.hpp:221
@ _S05_END
SBAS L end index in the Enum.
Definition Code.hpp:287
@ _R06_END
GLO G2a end index in the Enum.
Definition Code.hpp:255
@ _G05_END
GPS L5 end index in the Enum.
Definition Code.hpp:233
@ _BDS_END
BDS end index in the Enum.
Definition Code.hpp:220
@ _E07_END
GAL E5b end index in the Enum.
Definition Code.hpp:242
@ _E06_END
GAL E6 end index in the Enum.
Definition Code.hpp:240
@ _J01_START
QZSS L1 start index in the Enum.
Definition Code.hpp:270
@ _G02_START
GPS L2 start index in the Enum.
Definition Code.hpp:230
@ _S01_START
SBAS L start index in the Enum.
Definition Code.hpp:284
@ _SBAS_START
SBAS start index in the Enum.
Definition Code.hpp:225
@ _B02_START
BDS B1-2 start index in the Enum.
Definition Code.hpp:259
@ _I05_START
IRNSS L5 start index in the Enum.
Definition Code.hpp:279
@ _G01_START
GPS L1 start index in the Enum.
Definition Code.hpp:228
@ _BDS_START
BDS start index in the Enum.
Definition Code.hpp:219
@ _B01_END
BDS B1 end index in the Enum.
Definition Code.hpp:258
@ _R02_END
GLO L2 end index in the Enum.
Definition Code.hpp:249
@ _J06_START
QZSS L6 start index in the Enum.
Definition Code.hpp:276
@ _B08_START
BDS B2 (B2a+B2b) start index in the Enum.
Definition Code.hpp:267
@ _GLO_END
GLO end index in the Enum.
Definition Code.hpp:218
@ _G01_END
GPS L1 end index in the Enum.
Definition Code.hpp:229
@ _E05_END
GAL E5a end index in the Enum.
Definition Code.hpp:238
@ _R06_START
GLO G2a start index in the Enum.
Definition Code.hpp:254
@ _E08_START
GAL E5(a+b) start index in the Enum.
Definition Code.hpp:243
@ _SBAS_END
SBAS end index in the Enum.
Definition Code.hpp:226
@ _I09_START
IRNSS S start index in the Enum.
Definition Code.hpp:281
@ _R02_START
GLO L2 start index in the Enum.
Definition Code.hpp:248
@ _R01_END
GLO L1 end index in the Enum.
Definition Code.hpp:247
@ COUNT
Amount of Codes in the Enum.
Definition Code.hpp:289
@ _E05_START
GAL E5a start index in the Enum.
Definition Code.hpp:237
@ _I05_END
IRNSS L5 end index in the Enum.
Definition Code.hpp:280
@ _B07_END
BDS B2b end index in the Enum.
Definition Code.hpp:266
@ _B02_END
BDS B1-2 end index in the Enum.
Definition Code.hpp:260
@ _J02_END
QZSS L2 end index in the Enum.
Definition Code.hpp:273
static const char * GetCodeDescription(Code code)
Returns a short description for the code.
Definition Code.cpp:368
friend bool operator<(const Code &lhs, const Code &rhs)
Less than comparison.
Definition Code.cpp:767
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
void to_json(json &j, const Node &node)
Converts the provided node into a json object.
Definition Node.cpp:990
const Code Code_G5I_G5Q_G5X
L5 (data, pilot, combined)
Definition Code.hpp:622
const Code Code_I5B_I5C_I5X
RS (data, pilot, combined)
Definition Code.hpp:648
const Code Code_E8I_E8Q_E8X
E5 AltBOC (data, pilot, combined)
Definition Code.hpp:628
Frequency_
Enumerate for GNSS frequencies.
Definition Frequency.hpp:26
const Code Code_J1S_J1L_J1X
L1C (data, pilot, combined)
Definition Code.hpp:642
const Code Code_B8D_B8P_B8X
B2 (B2a+B2b) (data, pilot, combined)
Definition Code.hpp:640
bool ShowCodeSelector(const char *label, Code &code, const Frequency &filterFreq, bool singleSelect)
Shows a ComboBox to select signal codes.
Definition Code.cpp:1199
const Code Code_B7I_B7Q_B7X
B2I(OS), B2Q, combined.
Definition Code.hpp:638
const Code Code_ALL
Definition Code.hpp:653
const Code Code_B1D_B1P_B1X
B1 (data, pilot, combined)
Definition Code.hpp:634
const Code Code_B5D_B5P_B5X
B2a (data, pilot, combined)
Definition Code.hpp:636
const Code Code_E7I_E7Q_E7X
E5b (data, pilot, combined)
Definition Code.hpp:627
const Code Code_Default
Default selection for codes.
Definition Code.hpp:655
Code operator&(const Code &lhs, const Code &rhs)
Definition Code.cpp:697
const Code Code_B2I_B2Q_B2X
B1I(OS), B1Q, combined.
Definition Code.hpp:635
void from_json(const json &j, Node &node)
Converts the provided json object into a node object.
Definition Node.cpp:1007
const Code Code_E1B_E1C_E1X
OS (data, pilot, combined)
Definition Code.hpp:624
const Code Code_J5I_J5Q_J5X
L5 (data, pilot, combined)
Definition Code.hpp:644
const Code Code_R3I_R3Q_R3X
L3 (data, pilot, combined)
Definition Code.hpp:630
const Code Code_B7D_B7P_B7Z
B2b (data, pilot, combined)
Definition Code.hpp:639
const Code Code_R4A_R4B_R4X
G1a (data, pilot, combined)
Definition Code.hpp:631
const Code Code_E5I_E5Q_E5X
E5a (data, pilot, combined)
Definition Code.hpp:625
const Code Code_J6S_J6L_J6X
LEX signal (short, long, combined)
Definition Code.hpp:646
const Code Code_S5I_S5Q_S5X
L5 (data, pilot, combined)
Definition Code.hpp:651
const Code Code_I9B_I9C_I9X
RS (data, pilot, combined)
Definition Code.hpp:649
const Code Code_E6B_E6C_E6X
E6 (data, pilot, combined)
Definition Code.hpp:626
const Code Code_B6I_B6Q_B6X
B3I, B3Q, combined.
Definition Code.hpp:637
Code operator|(const Code &lhs, const Code &rhs)
Definition Code.cpp:673
const Code Code_J5D_J5P_J5Z
L5 (data, pilot, combined)
Definition Code.hpp:645
SatelliteSystem_
Satellite System enumeration.
const Code Code_R6A_R6B_R6X
G2a (data, pilot, combined)
Definition Code.hpp:632
const Code Code_G2S_G2L_G2X
L2C-code (medium, long, combined)
Definition Code.hpp:621
const Code Code_J2S_J2L_J2X
L2C-code (medium, long, combined)
Definition Code.hpp:643
const Code Code_G1S_G1L_G1X
L1C (data, pilot, combined)
Definition Code.hpp:620
Satellite System type.
std::size_t operator()(const NAV::Code &c) const
Hash function for signal code.
Definition Code.hpp:686