0.5.0
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 String representation
299 /// @param[in] str Code as string
300 explicit Code(const std::string& str);
301
302 /// @brief Constructor from a biset
303 /// @param[in] set Bitset with values to construct the Code from
304 constexpr explicit Code(const Set& set) : value(set) {}
305
306 /// @brief Constructor from a satellite system
307 /// @param[in] sys System to set all codes for
308 explicit Code(SatelliteSystem_ sys);
309
310 /// @brief Constructor from a frequency
311 /// @param[in] freq Frequency to set all codes for
312 explicit Code(Frequency_ freq);
313
314 /// @brief Constructor from a single code value
315 /// @param[in] e Code enum value to construct the code from
316 Code(Enum e) { value.set(e, true); } // NOLINT(hicpp-explicit-conversions, google-explicit-constructor)
317
318 /// Implicit bool conversion operator. Allows if(...)
319 explicit operator bool() const { return value.any(); }
320
321 /// @brief std::bitset conversion operator
322 /// @return The bitset representation of the type
323 constexpr explicit operator Set() const { return value; }
324
325 /// @brief std::string conversion operator
326 /// @return A std::string representation of the type
327 explicit operator std::string() const;
328
329 /// @brief Generates a Code from frequency and attribute
330 /// @param[in] freq Frequency of the code
331 /// @param[in] attribute Attribute letter of the code
332 /// @return Code representation
333 static Code fromFreqAttr(Frequency freq, char attribute);
334
335 /// @brief Returns a short description for the code
336 /// @param[in] code GNSS signal code
337 static const char* GetCodeDescription(Code code);
338
339 /// @brief Returns a short description for the code
340 [[nodiscard]] const char* getDescription() const;
341
342 /// @brief Returns the frequency for the code
343 /// @param[in] code GNSS signal code
344 static Frequency GetCodeFequency(Code code);
345
346 /// @brief Returns the frequency for the code
347 [[nodiscard]] Frequency getFrequency() const;
348
349 /// @brief Checks if the codes are part of a combined code
350 /// @param[in] first First GNSS signal code
351 /// @param[in] second Second GNSS signal code
352 static bool IsCodeCombined(Code first, Code second);
353
354 /// @brief Returns a list with all possible codes
355 static std::vector<Code> GetAll();
356
357 /// @brief Returns the enum value for the code (only one must be set)
358 /// @param code GNSS signal code
359 static Enum GetCodeEnumValue(Code code);
360
361 /// @brief Returns the enum value for the code (only one must be set)
362 [[nodiscard]] Enum getEnumValue() const;
363
364 // #####################################################################################################################################
365
366 /// @brief Allows combining flags of the Code enum.
367 /// @param[in] lhs Left-hand side value.
368 /// @param[in] rhs Right-hand side value.
369 /// @return The binary ORed value.
370 friend Code operator|(const Code& lhs, const Code& rhs);
371 /// @brief Allows combining flags of the Code enum.
372 /// @param[in] lhs Left-hand side value.
373 /// @param[in] rhs Right-hand side value.
374 /// @return The binary ORed value.
375 friend Code operator|(const Code& lhs, const Enum& rhs);
376 /// @brief Allows combining flags of the Code enum.
377 /// @param[in] lhs Left-hand side value.
378 /// @param[in] rhs Right-hand side value.
379 /// @return The binary ORed value.
380 friend Code operator|(const Enum& lhs, const Code& rhs);
381
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 Code& rhs);
386 /// @brief Allows combining flags of the Code enum.
387 /// @param[in] rhs Right-hand side value.
388 /// @return The binary ORed value.
389 Code& operator|=(const Enum& rhs);
390
391 /// @brief Allows combining flags of the Code enum.
392 /// @param[in] lhs Left-hand side value.
393 /// @param[in] rhs Right-hand side value.
394 /// @return The binary ANDed value.
395 friend Code operator&(const Code& lhs, const Code& rhs);
396 /// @brief Allows combining flags of the Code enum.
397 /// @param[in] lhs Left-hand side value.
398 /// @param[in] rhs Right-hand side value.
399 /// @return The binary ANDed value.
400 friend Code operator&(const Code& lhs, const Enum& rhs);
401 /// @brief Allows combining flags of the Code enum.
402 /// @param[in] lhs Left-hand side value.
403 /// @param[in] rhs Right-hand side value.
404 /// @return The binary ANDed value.
405 friend Code operator&(const Enum& lhs, const Code& rhs);
406
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 Code& rhs);
411 /// @brief Allows combining flags of the Code enum.
412 /// @param[in] rhs Right-hand side value.
413 /// @return The binary ANDed value.
414 Code& operator&=(const Enum& rhs);
415
416 /// @brief Allows negating flags of the Code enum.
417 Code operator~() const;
418
419 // #####################################################################################################################################
420
421 /// @brief Equal compares values
422 /// @param[in] lhs Left-hand side of the operator
423 /// @param[in] rhs Right-hand side of the operator
424 /// @return Whether the comparison was successful
425 friend bool operator==(const Code& lhs, const Code& rhs);
426
427 /// @brief Equal compares values
428 /// @param[in] lhs Left-hand side of the operator
429 /// @param[in] rhs Right-hand side of the operator
430 /// @return Whether the comparison was successful
431 friend bool operator==(const Code& lhs, const Enum& rhs);
432
433 /// @brief Equal compares values
434 /// @param[in] lhs Left-hand side of the operator
435 /// @param[in] rhs Right-hand side of the operator
436 /// @return Whether the comparison was successful
437 friend bool operator==(const Enum& lhs, const Code& rhs);
438
439 /// @brief Inequal compares values
440 /// @param[in] lhs Left-hand side of the operator
441 /// @param[in] rhs Right-hand side of the operator
442 /// @return Whether the comparison was successful
443 friend bool operator!=(const Code& lhs, const Code& rhs);
444 /// @brief Inequal compares values
445 /// @param[in] lhs Left-hand side of the operator
446 /// @param[in] rhs Right-hand side of the operator
447 /// @return Whether the comparison was successful
448 friend bool operator!=(const Code& lhs, const Enum& rhs);
449 /// @brief Inequal compares values
450 /// @param[in] lhs Left-hand side of the operator
451 /// @param[in] rhs Right-hand side of the operator
452 /// @return Whether the comparison was successful
453 friend bool operator!=(const Enum& lhs, const Code& rhs);
454
455 /// @brief Less than comparison
456 /// @param[in] lhs Left-hand side of the operator
457 /// @param[in] rhs Right hand side of the operator
458 /// @return True if lhs < rhs
459 friend bool operator<(const Code& lhs, const Code& rhs);
460
461 /// @brief Less than comparison
462 /// @param[in] lhs Left-hand side of the operator
463 /// @param[in] rhs Right hand side of the operator
464 /// @return True if lhs < rhs
465 friend bool operator<(const Code& lhs, const Enum& rhs);
466
467 /// @brief Less than comparison
468 /// @param[in] lhs Left-hand side of the operator
469 /// @param[in] rhs Right hand side of the operator
470 /// @return True if lhs < rhs
471 friend bool operator<(const Enum& lhs, const Code& rhs);
472
473 // #####################################################################################################################################
474
475 /// @brief Allows filtering Code with SatelliteSystem.
476 /// @param[in] lhs Left-hand side enum value.
477 /// @param[in] rhs Right-hand side enum value.
478 /// @return The binary ANDed value.
479 friend Code operator&(Code lhs, SatelliteSystem_ rhs);
480 /// @brief Allows filtering Code with SatelliteSystem.
481 /// @param[in] lhs Left-hand side enum value.
482 /// @param[in] rhs Right-hand side enum value.
483 /// @return The binary ANDed value.
484 friend Code operator&(SatelliteSystem_ lhs, Code rhs);
485 /// @brief Allows filtering Code with SatelliteSystem.
486 /// @param[in] rhs Right-hand side enum value.
487 /// @return The binary ANDed value.
488 Code& operator&=(const SatelliteSystem_& rhs);
489 /// @brief Allows filtering Code with SatelliteSystem.
490 /// @param[in] lhs Left-hand side enum value.
491 /// @param[in] rhs Right-hand side enum value.
492 /// @return The binary ANDed value.
493 friend Code operator&(Code lhs, SatelliteSystem rhs);
494 /// @brief Allows filtering Code with SatelliteSystem.
495 /// @param[in] lhs Left-hand side enum value.
496 /// @param[in] rhs Right-hand side enum value.
497 /// @return The binary ANDed value.
498 friend Code operator&(SatelliteSystem lhs, Code rhs);
499 /// @brief Allows filtering Code with SatelliteSystem.
500 /// @param[in] rhs Right-hand side enum value.
501 /// @return The binary ANDed value.
502 Code& operator&=(const SatelliteSystem& rhs);
503
504 /// @brief Allows filtering Code with SatelliteSystem.
505 /// @param[in] lhs Left-hand side enum value.
506 /// @param[in] rhs Right-hand side enum value.
507 /// @return The binary ORed value.
508 friend Code operator|(Code lhs, SatelliteSystem_ rhs);
509 /// @brief Allows filtering Code with SatelliteSystem.
510 /// @param[in] lhs Left-hand side enum value.
511 /// @param[in] rhs Right-hand side enum value.
512 /// @return The binary ORed value.
513 friend Code operator|(SatelliteSystem_ lhs, Code rhs);
514 /// @brief Allows filtering Code with SatelliteSystem.
515 /// @param[in] rhs Right-hand side enum value.
516 /// @return The binary ORed value.
517 Code& operator|=(const SatelliteSystem_& rhs);
518 /// @brief Allows filtering Code with SatelliteSystem.
519 /// @param[in] lhs Left-hand side enum value.
520 /// @param[in] rhs Right-hand side enum value.
521 /// @return The binary ORed value.
522 friend Code operator|(Code lhs, SatelliteSystem rhs);
523 /// @brief Allows filtering Code with SatelliteSystem.
524 /// @param[in] lhs Left-hand side enum value.
525 /// @param[in] rhs Right-hand side enum value.
526 /// @return The binary ORed value.
527 friend Code operator|(SatelliteSystem lhs, Code rhs);
528 /// @brief Allows filtering Code with SatelliteSystem.
529 /// @param[in] rhs Right-hand side enum value.
530 /// @return The binary ORed value.
531 Code& operator|=(const SatelliteSystem& rhs);
532
533 // #####################################################################################################################################
534
535 /// @brief Allows filtering Code with Frequency.
536 /// @param[in] lhs Left-hand side enum value.
537 /// @param[in] rhs Right-hand side enum value.
538 /// @return The binary ANDed value.
539 friend Code operator&(Code lhs, Frequency_ rhs);
540 /// @brief Allows filtering Code with Frequency.
541 /// @param[in] lhs Left-hand side enum value.
542 /// @param[in] rhs Right-hand side enum value.
543 /// @return The binary ANDed value.
544 friend Code operator&(Frequency_ lhs, Code rhs);
545 /// @brief Allows filtering Code with Frequency.
546 /// @param[in] rhs Right-hand side enum value.
547 /// @return The binary ANDed value.
548 Code& operator&=(const Frequency_& rhs);
549 /// @brief Allows filtering Code with Frequency.
550 /// @param[in] lhs Left-hand side enum value.
551 /// @param[in] rhs Right-hand side enum value.
552 /// @return The binary ANDed value.
553 friend Code operator&(Code lhs, Frequency rhs);
554 /// @brief Allows filtering Code with Frequency.
555 /// @param[in] lhs Left-hand side enum value.
556 /// @param[in] rhs Right-hand side enum value.
557 /// @return The binary ANDed value.
558 friend Code operator&(Frequency lhs, Code rhs);
559 /// @brief Allows filtering Code with Frequency.
560 /// @param[in] rhs Right-hand side enum value.
561 /// @return The binary ANDed value.
562 Code& operator&=(const Frequency& rhs);
563
564 /// @brief Allows filtering Code with Frequency.
565 /// @param[in] lhs Left-hand side enum value.
566 /// @param[in] rhs Right-hand side enum value.
567 /// @return The binary ORed value.
568 friend Code operator|(Code lhs, Frequency_ rhs);
569 /// @brief Allows filtering Code with Frequency.
570 /// @param[in] lhs Left-hand side enum value.
571 /// @param[in] rhs Right-hand side enum value.
572 /// @return The binary ORed value.
573 friend Code operator|(Frequency_ lhs, Code rhs);
574 /// @brief Allows filtering Code with Frequency.
575 /// @param[in] rhs Right-hand side enum value.
576 /// @return The binary ORed value.
577 Code& operator|=(const Frequency_& rhs);
578 /// @brief Allows filtering Code with Frequency.
579 /// @param[in] lhs Left-hand side enum value.
580 /// @param[in] rhs Right-hand side enum value.
581 /// @return The binary ORed value.
582 friend Code operator|(Code lhs, Frequency rhs);
583 /// @brief Allows filtering Code with Frequency.
584 /// @param[in] lhs Left-hand side enum value.
585 /// @param[in] rhs Right-hand side enum value.
586 /// @return The binary ORed value.
587 friend Code operator|(Frequency lhs, Code rhs);
588 /// @brief Allows filtering Code with Frequency.
589 /// @param[in] rhs Right-hand side enum value.
590 /// @return The binary ORed value.
591 Code& operator|=(const Frequency& rhs);
592
593 // #####################################################################################################################################
594
595 private:
596 /// Code bitset
598};
599
600// #########################################################################################################################################
601
602/// @brief Converts the provided link into a json object
603/// @param[out] j Json object which gets filled with the info
604/// @param[in] data Data to convert into json
605void to_json(json& j, const Code& data);
606/// @brief Converts the provided json object into a link object
607/// @param[in] j Json object with the needed values
608/// @param[out] data Object to fill from the json
609void from_json(const json& j, Code& data);
610
611// #########################################################################################################################################
612
613/// @brief Allows combining flags of the Code enum.
614/// @param[in] lhs Left-hand side value.
615/// @param[in] rhs Right-hand side value.
616/// @return The binary ORed value.
617Code operator|(const Code::Enum& lhs, const Code::Enum& rhs);
618/// @brief Allows combining flags of the Code enum.
619/// @param[in] lhs Left-hand side value.
620/// @param[in] rhs Right-hand side value.
621/// @return The binary ANDed value.
622Code operator&(const Code::Enum& lhs, const Code::Enum& rhs);
623
624const Code Code_G1S_G1L_G1X = Code::G1S | Code::G1L | Code::G1X; ///< L1C (data, pilot, combined)
625const Code Code_G2S_G2L_G2X = Code::G2S | Code::G2L | Code::G2X; ///< L2C-code (medium, long, combined)
626const Code Code_G5I_G5Q_G5X = Code::G5I | Code::G5Q | Code::G5X; ///< L5 (data, pilot, combined)
627
628const Code Code_E1B_E1C_E1X = Code::E1B | Code::E1C | Code::E1X; ///< OS (data, pilot, combined)
629const Code Code_E5I_E5Q_E5X = Code::E5I | Code::E5Q | Code::E5X; ///< E5a (data, pilot, combined)
630const Code Code_E6B_E6C_E6X = Code::E6B | Code::E6C | Code::E6X; ///< E6 (data, pilot, combined)
631const Code Code_E7I_E7Q_E7X = Code::E7I | Code::E7Q | Code::E7X; ///< E5b (data, pilot, combined)
632const Code Code_E8I_E8Q_E8X = Code::E8I | Code::E8Q | Code::E8X; ///< E5 AltBOC (data, pilot, combined)
633
634const Code Code_R3I_R3Q_R3X = Code::R3I | Code::R3Q | Code::R3X; ///< L3 (data, pilot, combined)
635const Code Code_R4A_R4B_R4X = Code::R4A | Code::R4B | Code::R4X; ///< G1a (data, pilot, combined)
636const Code Code_R6A_R6B_R6X = Code::R6A | Code::R6B | Code::R6X; ///< G2a (data, pilot, combined)
637
638const Code Code_B1D_B1P_B1X = Code::B1D | Code::B1P | Code::B1X; ///< B1 (data, pilot, combined)
639const Code Code_B2I_B2Q_B2X = Code::B2I | Code::B2Q | Code::B2X; ///< B1I(OS), B1Q, combined
640const Code Code_B5D_B5P_B5X = Code::B5D | Code::B5P | Code::B5X; ///< B2a (data, pilot, combined)
641const Code Code_B6I_B6Q_B6X = Code::B6I | Code::B6Q | Code::B6X; ///< B3I, B3Q, combined
642const Code Code_B7I_B7Q_B7X = Code::B7I | Code::B7Q | Code::B7X; ///< B2I(OS), B2Q, combined
643const Code Code_B7D_B7P_B7Z = Code::B7D | Code::B7P | Code::B7Z; ///< B2b (data, pilot, combined)
644const Code Code_B8D_B8P_B8X = Code::B8D | Code::B8P | Code::B8X; ///< B2 (B2a+B2b) (data, pilot, combined)
645
646const Code Code_J1S_J1L_J1X = Code::J1S | Code::J1L | Code::J1X; ///< L1C (data, pilot, combined)
647const Code Code_J2S_J2L_J2X = Code::J2S | Code::J2L | Code::J2X; ///< L2C-code (medium, long, combined)
648const Code Code_J5I_J5Q_J5X = Code::J5I | Code::J5Q | Code::J5X; ///< L5 (data, pilot, combined)
649const Code Code_J5D_J5P_J5Z = Code::J5D | Code::J5P | Code::J5Z; ///< L5 (data, pilot, combined)
650const Code Code_J6S_J6L_J6X = Code::J6S | Code::J6L | Code::J6X; ///< LEX signal (short, long, combined)
651
652const Code Code_I5B_I5C_I5X = Code::I5B | Code::I5C | Code::I5X; ///< RS (data, pilot, combined)
653const Code Code_I9B_I9C_I9X = Code::I9B | Code::I9C | Code::I9X; ///< RS (data, pilot, combined)
654
655const Code Code_S5I_S5Q_S5X = Code::S5I | Code::S5Q | Code::S5X; ///< L5 (data, pilot, combined)
656
657const Code Code_ALL = Code(Code::Set().set()); ///< All codes set
658/// Default selection for codes
660 & ~Code(Code::G1Y) // GPS L1 - Y-code (with decryption)
661 & ~Code(Code::G1M) // GPS L1 - M-code
662 & ~Code(Code::G2Y) // GPS L2 - Y-code (with decryption)
663 & ~Code(Code::G2M); // GPS L2 - M-code
664
665/// @brief Shows a ComboBox to select signal codes
666/// @param[in] label Label to show beside the combo box. This has to be a unique id for ImGui.
667/// @param[in, out] code Reference to the code object to select
668/// @param[in] filterFreq Frequencies to select codes for. Other Frequencies will be disabled.
669/// @param[in] singleSelect If true, only one code can be selected at a time
670bool ShowCodeSelector(const char* label, Code& code, const Frequency& filterFreq, bool singleSelect = false);
671
672} // namespace NAV
673
674/// @brief Stream insertion operator overload
675/// @param[in, out] os Output stream object to stream the time into
676/// @param[in] obj Object to print
677/// @return Returns the output stream object in order to chain stream insertions
678std::ostream& operator<<(std::ostream& os, const NAV::Code& obj);
679
680namespace std
681{
682
683/// @brief Hash function for Frequency (needed for unordered_map)
684template<>
685struct hash<NAV::Code>
686{
687 /// @brief Hash function for signal code
688 /// @param[in] c Signal code
689 /// @return Has value for the signal code
690 std::size_t operator()(const NAV::Code& c) const
691 {
692 return static_cast<size_t>(c.getEnumValue());
693 }
694};
695} // namespace std
696
697#ifndef DOXYGEN_IGNORE
698
699/// @brief Formatter for Code
700template<>
701struct fmt::formatter<NAV::Code> : fmt::formatter<std::string>
702{
703 /// @brief Defines how to format Code structs
704 /// @param[in] code Struct to format
705 /// @param[in, out] ctx Format context
706 /// @return Output iterator
707 template<typename FormatContext>
708 auto format(const NAV::Code& code, FormatContext& ctx) const
709 {
710 return fmt::formatter<std::string>::format(std::string(code), ctx);
711 }
712};
713
714#endif
std::ostream & operator<<(std::ostream &os, const NAV::Code &obj)
Stream insertion operator overload.
Definition Code.cpp:1402
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:797
Set value
Code bitset.
Definition Code.hpp:597
constexpr Code(const Set &set)
Constructor from a biset.
Definition Code.hpp:304
const char * getDescription() const
Returns a short description for the code.
Definition Code.cpp:598
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:603
Frequency getFrequency() const
Returns the frequency for the code.
Definition Code.cpp:722
Code & operator&=(const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:830
friend bool operator!=(const Code &lhs, const Code &rhs)
Inequal compares values.
Definition Code.cpp:863
static Enum GetCodeEnumValue(Code code)
Returns the enum value for the code (only one must be set)
Definition Code.cpp:768
friend Code operator&(const Code &lhs, const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:808
friend Code operator|(const Code &lhs, const Code &rhs)
Allows combining flags of the Code enum.
Definition Code.cpp:784
Enum getEnumValue() const
Returns the enum value for the code (only one must be set)
Definition Code.cpp:777
Code(Enum e)
Constructor from a single code value.
Definition Code.hpp:316
friend bool operator==(const Code &lhs, const Code &rhs)
Equal compares values.
Definition Code.cpp:848
static bool IsCodeCombined(Code first, Code second)
Checks if the codes are part of a combined code.
Definition Code.cpp:727
static Code fromFreqAttr(Frequency freq, char attribute)
Generates a Code from frequency and attribute.
Definition Code.cpp:299
Code operator~() const
Allows negating flags of the Code enum.
Definition Code.cpp:841
constexpr Code()=default
Default constructor for an empty code.
static std::vector< Code > GetAll()
Returns a list with all possible codes.
Definition Code.cpp:757
@ _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:479
friend bool operator<(const Code &lhs, const Code &rhs)
Less than comparison.
Definition Code.cpp:878
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:626
const Code Code_I5B_I5C_I5X
RS (data, pilot, combined)
Definition Code.hpp:652
const Code Code_E8I_E8Q_E8X
E5 AltBOC (data, pilot, combined)
Definition Code.hpp:632
Frequency_
Enumerate for GNSS frequencies.
Definition Frequency.hpp:26
const Code Code_J1S_J1L_J1X
L1C (data, pilot, combined)
Definition Code.hpp:646
const Code Code_B8D_B8P_B8X
B2 (B2a+B2b) (data, pilot, combined)
Definition Code.hpp:644
bool ShowCodeSelector(const char *label, Code &code, const Frequency &filterFreq, bool singleSelect)
Shows a ComboBox to select signal codes.
Definition Code.cpp:1310
const Code Code_B7I_B7Q_B7X
B2I(OS), B2Q, combined.
Definition Code.hpp:642
const Code Code_ALL
Definition Code.hpp:657
const Code Code_B1D_B1P_B1X
B1 (data, pilot, combined)
Definition Code.hpp:638
const Code Code_B5D_B5P_B5X
B2a (data, pilot, combined)
Definition Code.hpp:640
const Code Code_E7I_E7Q_E7X
E5b (data, pilot, combined)
Definition Code.hpp:631
const Code Code_Default
Default selection for codes.
Definition Code.hpp:659
Code operator&(const Code &lhs, const Code &rhs)
Definition Code.cpp:808
const Code Code_B2I_B2Q_B2X
B1I(OS), B1Q, combined.
Definition Code.hpp:639
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:628
const Code Code_J5I_J5Q_J5X
L5 (data, pilot, combined)
Definition Code.hpp:648
const Code Code_R3I_R3Q_R3X
L3 (data, pilot, combined)
Definition Code.hpp:634
const Code Code_B7D_B7P_B7Z
B2b (data, pilot, combined)
Definition Code.hpp:643
const Code Code_R4A_R4B_R4X
G1a (data, pilot, combined)
Definition Code.hpp:635
const Code Code_E5I_E5Q_E5X
E5a (data, pilot, combined)
Definition Code.hpp:629
const Code Code_J6S_J6L_J6X
LEX signal (short, long, combined)
Definition Code.hpp:650
const Code Code_S5I_S5Q_S5X
L5 (data, pilot, combined)
Definition Code.hpp:655
const Code Code_I9B_I9C_I9X
RS (data, pilot, combined)
Definition Code.hpp:653
const Code Code_E6B_E6C_E6X
E6 (data, pilot, combined)
Definition Code.hpp:630
const Code Code_B6I_B6Q_B6X
B3I, B3Q, combined.
Definition Code.hpp:641
Code operator|(const Code &lhs, const Code &rhs)
Definition Code.cpp:784
const Code Code_J5D_J5P_J5Z
L5 (data, pilot, combined)
Definition Code.hpp:649
SatelliteSystem_
Satellite System enumeration.
const Code Code_R6A_R6B_R6X
G2a (data, pilot, combined)
Definition Code.hpp:636
const Code Code_G2S_G2L_G2X
L2C-code (medium, long, combined)
Definition Code.hpp:625
const Code Code_J2S_J2L_J2X
L2C-code (medium, long, combined)
Definition Code.hpp:647
const Code Code_G1S_G1L_G1X
L1C (data, pilot, combined)
Definition Code.hpp:624
Satellite System type.
std::size_t operator()(const NAV::Code &c) const
Hash function for signal code.
Definition Code.hpp:690