Module yakf::time

source · []
Expand description

Re-export of hifitime

Modules

Structs

Defines generally usable durations for nanosecond precision valid for 32,768 centuries in either direction, and only on 80 bits / 10 octets.

Defines an Epoch in TAI (temps atomique international) in seconds past 1900 January 01 at midnight (like the Network Time Protocol).

An iterator of a sequence of evenly spaced Epochs.

Enums

Errors handles all oddities which may occur in this library.

An Enum to convert frequencies to their approximate duration, rounded to the closest nanosecond.

Enum of the different time systems available

Constants

DAYS_GPS_TAI_OFFSET is the number of days from the TAI epoch to the GPS epoch (UTC midnight of January 6th 1980; cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29)

DAYS_PER_CENTURY corresponds to the number of days per centuy in the Julian calendar.

DAYS_PER_YEAR corresponds to the number of days per year in the Julian calendar.

The Ephemeris Time epoch, in seconds

J1900_OFFSET determines the offset in julian days between 01 Jan 1900 at midnight and the Modified Julian Day at 17 November 1858. NOTE: Julian days “start” at noon so that astronomical observations throughout the night happen at the same Julian day. Note however that the Modified Julian Date (MJD) starts at midnight, not noon, cf. http://tycho.usno.navy.mil/mjd.html.

J2000_OFFSET determines the offset in julian days between 01 Jan 2000 at noon and the Modified Julian Day at 17 November 1858.

The JDE offset in days

The JDE offset in seconds

Modified Julian Date in seconds as defined here. MJD epoch is Modified Julian Day at 17 November 1858 at midnight.

SECONDS_GPS_TAI_OFFSET is the number of seconds from the TAI epoch to the GPS epoch (UTC midnight of January 6th 1980; cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29)

SECONDS_PER_CENTURY defines the number of seconds per century.

SECONDS_PER_DAY defines the number of seconds per day.

SECONDS_PER_HOUR defines the number of seconds per hour.

SECONDS_PER_MINUTE defines the number of seconds per minute.

SECONDS_PER_SIDERAL_YEAR corresponds to the number of seconds per sideral year from NIST.

SECONDS_PER_TROPICAL_YEAR corresponds to the number of seconds per tropical year from NAIF SPICE.

SECONDS_PER_YEAR corresponds to the number of seconds per julian year from NAIF SPICE.

The UNIX reference epoch of 1970-01-01.

Traits

A trait to automatically convert some primitives to an approximate frequency as a duration, rounded to the closest nanosecond Does not support more than 1 GHz (because max precision of a duration is 1 nanosecond)

A trait to automatically convert some primitives to a duration

Functions

Returns true if the provided Gregorian date is valid. Leap second days may have 60 seconds.