18#include <fmt/format.h>
20#include <nlohmann/json.hpp>
21using json = nlohmann::json;
55 if (typeString ==
"UTC")
59 if (typeString ==
"GPST" || typeString ==
"GPS")
63 if (typeString ==
"GLNT" || typeString ==
"GLO")
67 if (typeString ==
"GST" || typeString ==
"GAL")
71 if (typeString ==
"BDT")
75 if (typeString ==
"QZSST" || typeString ==
"QZS")
79 if (typeString ==
"IRNSST" || typeString ==
"IRN")
101 constexpr explicit operator bool() =
delete;
105 constexpr explicit operator int()
const {
return int(
value); }
109 explicit operator std::string()
const {
return toString(); }
112 [[nodiscard]]
constexpr const char*
toString()
const
408struct hash<NAV::TimeSystem>
419#ifndef DOXYGEN_IGNORE
423struct fmt::formatter<NAV::TimeSystem> : fmt::formatter<std::string>
429 template<
typename FormatContext>
430 auto format(
const NAV::TimeSystem& timeSys, FormatContext& ctx)
const
432 return fmt::formatter<std::string>::format(std::string(timeSys), ctx);
Code operator|(const Code::Enum &lhs, const Code::Enum &rhs)
Allows combining flags of the Code enum.
Code operator&(const Code::Enum &lhs, const Code::Enum &rhs)
Allows combining flags of the Code enum.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
constexpr Frequency_ operator~(Frequency_ rhs)
Allows negating flags of the Frequency enum.
Definition Frequency.hpp:378
constexpr Frequency_ & operator&=(Frequency_ &lhs, const Frequency_ &rhs)
Allows combining flags of the Frequency enum.
Definition Frequency.hpp:342
constexpr Frequency_ & operator|=(Frequency_ &lhs, const Frequency_ &rhs)
Allows combining flags of the Frequency enum.
Definition Frequency.hpp:272
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.
constexpr bool operator!=(const Node::Kind &lhs, const Node::Kind &rhs)
Inequal compares Node::Kind values.
Definition Node.hpp:499
constexpr bool operator==(const Node::Kind &lhs, const Node::Kind &rhs)
Equal compares Node::Kind values.
Definition Node.hpp:494
std::ostream & operator<<(std::ostream &os, const NAV::TimeSystem &obj)
Stream insertion operator overload.
TimeSystem_
List of all time systems.
Definition TimeSystem.hpp:27
@ IRNSST
Indian Regional Navigation Satellite System Time.
Definition TimeSystem.hpp:35
@ GST
Galileo System Time.
Definition TimeSystem.hpp:32
@ BDT
BeiDou Time.
Definition TimeSystem.hpp:33
@ GLNT
GLONASS Time (GLONASST)
Definition TimeSystem.hpp:31
@ TimeSys_None
No Time system.
Definition TimeSystem.hpp:28
@ QZSST
Quasi-Zenith Satellite System Time.
Definition TimeSystem.hpp:34
@ GPST
GPS Time.
Definition TimeSystem.hpp:30
@ UTC
Coordinated Universal Time.
Definition TimeSystem.hpp:29
bool ComboTimeSystem(const char *label, TimeSystem &timeSystem)
Shows a ComboBox to select the time system.
Time System defintions.
Definition TimeSystem.hpp:40
TimeSystemEnum
Continuous enum for the time systems.
Definition TimeSystem.hpp:139
@ IRNSST
Indian Regional Navigation Satellite System Time.
Definition TimeSystem.hpp:147
@ COUNT
Amount of items in the enum.
Definition TimeSystem.hpp:148
@ GST
Galileo System Time.
Definition TimeSystem.hpp:144
@ UTC
Coordinated Universal Time.
Definition TimeSystem.hpp:141
@ GPST
GPS Time.
Definition TimeSystem.hpp:142
@ TimeSys_None
No Time system.
Definition TimeSystem.hpp:140
@ BDT
BeiDou Time.
Definition TimeSystem.hpp:145
@ GLNT
GLONASS Time (GLONASST)
Definition TimeSystem.hpp:143
@ QZSST
Quasi-Zenith Satellite System Time.
Definition TimeSystem.hpp:146
friend constexpr bool operator==(const TimeSystem &lhs, const TimeSystem &rhs)
Equal compares values.
Definition TimeSystem.hpp:365
static TimeSystem fromString(const std::string &typeString)
Construct new object from std::string.
Definition TimeSystem.hpp:53
TimeSystem_ value
Internal value.
Definition TimeSystem.hpp:193
constexpr TimeSystem(TimeSystemEnum timeSystem)
Definition TimeSystem.hpp:160
constexpr const char * toString() const
Converts the time system into a string.
Definition TimeSystem.hpp:112
constexpr TimeSystem()=default
Default Constructor.
constexpr TimeSystem(TimeSystem_ type)
Implicit Constructor from Value type.
Definition TimeSystem.hpp:47
TimeSystemEnum getEnumValue() const
Returns the enum value (only one must be set)
static TimeSystemEnum GetTimeSystemEnumValue(TimeSystem timeSystem)
Returns the enum value (only one must be set)
constexpr TimeSystem & operator=(TimeSystem_ v)
Assignment operator from Value type.
Definition TimeSystem.hpp:90
std::size_t operator()(const NAV::TimeSystem &f) const
Hash function for TimeSystem.
Definition TimeSystem.hpp:412