19#include <nlohmann/json.hpp>
20using json = nlohmann::json;
21#include <fmt/format.h>
62 [[nodiscard]]
bool isGeo()
const;
104 return {
code.getFrequency().getSatSys(),
satNum };
110 return code.getFrequency();
166#ifndef DOXYGEN_IGNORE
170struct fmt::formatter<NAV::SatId>
175 static constexpr auto parse(format_parse_context& ctx) ->
decltype(ctx.begin())
184 template<
typename FormatContext>
185 auto format(
const NAV::SatId& satId, FormatContext& ctx)
const ->
decltype(ctx.out())
187 return fmt::format_to(ctx.out(),
"{0}{1:02d}",
char(satId.satSys), satId.satNum);
193struct fmt::formatter<NAV::SatSigId>
198 static constexpr auto parse(format_parse_context& ctx) ->
decltype(ctx.begin())
207 template<
typename FormatContext>
208 auto format(
const NAV::SatSigId& satSigId, FormatContext& ctx)
const
210 return fmt::format_to(ctx.out(),
"{0}-{1:02d}", satSigId.
code, satSigId.
satNum);
220struct hash<NAV::SatId>
227 auto hash2 =
static_cast<size_t>(f.
satNum);
229 return hash1 | (hash2 << 10);
234struct hash<NAV::SatSigId>
241 auto hash2 =
static_cast<size_t>(f.
satNum);
243 return hash1 | (hash2 << 8);
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Frequency definition for different satellite systems.
void to_json(json &j, const Node &node)
Converts the provided node into a json object.
void from_json(const json &j, Node &node)
Converts the provided json object into a node object.
Algorithms concerning the STL containers.
std::ostream & operator<<(std::ostream &os, const NAV::SatId &obj)
Stream insertion operator overload.
bool ShowSatelliteSelector(const char *label, std::vector< SatId > &satellites, SatelliteSystem filterSys=SatSys_All, bool displayOnlyNumber=false)
Shows a ComboBox to select satellites.
bool lessCompareSatSigId(const std::string &lhs, const std::string &rhs)
Less than comparison from string representation.
SatelliteSystem_
Satellite System enumeration.
Definition SatelliteSystem.hpp:31
@ SatSys_None
No Satellite system.
Definition SatelliteSystem.hpp:32
constexpr SatelliteSystem_ SatSys_All
All Systems.
Definition SatelliteSystem.hpp:382
Enumerate for GNSS Codes.
Definition Code.hpp:89
std::bitset< COUNT > Set
Typedef for the bitset with size of COUNT.
Definition Code.hpp:293
@ None
None.
Definition Code.hpp:94
Enum getEnumValue() const
Returns the enum value for the code (only one must be set)
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
Identifies a satellite (satellite system and number)
Definition SatelliteIdentifier.hpp:34
SatId(SatelliteSystem satSys, uint16_t satNum)
Constructor.
Definition SatelliteIdentifier.hpp:38
constexpr bool operator==(const SatId &rhs) const
Equal comparison (needed for unordered_map)
Definition SatelliteIdentifier.hpp:50
SatId()=default
Default constructor.
bool isGeo() const
Checks if the satellite is geostationary.
SatelliteSystem satSys
Satellite system (GPS, GLONASS, GALILEO, QZSS, BDS, IRNSS, SBAS)
Definition SatelliteIdentifier.hpp:44
uint16_t satNum
Number of the satellite.
Definition SatelliteIdentifier.hpp:45
constexpr bool operator<(const SatId &rhs) const
Less than comparison (needed for map)
Definition SatelliteIdentifier.hpp:55
Identifies a satellite signal (satellite frequency and number)
Definition SatelliteIdentifier.hpp:67
Code code
Code.
Definition SatelliteIdentifier.hpp:77
SatSigId()=default
Default constructor.
Frequency freq() const
Returns the frequency of the satellite signal.
Definition SatelliteIdentifier.hpp:108
uint16_t satNum
Number of the satellite.
Definition SatelliteIdentifier.hpp:78
bool operator<(const SatSigId &rhs) const
Less than comparison (needed for map)
Definition SatelliteIdentifier.hpp:88
SatSigId(Code code, uint16_t satNum)
Constructor.
Definition SatelliteIdentifier.hpp:71
bool operator==(const SatSigId &rhs) const
Equal comparison (needed for unordered_map)
Definition SatelliteIdentifier.hpp:83
SatId toSatId() const
Returns a satellite identifier for the satellite signal.
Definition SatelliteIdentifier.hpp:102
Satellite System type.
Definition SatelliteSystem.hpp:44
std::size_t operator()(const NAV::SatId &f) const
Hash function for SatId.
Definition SatelliteIdentifier.hpp:224
std::size_t operator()(const NAV::SatSigId &f) const
Hash function for SatSigId.
Definition SatelliteIdentifier.hpp:238