pub struct TT(/* private fields */);Expand description
Terrestrial Time representation.
Wraps a split Julian Date for high-precision time storage. TT is the primary time scale for geocentric ephemeris calculations.
Implementations§
Source§impl TT
impl TT
Sourcepub fn new(seconds: i64, nanos: u32) -> Self
pub fn new(seconds: i64, nanos: u32) -> Self
Creates TT from Unix timestamp components.
Converts seconds and nanoseconds since Unix epoch (1970-01-01T00:00:00) to TT Julian Date representation.
Sourcepub fn from_julian_date(jd: JulianDate) -> Self
pub fn from_julian_date(jd: JulianDate) -> Self
Creates TT from a split Julian Date.
Sourcepub fn from_julian_date_raw(jd1: f64, jd2: f64) -> Self
pub fn from_julian_date_raw(jd1: f64, jd2: f64) -> Self
Creates TT from raw Julian Date components.
Use when you have separate jd1/jd2 values and want to avoid intermediate JulianDate construction.
Sourcepub fn j2000() -> Self
pub fn j2000() -> Self
Returns TT at J2000.0 epoch (2000-01-01T12:00:00 TT).
This is the fundamental epoch for modern astronomical calculations. JD = 2451545.0.
Sourcepub fn to_julian_date(&self) -> JulianDate
pub fn to_julian_date(&self) -> JulianDate
Returns the underlying Julian Date.
Sourcepub fn add_seconds(&self, seconds: f64) -> Self
pub fn add_seconds(&self, seconds: f64) -> Self
Returns a new TT offset by the given number of seconds.
Sourcepub fn from_jd(jd: f64) -> TimeResult<Self>
pub fn from_jd(jd: f64) -> TimeResult<Self>
Creates TT from a single-value Julian Date.
For high-precision work, prefer from_julian_date with split values.
Sourcepub fn julian_year(&self) -> f64
pub fn julian_year(&self) -> f64
Returns the Julian year corresponding to this TT instant.
Julian year = 2000.0 + (JD - J2000_JD) / 365.25
Sourcepub fn centuries_since_j2000(&self) -> f64
pub fn centuries_since_j2000(&self) -> f64
Returns Julian centuries since J2000.0 (the T parameter).
This is the time argument used in IAU precession and nutation series. One Julian century = 36525 days.
Trait Implementations§
Source§impl From<JulianDate> for TT
Converts JulianDate to TT directly.
impl From<JulianDate> for TT
Converts JulianDate to TT directly.
Source§fn from(jd: JulianDate) -> Self
fn from(jd: JulianDate) -> Self
Source§impl FromStr for TT
Parses TT from ISO 8601 format (e.g., “2000-01-01T12:00:00”).
impl FromStr for TT
Parses TT from ISO 8601 format (e.g., “2000-01-01T12:00:00”).
Assumes the input string represents a TT instant directly.
Source§impl NutationCalculator for TT
impl NutationCalculator for TT
fn nutation_iau2000a(&self) -> TimeResult<NutationResult>
fn nutation_iau2000b(&self) -> TimeResult<NutationResult>
fn nutation_iau2006a(&self) -> TimeResult<NutationResult>
fn nutation(&self) -> TimeResult<NutationResult>
Source§impl PrecessionCalculator for TT
impl PrecessionCalculator for TT
fn precession_iau2000(&self) -> TimeResult<PrecessionResult>
fn precession_iau2006(&self) -> TimeResult<PrecessionResult>
fn precession(&self) -> TimeResult<PrecessionResult>
fn bias_precession_matrix(&self) -> TimeResult<RotationMatrix3>
Source§impl ToTAI for TT
Convert TT to TAI by subtracting the fixed 32.184 second offset.
impl ToTAI for TT
Convert TT to TAI by subtracting the fixed 32.184 second offset.
The offset is subtracted from whichever Julian Date component has smaller magnitude to preserve maximum precision in the two-part representation.
Source§fn to_tai(&self) -> TimeResult<TAI>
fn to_tai(&self) -> TimeResult<TAI>
Source§impl ToTCG for TT
impl ToTCG for TT
Source§fn to_tcg(&self) -> TimeResult<TCG>
fn to_tcg(&self) -> TimeResult<TCG>
Convert TT to TCG by applying the L_G rate correction.
Uses L_G / (1 - L_G) as the rate ratio for the forward transformation.
This ratio accounts for the fact that we’re computing TCG from TT, not vice versa.
At J2000.0, this adds about 0.506 seconds.
Source§impl ToTDB for TT
impl ToTDB for TT
Source§fn to_tdb_greenwich(&self) -> TimeResult<TDB>
fn to_tdb_greenwich(&self) -> TimeResult<TDB>
Source§fn to_tdb_with_location(&self, location: &Location) -> TimeResult<TDB>
fn to_tdb_with_location(&self, location: &Location) -> TimeResult<TDB>
Source§fn to_tdb_with_location_and_ut1_offset(
&self,
location: &Location,
ut1_offset_seconds: f64,
) -> TimeResult<TDB>
fn to_tdb_with_location_and_ut1_offset( &self, location: &Location, ut1_offset_seconds: f64, ) -> TimeResult<TDB>
Source§fn to_tdb_with_offset(&self, dtr_seconds: f64) -> TimeResult<TDB>
fn to_tdb_with_offset(&self, dtr_seconds: f64) -> TimeResult<TDB>
Source§impl ToTT for TT
Identity conversion for TT.
impl ToTT for TT
Identity conversion for TT.