Enum hifitime::TimeScale

source ·
pub enum TimeScale {
    TAI,
    TT,
    ET,
    TDB,
    UTC,
    GPST,
    GST,
    BDT,
}
Expand description

Enum of the different time systems available

Variants§

§

TAI

TAI is the representation of an Epoch internally

§

TT

Terrestrial Time (TT) (previously called Terrestrial Dynamical Time (TDT))

§

ET

Ephemeris Time as defined by SPICE (slightly different from true TDB)

§

TDB

Dynamic Barycentric Time (TDB) (higher fidelity SPICE ephemeris time)

§

UTC

Universal Coordinated Time

§

GPST

GPST Time also applies to QZSS, IRNSS and GAL constellations

§

GST

Galileo Time scale

§

BDT

BeiDou Time scale

Implementations§

source§

impl TimeScale

source

pub const fn is_gnss(&self) -> bool

Returns true if Self is based off a GNSS constellation

source

pub const fn ref_epoch(&self) -> Epoch

Returns Reference Epoch (t(0)) for given timescale

source§

impl TimeScale

source

pub const fn uses_leap_seconds(&self) -> bool

Returns true if self takes leap seconds into account

Trait Implementations§

source§

impl Clone for TimeScale

source§

fn clone(&self) -> TimeScale

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TimeScale

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TimeScale

source§

fn default() -> Self

Builds default TAI time scale

source§

impl<'de> Deserialize<'de> for TimeScale

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for TimeScale

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Prints given TimeScale

source§

impl From<TimeScale> for u8

Allows conversion of a TimeSystem into a u8 Mapping: TAI: 0; TT: 1; ET: 2; TDB: 3; UTC: 4; GPST: 5; GST: 6; BDT: 7;

source§

fn from(ts: TimeScale) -> Self

Converts to this type from the input type.
source§

impl From<u8> for TimeScale

Allows conversion of a u8 into a TimeSystem. Mapping: 1: TT; 2: ET; 3: TDB; 4: UTC; 5: GPST; 6: GST; 7: BDT; anything else: TAI

source§

fn from(val: u8) -> Self

Converts to this type from the input type.
source§

impl FromStr for TimeScale

§

type Err = Errors

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for TimeScale

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for TimeScale

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Prints given TimeScale in RINEX format ie., standard GNSS constellation name is preferred when possible

source§

impl PartialEq for TimeScale

source§

fn eq(&self, other: &TimeScale) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TimeScale

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TimeScale

source§

impl Eq for TimeScale

source§

impl StructuralEq for TimeScale

source§

impl StructuralPartialEq for TimeScale

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,