20InsTime::operator std::string()
const
22 std::stringstream stream;
27InsTime_MJD::operator std::string()
const
29 std::stringstream stream;
34InsTime_JD::operator std::string()
const
36 std::stringstream stream;
41InsTime_GPSweekTow::operator std::string()
const
43 std::stringstream stream;
48InsTime_YMDHMS::operator std::string()
const
50 std::stringstream stream;
55InsTime_YDoySod::operator std::string()
const
57 std::stringstream stream;
66 return os << fmt::format(
"{}", insTime);
71 return os << fmt::format(
"{}", mjd);
76 return os << fmt::format(
"{}", jd);
81 return os << fmt::format(
"{}", gpsWeekTow);
86 return os << fmt::format(
"{}", ymdhms);
91 return os << fmt::format(
"{}", yDoySod);
96 auto mjd = insTime.
toMJD();
99 {
"mjd_day", mjd.mjd_day },
100 {
"mjd_frac", mjd.mjd_frac },
108 if (j.contains(
"mjd_day"))
110 j.at(
"mjd_day").get_to(mjd.
mjd_day);
112 if (j.contains(
"mjd_frac"))
114 j.at(
"mjd_frac").get_to(mjd.
mjd_frac);
nlohmann::json json
json namespace
The class is responsible for all time-related tasks.
Utility class for logging to console and file.
The class is responsible for all time-related tasks.
constexpr InsTime_MJD toMJD(TimeSystem timesys=UTC) const
Converts this time object into a different format.
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.
std::ostream & operator<<(std::ostream &os, const SatelliteSystem &satSys)
Stream insertion operator overload.
GPS week and time of week in GPS standard time [GPST].
Modified Julien Date [UTC].
long double mjd_frac
Decimal fractions of a day of the Modified Julien Date [UTC].
int32_t mjd_day
Full days since 17. November 1858 [UTC].
GPS year and day of year in GPS standard time [GPST].
Universal Time Coordinated [UTC].