66inline bool eop_covers(
double mjd_utc)
noexcept {
return tempoch_eop_covers(mjd_utc); }
81inline std::optional<EopValues>
eop_at(
double mjd_utc) {
82 tempoch_eop_values_t raw{};
83 tempoch_status_t status = tempoch_eop_at(mjd_utc, &raw);
85 if (status == TEMPOCH_STATUS_T_UT1_HORIZON_EXCEEDED)
90 auto nan_to_opt = [](
double v) -> std::optional<double> {
91 return std::isnan(v) ? std::nullopt : std::optional<double>{v};
96 nan_to_opt(raw.pm_xp_arcsec),
97 nan_to_opt(raw.pm_yp_arcsec),
99 nan_to_opt(raw.lod_milliseconds),
100 nan_to_opt(raw.dx_milliarcsec),
101 nan_to_opt(raw.dy_milliarcsec),
102 raw.ut1_observed != 0,
Error handling for the tempoch C++ wrapper.
std::optional< EopValues > eop_at(double mjd_utc)
Interpolate IERS EOP values at mjd_utc.
void check_status(tempoch_status_t status, const char *operation)
Check a tempoch_status_t and throw the appropriate exception on error.
bool eop_covers(double mjd_utc) noexcept
Check whether EOP data is available for mjd_utc.
Interpolated IERS Earth Orientation Parameter values.
std::optional< double > dy_milliarcsec
ΔY celestial-pole offset (milliarcseconds). nullopt if absent.
std::optional< double > pm_xp_arcsec
Polar motion X component (arcseconds). nullopt if absent.
std::optional< double > dx_milliarcsec
ΔX celestial-pole offset (milliarcseconds). nullopt if absent.
std::optional< double > pm_yp_arcsec
Polar motion Y component (arcseconds). nullopt if absent.
double ut1_minus_utc
DUT1 = UT1 − UTC (seconds of time).
bool ut1_observed
True when both bracketing rows carry observed (I) data.
std::optional< double > lod_milliseconds
Excess length-of-day (milliseconds of time). nullopt if absent.
double mjd_utc
UTC MJD of the interpolation result.