18#include <fmt/format.h>
293 using Set = std::bitset<COUNT>;
315 explicit operator bool()
const {
return value.any(); }
319 constexpr explicit operator Set()
const {
return value; }
323 explicit operator std::string()
const;
351 static std::vector<Code>
GetAll();
693#ifndef DOXYGEN_IGNORE
697struct fmt::formatter<
NAV::Code> : fmt::formatter<std::string>
703 template<
typename FormatContext>
704 auto format(
const NAV::Code& code, FormatContext& ctx)
const
706 return fmt::formatter<std::string>::format(std::string(code), ctx);
std::ostream & operator<<(std::ostream &os, const NAV::Code &obj)
Stream insertion operator overload.
nlohmann::json json
json namespace
Frequency definition for different satellite systems.
Enumerate for GNSS Codes.
Code & operator|=(const Code &rhs)
Allows combining flags of the Code enum.
constexpr Code(const Set &set)
Constructor from a biset.
const char * getDescription() const
Returns a short description for the code.
std::bitset< COUNT > Set
Typedef for the bitset with size of COUNT.
Enum
Enumeration of all Codes.
@ G2P
GPS L2 - P-code (unencrypted)
@ B7I
BeiDou B2b (BDS-2) - B2I(OS)
@ R6A
GLO G2a - L2CSI (data)
@ J2L
QZSS L2 - L2C-code (long)
@ G1L
GPS L1 - L1C-P (pilot)
@ G2D
GPS L2 - Semi-codeless P(Y) tracking (L1 C/A + (P2-P1))
@ I5X
IRNSS L5 - RS (combined)
@ J6L
QZSS L6 - L6P LEX signal (long)
@ B5P
BeiDou B2a - Pilot(P)
@ B7D
BeiDou B2b (BDS-3) - Data (D)
@ G1Y
GPS L1 - Y-code (with decryption)
@ G1X
GPS L1 - L1C-(D+P) (combined)
@ J1Z
QZSS L1 - L1-SAIF signal.
@ G2X
GPS L2 - L2C(M+L) (combined)
@ J6X
QZSS L6 - L6(D+P) LEX signal (combined)
@ E6X
GAL E6 - Combined (B+C)
@ J1L
QZSS L1 - L1C (pilot)
@ J1S
QZSS L1 - L1C (data)
@ I5C
IRNSS L5 - RS (pilot)
@ I5B
IRNSS L5 - RS (data)
@ J1X
QZSS L1 - L1C (combined)
@ E8X
GAL E5(a+b) - AltBOC (combined)
@ G2Y
GPS L2 - Y-code (with decryption)
@ E1Z
GAL E1 - PRS + OS (data + pilot)
@ E6Z
GAL E6 - PRS + OS (A+B+C)
@ G1P
GPS L1 - P-code (unencrypted)
@ B1P
BeiDou B1 - Pilot(P)
@ J2X
QZSS L2 - L2C-code (combined)
@ B1D
BeiDou B1 - Data (D)
@ G1W
GPS L1 - Semicodeless P(Y) tracking (Z-tracking)
@ G2L
GPS L2 - L2C(L) (long)
@ I5A
IRNSS L5 - SPS Signal.
@ R6B
GLO G2a - L2OCp (pilot)
@ I9X
IRNSS S - RS (combined)
@ B8X
BeiDou B2 (B2a+B2b) - D+P.
@ R4X
GLO G1a - L1OCd+L1OCp (combined)
@ B8D
BeiDou B2 (B2a+B2b) - Data (D)
@ E8I
GAL E5(a+b) - AltBOC (data)
@ B7P
BeiDou B2b (BDS-3) - Pilot(P)
@ G2W
GPS L2 - Semicodeless P(Y) tracking (Z-tracking)
@ E1A
GAL E1 - PRS signal.
@ E8Q
GAL E5(a+b) - AltBOC (pilot)
@ B5D
BeiDou B2a - Data (D)
@ J6S
QZSS L6 - L6D LEX signal (short)
@ R4B
GLO G1a - L1OCp (pilot)
@ I9A
IRNSS S - SPS signal.
@ B6X
BeiDou B3 - B3I, B3Q, combined.
@ B7X
BeiDou B2b (BDS-2) - B2I(OS), B2Q, combined.
@ E1X
GAL E1 - OS(B+C) (combined)
@ E6A
GAL E6 - PRS signal.
@ B2I
BeiDou B1-2 - B1I(OS)
@ B7Q
BeiDou B2b (BDS-2) - B2Q.
@ R6X
GLO G2a - L2CSI+L2OCp (combined)
@ G1S
GPS L1 - L1C-D (data)
@ I9C
IRNSS S - RS (pilot)
@ B2X
BeiDou B1-2 - B1I(OS), B1Q, combined.
@ B7Z
BeiDou B2b (BDS-3) - D+P.
@ B8P
BeiDou B2 (B2a+B2b) - Pilot(P)
@ G2S
GPS L2 - L2C(M) (medium)
@ J2S
QZSS L2 - L2C-code (medium)
@ R4A
GLO G1a - L1OCd (data)
static Frequency GetCodeFequency(Code code)
Returns the frequency for the code.
Frequency getFrequency() const
Returns the frequency for the code.
Code & operator&=(const Code &rhs)
Allows combining flags of the Code enum.
friend bool operator!=(const Code &lhs, const Code &rhs)
Inequal compares values.
static Enum GetCodeEnumValue(Code code)
Returns the enum value for the code (only one must be set)
friend Code operator&(const Code &lhs, const Code &rhs)
Allows combining flags of the Code enum.
friend Code operator|(const Code &lhs, const Code &rhs)
Allows combining flags of the Code enum.
Enum getEnumValue() const
Returns the enum value for the code (only one must be set)
Code(Enum e)
Constructor from a single code value.
friend bool operator==(const Code &lhs, const Code &rhs)
Equal compares values.
static bool IsCodeCombined(Code first, Code second)
Checks if the codes are part of a combined code.
static Code fromFreqAttr(Frequency freq, char attribute)
Generates a Code from frequency and attribute.
Code operator~() const
Allows negating flags of the Code enum.
constexpr Code()=default
Default constructor for an empty code.
static std::vector< Code > GetAll()
Returns a list with all possible codes.
@ _S05_START
SBAS L start index in the Enum.
@ _GAL_START
GAL start index in the Enum.
@ _GPS_END
GPS end index in the Enum.
@ _J06_END
QZSS L6 end index in the Enum.
@ _GAL_END
GAL end index in the Enum.
@ _R04_END
GLO G1a end index in the Enum.
@ _R04_START
GLO G1a start index in the Enum.
@ _B06_END
BDS B3 end index in the Enum.
@ _I09_END
IRNSS S end index in the Enum.
@ _E01_START
GAL E1 start index in the Enum.
@ _E06_START
GAL E6 start index in the Enum.
@ _G05_START
GPS L5 start index in the Enum.
@ _B08_END
BDS B2 (B2a+B2b) end index in the Enum.
@ _R01_START
GLO L1 start index in the Enum.
@ _B05_START
BDS B2a start index in the Enum.
@ _B07_START
BDS B2b start index in the Enum.
@ _J05_START
QZSS L5 start index in the Enum.
@ _IRNSS_END
IRNSS end index in the Enum.
@ _S01_END
SBAS L end index in the Enum.
@ _J05_END
QZSS L5 end index in the Enum.
@ _J01_END
QZSS L1 end index in the Enum.
@ _E07_START
GAL E5b start index in the Enum.
@ _R03_END
GLO L3 end index in the Enum.
@ _R03_START
GLO L3 start index in the Enum.
@ _E01_END
GAL E1 end index in the Enum.
@ _B05_END
BDS B2a end index in the Enum.
@ _QZSS_END
QZSS end index in the Enum.
@ _E08_END
GAL E5(a+b) end index in the Enum.
@ _GLO_START
GLO start index in the Enum.
@ _G02_END
GPS L2 end index in the Enum.
@ _GPS_START
GPS start index in the Enum.
@ _IRNSS_START
IRNSS start index in the Enum.
@ _B01_START
BDS B1 start index in the Enum.
@ _J02_START
QZSS L2 start index in the Enum.
@ _B06_START
BDS B3 start index in the Enum.
@ _QZSS_START
QZSS start index in the Enum.
@ _S05_END
SBAS L end index in the Enum.
@ _R06_END
GLO G2a end index in the Enum.
@ _G05_END
GPS L5 end index in the Enum.
@ _BDS_END
BDS end index in the Enum.
@ _E07_END
GAL E5b end index in the Enum.
@ _E06_END
GAL E6 end index in the Enum.
@ _J01_START
QZSS L1 start index in the Enum.
@ _G02_START
GPS L2 start index in the Enum.
@ _S01_START
SBAS L start index in the Enum.
@ _SBAS_START
SBAS start index in the Enum.
@ _B02_START
BDS B1-2 start index in the Enum.
@ _I05_START
IRNSS L5 start index in the Enum.
@ _G01_START
GPS L1 start index in the Enum.
@ _BDS_START
BDS start index in the Enum.
@ _B01_END
BDS B1 end index in the Enum.
@ _R02_END
GLO L2 end index in the Enum.
@ _J06_START
QZSS L6 start index in the Enum.
@ _B08_START
BDS B2 (B2a+B2b) start index in the Enum.
@ _GLO_END
GLO end index in the Enum.
@ _G01_END
GPS L1 end index in the Enum.
@ _E05_END
GAL E5a end index in the Enum.
@ _R06_START
GLO G2a start index in the Enum.
@ _E08_START
GAL E5(a+b) start index in the Enum.
@ _SBAS_END
SBAS end index in the Enum.
@ _I09_START
IRNSS S start index in the Enum.
@ _R02_START
GLO L2 start index in the Enum.
@ _R01_END
GLO L1 end index in the Enum.
@ COUNT
Amount of Codes in the Enum.
@ _E05_START
GAL E5a start index in the Enum.
@ _I05_END
IRNSS L5 end index in the Enum.
@ _B07_END
BDS B2b end index in the Enum.
@ _B02_END
BDS B1-2 end index in the Enum.
@ _J02_END
QZSS L2 end index in the Enum.
static const char * GetCodeDescription(Code code)
Returns a short description for the code.
friend bool operator<(const Code &lhs, const Code &rhs)
Less than comparison.
Frequency definition for different satellite systems.
void to_json(json &j, const Node &node)
Converts the provided node into a json object.
const Code Code_G5I_G5Q_G5X
L5 (data, pilot, combined)
const Code Code_I5B_I5C_I5X
RS (data, pilot, combined)
const Code Code_E8I_E8Q_E8X
E5 AltBOC (data, pilot, combined)
Frequency_
Enumerate for GNSS frequencies.
const Code Code_J1S_J1L_J1X
L1C (data, pilot, combined)
const Code Code_B8D_B8P_B8X
B2 (B2a+B2b) (data, pilot, combined)
bool ShowCodeSelector(const char *label, Code &code, const Frequency &filterFreq, bool singleSelect)
Shows a ComboBox to select signal codes.
const Code Code_B7I_B7Q_B7X
B2I(OS), B2Q, combined.
const Code Code_B1D_B1P_B1X
B1 (data, pilot, combined)
const Code Code_B5D_B5P_B5X
B2a (data, pilot, combined)
const Code Code_E7I_E7Q_E7X
E5b (data, pilot, combined)
const Code Code_Default
Default selection for codes.
Code operator&(const Code &lhs, const Code &rhs)
const Code Code_B2I_B2Q_B2X
B1I(OS), B1Q, combined.
void from_json(const json &j, Node &node)
Converts the provided json object into a node object.
const Code Code_E1B_E1C_E1X
OS (data, pilot, combined)
const Code Code_J5I_J5Q_J5X
L5 (data, pilot, combined)
const Code Code_R3I_R3Q_R3X
L3 (data, pilot, combined)
const Code Code_B7D_B7P_B7Z
B2b (data, pilot, combined)
const Code Code_R4A_R4B_R4X
G1a (data, pilot, combined)
const Code Code_E5I_E5Q_E5X
E5a (data, pilot, combined)
const Code Code_J6S_J6L_J6X
LEX signal (short, long, combined)
const Code Code_S5I_S5Q_S5X
L5 (data, pilot, combined)
const Code Code_I9B_I9C_I9X
RS (data, pilot, combined)
const Code Code_E6B_E6C_E6X
E6 (data, pilot, combined)
const Code Code_B6I_B6Q_B6X
B3I, B3Q, combined.
Code operator|(const Code &lhs, const Code &rhs)
const Code Code_J5D_J5P_J5Z
L5 (data, pilot, combined)
SatelliteSystem_
Satellite System enumeration.
const Code Code_R6A_R6B_R6X
G2a (data, pilot, combined)
const Code Code_G2S_G2L_G2X
L2C-code (medium, long, combined)
const Code Code_J2S_J2L_J2X
L2C-code (medium, long, combined)
const Code Code_G1S_G1L_G1X
L1C (data, pilot, combined)
std::size_t operator()(const NAV::Code &c) const
Hash function for signal code.