Struct hifitime::julian::ModifiedJulian [] [src]

pub struct ModifiedJulian {
    pub days: f64,
}

ModifiedJulian handles the Modified Julian Days as explained here.

Fields

Methods

impl ModifiedJulian
[src]

[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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ModifiedJulian
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for ModifiedJulian
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl PartialOrd for ModifiedJulian
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[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]

[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.

[src]

into_instant returns an Instant from the ModifiedJulian.

Auto Trait Implementations