45template <
typename S, std::enable_if_t<is_gnss_scale_v<S>,
int> = 0>
47 TempochGnssWeek raw{};
50 "tempoch::to_gnss_week");
51 return GnssWeek{raw.
week, raw.seconds_of_week, raw.subsecond_nanos};
55template <
typename S, std::enable_if_t<is_gnss_scale_v<S>,
int> = 0>
60 "tempoch::from_gnss_week");
A point in time on scale S, stored as a split J2000-second pair.
const tempoch_time_t & c_inner() const noexcept
static Time from_split_seconds(qtty::Second hi, qtty::Second lo=qtty::Second(0.0))
constexpr bool is_gnss_scale_v
GnssWeek to_gnss_week(const Time< S > &time)
Decompose a GNSS-scale instant into its week-number form.
Time< S > from_gnss_week(const GnssWeek &gw)
Build a GNSS-scale instant from a week-number decomposition.
void check_status(tempoch_status_t status, const char *operation)
Check a tempoch_status_t and throw the appropriate exception on error.
constexpr tempoch_scale_tag_t scale_tag_v
Time-scale tag types for the tempoch C++ API.
std::uint32_t subsecond_nanos
Subsecond nanoseconds remainder, in [0, 1'000'000'000).
std::uint32_t seconds_of_week
Seconds since the start of week, in [0, 604'800).
std::uint32_t week
Full week number since the constellation's epoch (no rollover applied).
Trait marking the GNSS coordinate scales that support week decomposition.
Core Time<S>, EncodedTime<S, F>, and TimeContext types.