17#include <fmt/format.h>
19#include <nlohmann/json.hpp>
20using json = nlohmann::json;
54 if (typeString ==
"UTC")
58 if (typeString ==
"GPST" || typeString ==
"GPS")
62 if (typeString ==
"GLNT" || typeString ==
"GLO")
66 if (typeString ==
"GST" || typeString ==
"GAL")
70 if (typeString ==
"BDT")
74 if (typeString ==
"QZSST" || typeString ==
"QZS")
78 if (typeString ==
"IRNSST" || typeString ==
"IRN")
98 constexpr explicit operator TimeSystem_()
const {
return value; }
100 constexpr explicit operator bool() =
delete;
104 constexpr explicit operator int()
const {
return int(value); }
108 explicit operator std::string()
const {
return toString(); }
111 [[nodiscard]]
constexpr const char*
toString()
const
407struct hash<NAV::TimeSystem>
418#ifndef DOXYGEN_IGNORE
422struct fmt::formatter<NAV::TimeSystem> : fmt::formatter<std::string>
428 template<
typename FormatContext>
431 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:362
constexpr Frequency_ & operator&=(Frequency_ &lhs, const Frequency_ &rhs)
Allows combining flags of the Frequency enum.
Definition Frequency.hpp:326
constexpr Frequency_ & operator|=(Frequency_ &lhs, const Frequency_ &rhs)
Allows combining flags of the Frequency enum.
Definition Frequency.hpp:256
std::ostream & operator<<(std::ostream &os, const NAV::TimeSystem &obj)
Stream insertion operator overload.
TimeSystem_
List of all time systems.
Definition TimeSystem.hpp:26
@ IRNSST
Indian Regional Navigation Satellite System Time.
Definition TimeSystem.hpp:34
@ GST
Galileo System Time.
Definition TimeSystem.hpp:31
@ BDT
BeiDou Time.
Definition TimeSystem.hpp:32
@ GLNT
GLONASS Time (GLONASST)
Definition TimeSystem.hpp:30
@ TimeSys_None
No Time system.
Definition TimeSystem.hpp:27
@ QZSST
Quasi-Zenith Satellite System Time.
Definition TimeSystem.hpp:33
@ GPST
GPS Time.
Definition TimeSystem.hpp:29
@ UTC
Coordinated Universal Time.
Definition TimeSystem.hpp:28
bool ComboTimeSystem(const char *label, TimeSystem &timeSystem)
Shows a ComboBox to select the time system.
Time System defintions.
Definition TimeSystem.hpp:39
friend constexpr bool operator==(const TimeSystem &lhs, const TimeSystem &rhs)
Equal compares values.
Definition TimeSystem.hpp:364
static TimeSystem fromString(const std::string &typeString)
Construct new object from std::string.
Definition TimeSystem.hpp:52
constexpr TimeSystem(TimeSystemEnum timeSystem)
Definition TimeSystem.hpp:159
constexpr const char * toString() const
Converts the time system into a string.
Definition TimeSystem.hpp:111
TimeSystemEnum
Continuous enum for the time systems.
Definition TimeSystem.hpp:138
@ IRNSST
Indian Regional Navigation Satellite System Time.
@ COUNT
Amount of items in the enum.
@ GST
Galileo System Time.
@ UTC
Coordinated Universal Time.
@ TimeSys_None
No Time system.
@ GLNT
GLONASS Time (GLONASST)
@ QZSST
Quasi-Zenith Satellite System Time.
constexpr TimeSystem()=default
Default Constructor.
constexpr TimeSystem(TimeSystem_ type)
Implicit Constructor from Value type.
Definition TimeSystem.hpp:46
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:89
bool operator==(const ImVec4 &lhs, const ImVec4 &rhs)
Equal comparison operator.
bool operator!=(const ImVec4 &lhs, const ImVec4 &rhs)
Unequal comparison operator.
std::size_t operator()(const NAV::TimeSystem &f) const
Hash function for TimeSystem.
Definition TimeSystem.hpp:411