#[repr(C)]pub struct astro_time_t {
pub ut: f64,
pub tt: f64,
pub psi: f64,
pub eps: f64,
pub st: f64,
}Expand description
@brief A date and time used for astronomical calculations.
This type is of fundamental importance to Astronomy Engine. It is used to represent dates and times for all astronomical calculations. It is also included in the values returned by many Astronomy Engine functions.
To create a valid astro_time_t value from scratch, call #Astronomy_MakeTime (for a given calendar date and time) or #Astronomy_CurrentTime (for the system’s current date and time).
To adjust an existing astro_time_t by a certain real number of days, call #Astronomy_AddDays.
The astro_time_t type contains ut to represent Universal Time (UT1/UTC) and
tt to represent Terrestrial Time (TT, also known as ephemeris time).
The difference tt-ut is known as ΔT, using a best-fit piecewise model devised by
Espenak and Meeus.
Both tt and ut are necessary for performing different astronomical calculations.
Indeed, certain calculations (such as rise/set times) require both time scales.
See the documentation for the ut and tt fields for more detailed information.
In cases where astro_time_t is included in a structure returned by
a function that can fail, the astro_status_t field status will contain a value
other than ASTRO_SUCCESS; in that case the ut and tt will hold NAN (not a number).
In general, when there is an error code stored in a struct field status, the
caller should ignore all other values in that structure, including the ut and tt
inside astro_time_t.
Fields§
§ut: f64@brief UT1/UTC number of days since noon on January 1, 2000.
The floating point number of days of Universal Time since noon UTC January 1, 2000. Astronomy Engine approximates UTC and UT1 as being the same thing, although they are not exactly equivalent; UTC and UT1 can disagree by up to ±0.9 seconds. This approximation is sufficient for the accuracy requirements of Astronomy Engine.
Universal Time Coordinate (UTC) is the international standard for legal and civil timekeeping and replaces the older Greenwich Mean Time (GMT) standard. UTC is kept in sync with unpredictable observed changes in the Earth’s rotation by occasionally adding leap seconds as needed.
UT1 is an idealized time scale based on observed rotation of the Earth, which gradually slows down in an unpredictable way over time, due to tidal drag by the Moon and Sun, large scale weather events like hurricanes, and internal seismic and convection effects. Conceptually, UT1 drifts from atomic time continuously and erratically, whereas UTC is adjusted by a scheduled whole number of leap seconds as needed.
The value in ut is appropriate for any calculation involving the Earth’s rotation,
such as calculating rise/set times, culumination, and anything involving apparent
sidereal time.
Before the era of atomic timekeeping, days based on the Earth’s rotation were often known as mean solar days.
tt: f64@brief Terrestrial Time days since noon on January 1, 2000.
Terrestrial Time is an atomic time scale defined as a number of days since noon on January 1, 2000.
In this system, days are not based on Earth rotations, but instead by
the number of elapsed SI seconds
divided by 86400. Unlike ut, tt increases uniformly without adjustments
for changes in the Earth’s rotation.
The value in tt is used for calculations of movements not involving the Earth’s rotation,
such as the orbits of planets around the Sun, or the Moon around the Earth.
Historically, Terrestrial Time has also been known by the term Ephemeris Time (ET).
psi: f64@brief For internal use only. Used to optimize Earth tilt calculations.
eps: f64@brief For internal use only. Used to optimize Earth tilt calculations.
st: f64@brief For internal use only. Lazy-caches sidereal time (Earth rotation).
Trait Implementations§
Source§impl Clone for astro_time_t
impl Clone for astro_time_t
Source§fn clone(&self) -> astro_time_t
fn clone(&self) -> astro_time_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more