[−][src]Struct hifitime::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 maybe_from_gregorian_tai(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Result<Self, Errors>
[src]
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Result<Self, Errors>
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]
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Self
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]
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Self
pub fn maybe_from_gregorian_utc(
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Result<Self, Errors>
[src]
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Result<Self, Errors>
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]
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
nanos: u32
) -> Self
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]
year: i32,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Self
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_tdt_seconds(self) -> f64
[src]
Returns seconds past TAI epoch in Terrestrial Dynamical Time (TDT) (also called Terrestrial Time (TT))
pub fn as_jde_tdt_days(self) -> f64
[src]
Returns days past Julian epoch in Terrestrial Dynamical Time (TDT) (also called Terrestrial Time (TT))
pub fn as_mjd_tdt_days(self) -> f64
[src]
Returns days past Modified Julian epoch in Terrestrial Dynamical Time (TDT) (also called Terrestrial Time (TT))
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 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 PartialOrd<Epoch> for Epoch
[src]
fn partial_cmp(&self, other: &Epoch) -> Option<Ordering>
[src]
fn lt(&self, other: &Epoch) -> bool
[src]
fn le(&self, other: &Epoch) -> bool
[src]
fn gt(&self, other: &Epoch) -> bool
[src]
fn ge(&self, other: &Epoch) -> bool
[src]
impl PartialEq<Epoch> for Epoch
[src]
impl Clone for Epoch
[src]
fn clone(&self) -> Epoch
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Epoch
[src]
impl Debug for Epoch
[src]
impl Sub<Epoch> for Epoch
[src]
Auto Trait Implementations
impl Send for Epoch
impl Unpin for Epoch
impl Sync 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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,