Struct hifitime::julian::ModifiedJulian
[−]
[src]
pub struct ModifiedJulian { pub days: f64, }
ModifiedJulian
handles the Modified Julian Days as explained
here.
Fields
days: f64
Methods
impl ModifiedJulian
[src]
pub fn julian_days(self) -> f64
[src]
julian_days
returns the true Julian days from epoch 01 Jan -4713, 12:00
as explained in "Fundamentals of astrodynamics and applications", Vallado et al.
4th edition, page 182, and on Wikipedia.
Trait Implementations
impl Copy for ModifiedJulian
[src]
impl Clone for ModifiedJulian
[src]
fn clone(&self) -> ModifiedJulian
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ModifiedJulian
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for ModifiedJulian
[src]
fn eq(&self, __arg_0: &ModifiedJulian) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ModifiedJulian) -> bool
[src]
This method tests for !=
.
impl PartialOrd for ModifiedJulian
[src]
fn partial_cmp(&self, __arg_0: &ModifiedJulian) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ModifiedJulian) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ModifiedJulian) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ModifiedJulian) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ModifiedJulian) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl TimeSystem for ModifiedJulian
[src]
fn from_instant(instant: Instant) -> ModifiedJulian
[src]
from_instant
converts an Instant
to a ModifiedJulian as detailed in Vallado et al.
4th edition, page 182.
Leap second source contains information pertinent to the NTP time definition, whose epoch is twelve hours ahead of the Julian Day. Here is the relevant quote:
The NTP timestamps are in units of seconds since the NTP epoch, which is 1 January 1900, 00:00:00. The Modified Julian Day number corresponding to the NTP time stamp, X, can be computed as
X/86400 + 15020
where the first term converts seconds to days and the second term adds the MJD corresponding to the time origin defined above. The integer portion of the result is the integer MJD for that day, and any remainder is the time of day, expressed as the fraction of the day since 0 hours UTC. The conversion from day fraction to seconds or to hours, minutes, and seconds may involve rounding or truncation, depending on the method used in the computation.
fn into_instant(self) -> Instant
[src]
into_instant
returns an Instant
from the ModifiedJulian.