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);
227 auto hash2 =
static_cast<size_t>(f.
satNum);
229 return hash1 | (hash2 << 10);
241 auto hash2 =
static_cast<size_t>(f.
satNum);
243 return hash1 | (hash2 << 8);
nlohmann::json json
json namespace
Frequency definition for different satellite systems.
Algorithms concerning the STL containers.
std::ostream & operator<<(std::ostream &os, const NAV::SatId &obj)
Stream insertion operator overload.
Enumerate for GNSS Codes.
std::bitset< COUNT > Set
Typedef for the bitset with size of COUNT.
Enum getEnumValue() const
Returns the enum value for the code (only one must be set)
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.
bool ShowSatelliteSelector(const char *label, std::vector< SatId > &satellites, SatelliteSystem filterSys, bool displayOnlyNumber)
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.
@ SatSys_None
No Satellite system.
constexpr SatelliteSystem_ SatSys_All
All Systems.
Identifies a satellite (satellite system and number)
SatId(SatelliteSystem satSys, uint16_t satNum)
Constructor.
constexpr bool operator==(const SatId &rhs) const
Equal comparison (needed for unordered_map)
SatId()=default
Default constructor.
bool isGeo() const
Checks if the satellite is geostationary.
SatelliteSystem satSys
Satellite system (GPS, GLONASS, GALILEO, QZSS, BDS, IRNSS, SBAS)
uint16_t satNum
Number of the satellite.
constexpr bool operator<(const SatId &rhs) const
Less than comparison (needed for map)
Identifies a satellite signal (satellite frequency and number)
SatSigId()=default
Default constructor.
Frequency freq() const
Returns the frequency of the satellite signal.
uint16_t satNum
Number of the satellite.
bool operator<(const SatSigId &rhs) const
Less than comparison (needed for map)
SatSigId(Code code, uint16_t satNum)
Constructor.
bool operator==(const SatSigId &rhs) const
Equal comparison (needed for unordered_map)
SatId toSatId() const
Returns a satellite identifier for the satellite signal.
std::size_t operator()(const NAV::SatId &f) const
Hash function for SatId.
std::size_t operator()(const NAV::SatSigId &f) const
Hash function for SatSigId.