a clock for hops-time stamps, measures time in (UTC) nanoseconds since J2000 epoch. Functionality modelled on the gps_clock from the 'date' library (requires the timezone tz library too). Relys on the H. Hinnant date library (and tzdata), this library is expected to be adopted into cxx-20 standard
More...
|
template<class Duration > |
hops_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_gps (const date::gps_time< Duration > &t) NOEXCEPT |
| Converts GPS time to UTC and updates hops clock without exception. More...
|
|
template<class Duration > |
hops_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_local (const date::local_time< Duration > &t) NOEXCEPT |
| Calculates time difference between two UTC time points considering leap seconds. More...
|
|
template<class Duration > |
hops_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_sys (const date::sys_time< Duration > &t) NOEXCEPT |
| Converts system time to UTC clock time and returns it. More...
|
|
template<class Duration > |
hops_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_tai (const date::tai_time< Duration > &t) NOEXCEPT |
| Converts TAI time to UTC and updates hops clock. More...
|
|
template<class Duration > |
hops_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_utc (const date::utc_time< Duration > &t) NOEXCEPT |
| Converts UTC time to hops clock time. More...
|
|
template<class Duration > |
date::gps_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_gps (const hops_time< Duration > &t) NOEXCEPT |
| Converts hops_time to GPS time using UTC conversion. More...
|
|
template<class Duration > |
date::local_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_local (const hops_time< Duration > &t) NOEXCEPT |
| Converts a UTC time to local time using hops_clock. More...
|
|
template<class Duration > |
date::sys_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_sys (const hops_time< Duration > &t) NOEXCEPT |
| Converts a hops_time to system time using UTC clock. More...
|
|
template<class Duration > |
date::tai_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_tai (const hops_time< Duration > &t) NOEXCEPT |
| Converts a Hops time to TAI (International Atomic Time). More...
|
|
template<class Duration > |
date::utc_time< typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_utc (const hops_time< Duration > &t) NOEXCEPT |
| Converts a time duration to UTC using Hops clock epoch. More...
|
|
|
template<typename Duration > |
static std::chrono::time_point< hops_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_gps (const std::chrono::time_point< date::gps_clock, Duration > &) NOEXCEPT |
| Converts GPS time to Hops clock time. More...
|
|
static time_point | from_hops_format (const std::string ×tamp) |
| Converts a timestamp string in HOPS format to a time_point object. More...
|
|
static time_point | from_iso8601_format (const std::string ×tamp) |
| Converts an ISO8601 formatted timestamp string to a hops_clock time_point object. More...
|
|
static time_point | from_legacy_hops_date (legacy_hops_date &ldate) |
| Converts a legacy hops data struct to a hops_clock time_point. More...
|
|
template<typename Duration > |
static std::chrono::time_point< hops_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_local (const std::chrono::time_point< date::local_t, Duration > &) NOEXCEPT |
| Calculates time difference between input local time and Hops epoch in UTC. More...
|
|
static time_point | from_mjd (const time_point &mjd_epoch, const double &epoch_offset, const double &mjd) |
| Converts a Modified Julian date (floating point epoch and day) timestamp to a hops_clock time_point. More...
|
|
template<typename Duration > |
static std::chrono::time_point< hops_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_sys (const std::chrono::time_point< std::chrono::system_clock, Duration > &) NOEXCEPT |
| Converts a system time point to UTC and returns the corresponding hops clock time. More...
|
|
template<typename Duration > |
static std::chrono::time_point< hops_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_tai (const std::chrono::time_point< date::tai_clock, Duration > &) NOEXCEPT |
| Converts a TAI time point to UTC and returns the corresponding Hops clock time. More...
|
|
template<typename Duration > |
static std::chrono::time_point< hops_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | from_utc (const std::chrono::time_point< date::utc_clock, Duration > &) NOEXCEPT |
| Converts UTC time point to hops_clock time point. More...
|
|
static time_point | from_vdif_format (int &vdif_epoch, int &vdif_seconds) |
| Converts a VDIF (epoch, second) timestamp to a hops_clock time_point. More...
|
|
static time_point | from_vex_format (const std::string ×tamp) |
| Converts a VEX-style formatted string (e.g. 2019y106d18h30m15s) to a hops_clock time_point. More...
|
|
static time_point | from_year_fpday (int year, double floating_point_days) |
| Converts a year + floating point day since start of the year to a hops_clock time_point, needed for ad_hoc flag files (time-stamps are given in floating-point days) More...
|
|
static time_point | get_hops_epoch () |
| returns the hops_clock epoch as a hops_clock time_point More...
|
|
static date::utc_time< std::chrono::nanoseconds > | get_hops_epoch_utc () |
| returns the hops_clock epoch as a utc_time time_point More...
|
|
static std::chrono::seconds | get_leap_seconds_between (const time_point &t_start, const time_point &t_end) |
| calculates the number of leap seconds inserted between two hops time points (UTC based clock) More...
|
|
static time_point | now () |
| Returns current time as a time_point using hops_clock's epoch. More...
|
|
template<typename Duration > |
static std::chrono::time_point< date::gps_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_gps (const std::chrono::time_point< hops_clock, Duration > &) NOEXCEPT |
| Converts a time point to GPS clock time. More...
|
|
static std::string | to_hops_format (const time_point &tp) |
| Converts a time_point to HOPS format string. More...
|
|
static std::string | to_iso8601_format (const time_point &tp) |
| Converts a time_point to ISO8601 formatted string. More...
|
|
static legacy_hops_date | to_legacy_hops_date (const time_point &tp) |
| Converts a hops_clock time_point to a legacy hops data struct. More...
|
|
template<typename Duration > |
static std::chrono::time_point< date::local_t, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_local (const std::chrono::time_point< hops_clock, Duration > &) NOEXCEPT |
| Converts a global time point to local time. More...
|
|
static double | to_mjd (const time_point &mjd_epoch, const double &epoch_offset, const time_point &tp) |
| Converts a hops_clock time_point to a Modified Julian date (floating point day) timestamp, givent the specified epoch. More...
|
|
template<typename Duration > |
static std::chrono::time_point< std::chrono::system_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_sys (const std::chrono::time_point< hops_clock, Duration > &) NOEXCEPT |
| Converts a time point from hops_clock to system clock. More...
|
|
template<typename Duration > |
static std::chrono::time_point< date::tai_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_tai (const std::chrono::time_point< hops_clock, Duration > &) NOEXCEPT |
| Converts a time point from hops_clock to TAI (International Atomic Time). More...
|
|
template<typename Duration > |
static std::chrono::time_point< date::utc_clock, typename std::common_type< Duration, std::chrono::nanoseconds >::type > | to_utc (const std::chrono::time_point< hops_clock, Duration > &) NOEXCEPT |
| Converts a time point to UTC using hops_clock and Duration. More...
|
|
static void | to_vdif_format (const time_point &tp, int &vdif_epoch, int &vdif_second) |
| Converts a hops_clock time_point to a VDIF (epoch, second) timestamp. More...
|
|
static std::string | to_vex_format (const time_point &tp, bool truncate_to_nearest_second=false) |
| Converts a hops_clock time_point to VEX-style formatted string (e.g. 2019y106d18h30m15s) More...
|
|
static void | to_year_fpday (const time_point &tp, int &year, double &floating_point_days) |
| Converts a hops_clock time_point to a floating point day since start of the year needed for ad_hoc flag files (time-stamps are given in floating-point days) More...
|
|
a clock for hops-time stamps, measures time in (UTC) nanoseconds since J2000 epoch. Functionality modelled on the gps_clock from the 'date' library (requires the timezone tz library too). Relys on the H. Hinnant date library (and tzdata), this library is expected to be adopted into cxx-20 standard
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
- Date
- Wed May 18 16:46:16 2022 -0400