Struct nyx_space::celestia::eclipse::Cosm[][src]

pub struct Cosm {
    pub xb: Xb,
    pub frame_root: FrameTree,
    // some fields omitted
}

Fields

xb: Xbframe_root: FrameTree

Implementations

impl Cosm[src]

pub fn from_xb(filename: &str) -> Result<Self, NyxError>[src]

Builds a Cosm from the *XB files. Path should not contain file extension. Panics if the files could not be loaded.

pub fn try_de438() -> Result<Self, NyxError>[src]

Tries to load a subset of the DE438 XB from the embedded files, bounded between 01 Jan 2000 and 31 Dec 2050 TDB.

pub fn de438() -> Arc<Self>[src]

Load a subset of the DE438 XB from the embedded files, bounded between 01 Jan 2000 and 31 Dec 2050 TAI.

pub fn de438_raw() -> Self[src]

Load a subset of the DE438 XB from the embedded files, bounded between 01 Jan 2000 and 31 Dec 2050 TAI.

pub fn de438_gmat() -> Arc<Self>[src]

Load a subset of the DE438 XB from the embedded files, bounded between 01 Jan 2000 and 31 Dec 2050 TAI.

pub fn try_from_xb(xb: Xb) -> Result<Self, NyxError>[src]

Attempts to build a Cosm from the XB files and the embedded IAU frames

pub fn load_iau_frames(&mut self) -> Result<(), NyxError>[src]

Load the IAU Frames as defined in Celest Mech Dyn Astr (2018) 130:22 (https://doi.org/10.1007/s10569-017-9805-5)

pub fn frame_find_path_for_orientation(
    &self,
    name: &str
) -> Result<Vec<usize>, NyxError>
[src]

Returns the machine path of the ephemeris whose orientation is requested

pub fn append_xb(&mut self)[src]

pub fn append_frames(&mut self, toml_content: &str) -> Result<(), NyxError>[src]

Append Cosm with the contents of this TOML (must not be the filename)

pub fn try_frame(&self, name: &str) -> Result<Frame, NyxError>[src]

Fetch the frame associated with this ephemeris name This is slow, so avoid using it.

pub fn frame_from_ephem_path(&self, ephem_path: &[usize]) -> Frame[src]

Provided an ephemeris path and an optional frame name, returns the Frame of that ephemeris. For example, if [3, 1] is provided (Moon in J2000 in the DE file), return Moon J2000 If no frame name is provided, then the storage frame is returned. Otherwise, the correct frame is returned.

pub fn frame_from_frame_path(&self, frame_path: &[usize]) -> Frame[src]

Provided a frame path returns the Frame.

pub fn frames_get_names(&self) -> Vec<String>[src]

pub fn frame(&self, name: &str) -> Frame[src]

Returns the geoid from the loaded XB, if it is in there, else panics!

pub fn frame_mut_gm(&mut self, name: &str, new_gm: f64)[src]

Mutates the GM value for the provided geoid id. Panics if ID not found.

pub fn raw_celestial_state(
    &self,
    path: &[usize],
    epoch: Epoch
) -> Result<Orbit, NyxError>
[src]

Returns the celestial state as computed from a de4xx.{FXB,XB} file in the original frame

pub fn try_celestial_state(
    &self,
    target_ephem: &[usize],
    datetime: Epoch,
    frame: Frame,
    correction: LTCorr
) -> Result<Orbit, NyxError>
[src]

Attempts to return the state of the celestial object at the provided time

The light time correction is based on SPICE’s implementation: https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkezr_c.html . Aberration computation is a conversion of the stelab function in SPICE, available here https://github.com/ChristopherRabotin/cspice/blob/26c72936fb7ff6f366803a1419b7cc3c61e0b6e5/src/cspice/stelab.c#L255

pub fn celestial_state(
    &self,
    target_ephem: &[usize],
    datetime: Epoch,
    frame: Frame,
    correction: LTCorr
) -> Orbit
[src]

Returns the state of the celestial object at the provided time

pub fn try_frame_chg_dcm_from_to(
    &self,
    from: &Frame,
    to: &Frame,
    dt: Epoch
) -> Result<Matrix3<f64>, NyxError>
[src]

Return the DCM to go from the from frame to the to frame

pub fn try_frame_chg(
    &self,
    state: &Orbit,
    new_frame: Frame
) -> Result<Orbit, NyxError>
[src]

Attempts to return the provided state in the provided frame.

pub fn frame_chg(&self, state: &Orbit, new_frame: Frame) -> Orbit[src]

Return the provided state in the provided frame, or panics

Trait Implementations

impl Debug for Cosm[src]

Auto Trait Implementations

impl !RefUnwindSafe for Cosm

impl Send for Cosm

impl Sync for Cosm

impl Unpin for Cosm

impl !UnwindSafe for Cosm

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Error = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>,