[][src]Struct hifitime::Epoch

pub struct Epoch(_);

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

Refer to the appropriate functions for initializing this Epoch from different time systems or representations.

Methods

impl Epoch[src]

pub fn from_tai_seconds(seconds: f64) -> Self[src]

Initialize an Epoch from the provided TAI seconds since 1900 January 01 at midnight

pub fn from_tai_days(days: f64) -> Self[src]

Initialize an Epoch from the provided TAI days since 1900 January 01 at midnight

pub fn from_mjd_tai(days: f64) -> Self[src]

pub fn from_jde_tai(days: f64) -> Self[src]

pub fn from_tt_seconds(seconds: f64) -> Self[src]

Initialize an Epoch from the provided TT seconds (approximated to 32.184s delta from TAI)

pub fn from_et_seconds(seconds: f64) -> Epoch[src]

Initialize from SPICE ephemeris time (same as Dynamic Barycentric Time (TBD)) whose epoch is 2000 JAN 01 noon TAI

pub fn from_jde_et(days: f64) -> Self[src]

Initialize from SPICE ephemeris time in JD days

pub fn maybe_from_gregorian_tai(
    year: i32,
    month: u8,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8,
    nanos: u32
) -> Result<Self, Errors>
[src]

Attempts to build an Epoch from the provided Gregorian date and time in TAI.

pub fn from_gregorian_tai(
    year: i32,
    month: u8,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8,
    nanos: u32
) -> Self
[src]

Builds an Epoch from the provided Gregorian date and time in TAI. If invalid date is provided, this function will panic. Use maybe_from_gregorian_tai if unsure.

pub fn from_gregorian_tai_at_midnight(year: i32, month: u8, day: u8) -> Self[src]

pub fn from_gregorian_tai_at_noon(year: i32, month: u8, day: u8) -> Self[src]

pub fn from_gregorian_tai_hms(
    year: i32,
    month: u8,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8
) -> Self
[src]

pub fn maybe_from_gregorian_utc(
    year: i32,
    month: u8,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8,
    nanos: u32
) -> Result<Self, Errors>
[src]

Attempts to build an Epoch from the provided Gregorian date and time in UTC.

pub fn from_gregorian_utc(
    year: i32,
    month: u8,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8,
    nanos: u32
) -> Self
[src]

Builds an Epoch from the provided Gregorian date and time in TAI. If invalid date is provided, this function will panic. Use maybe_from_gregorian_tai if unsure.

pub fn from_gregorian_utc_at_midnight(year: i32, month: u8, day: u8) -> Self[src]

pub fn from_gregorian_utc_at_noon(year: i32, month: u8, day: u8) -> Self[src]

pub fn from_gregorian_utc_hms(
    year: i32,
    month: u8,
    day: u8,
    hour: u8,
    minute: u8,
    second: u8
) -> Self
[src]

pub fn as_tai_seconds(self) -> f64[src]

pub fn as_tai_days(self) -> f64[src]

pub fn as_utc_seconds(self) -> f64[src]

Returns the number of UTC seconds since the TAI epoch

pub fn as_utc_days(self) -> f64[src]

pub fn as_mjd_tai_days(self) -> f64[src]

as_mjd_days creates an Epoch from the provided Modified Julian Date in days as explained here. MJD epoch is Modified Julian Day at 17 November 1858 at midnight.

pub fn as_mjd_utc_days(self) -> f64[src]

Returns the Modified Julian Date in days UTC.

pub fn as_mjd_tai_seconds(self) -> f64[src]

Returns the Modified Julian Date in seconds TAI.

pub fn as_mjd_utc_seconds(self) -> f64[src]

Returns the Modified Julian Date in seconds UTC.

pub fn as_jde_tai_days(self) -> f64[src]

Returns the Julian days from epoch 01 Jan -4713, 12:00 (noon) as explained in "Fundamentals of astrodynamics and applications", Vallado et al. 4th edition, page 182, and on Wikipedia.

pub fn as_jde_tai_seconds(self) -> f64[src]

Returns the Julian seconds in TAI.

pub fn as_jde_utc_days(self) -> f64[src]

Returns the Julian days in UTC.

pub fn as_jde_utc_seconds(self) -> f64[src]

Returns the Julian seconds in UTC.

pub fn as_tt_seconds(self) -> f64[src]

Returns seconds past TAI epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

pub fn as_jde_tt_days(self) -> f64[src]

Returns days past Julian epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

pub fn as_mjd_tt_days(self) -> f64[src]

Returns days past Modified Julian epoch in Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

pub fn as_gpst_seconds(self) -> f64[src]

Returns seconds past GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29).

pub fn as_gpst_days(self) -> f64[src]

Returns days past GPS Time Epoch, defined as UTC midnight of January 5th to 6th 1980 (cf. https://gssc.esa.int/navipedia/index.php/Time_References_in_GNSS#GPS_Time_.28GPST.29).

pub fn as_et_seconds(self) -> f64[src]

pub fn as_jde_et_days(self) -> f64[src]

pub fn mut_add_days(&mut self, days: f64)[src]

Increment this epoch by the number of days provided.

pub fn mut_add_secs(&mut self, seconds: f64)[src]

Increment this epoch by the number of days provided.

pub fn mut_sub_days(&mut self, days: f64)[src]

Decrement this epoch by the number of days provided.

pub fn mut_sub_secs(&mut self, seconds: f64)[src]

Decrement this epoch by the number of days provided.

Trait Implementations

impl Clone for Epoch[src]

impl Copy for Epoch[src]

impl PartialEq<Epoch> for Epoch[src]

impl PartialOrd<Epoch> for Epoch[src]

impl Debug for Epoch[src]

impl Sub<Epoch> for Epoch[src]

type Output = f64

The resulting type after applying the - operator.

impl Sub<f64> for Epoch[src]

type Output = Self

The resulting type after applying the - operator.

impl Add<f64> for Epoch[src]

type Output = Self

The resulting type after applying the + operator.

impl StructuralPartialEq for Epoch[src]

Auto Trait Implementations

impl Send for Epoch

impl Sync for Epoch

impl Unpin for Epoch

impl UnwindSafe for Epoch

impl RefUnwindSafe for Epoch

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,