Trait nyx_space::cosmic::State

source ·
pub trait State: Copy + PartialEq + Display + LowerExp + Send + Syncwhere
    Self: Sized,
    DefaultAllocator: Allocator<f64, Self::Size> + Allocator<f64, Self::Size, Self::Size> + Allocator<f64, Self::VecLength>,{
    type Size: DimName;
    type VecLength: DimName;

    // Required methods
    fn as_vector(&self) -> Result<OVector<f64, Self::VecLength>, NyxError>;
    fn set(
        &mut self,
        epoch: Epoch,
        vector: &OVector<f64, Self::VecLength>
    ) -> Result<(), NyxError>;
    fn epoch(&self) -> Epoch;
    fn set_epoch(&mut self, epoch: Epoch);

    // Provided methods
    fn zeros() -> Self { ... }
    fn stm(&self) -> Result<OMatrix<f64, Self::Size, Self::Size>, NyxError> { ... }
    fn reset_stm(&mut self) { ... }
    fn set_with_delta_seconds(
        self,
        delta_t_s: f64,
        vector: &OVector<f64, Self::VecLength>
    ) -> Self
       where DefaultAllocator: Allocator<f64, Self::VecLength> { ... }
    fn add(self, _other: OVector<f64, Self::Size>) -> Self { ... }
    fn value(&self, _param: &StateParameter) -> Result<f64, NyxError> { ... }
    fn set_value(
        &mut self,
        _param: &StateParameter,
        _val: f64
    ) -> Result<(), NyxError> { ... }
}
Expand description

A trait for generate propagation and estimation state. The first parameter is the size of the state, the second is the size of the propagated state including STM and extra items.

Required Associated Types§

source

type Size: DimName

Size of the state and its STM

source

type VecLength: DimName

Required Methods§

source

fn as_vector(&self) -> Result<OVector<f64, Self::VecLength>, NyxError>

Return this state as a vector for the propagation/estimation

source

fn set( &mut self, epoch: Epoch, vector: &OVector<f64, Self::VecLength> ) -> Result<(), NyxError>

Set this state

source

fn epoch(&self) -> Epoch

Retrieve the Epoch

source

fn set_epoch(&mut self, epoch: Epoch)

Set the Epoch

Provided Methods§

source

fn zeros() -> Self

Initialize an empty state By default, this is not implemented. This function must be implemented when filtering on this state.

source

fn stm(&self) -> Result<OMatrix<f64, Self::Size, Self::Size>, NyxError>

Return this state as a vector for the propagation/estimation By default, this is not implemented. This function must be implemented when filtering on this state.

source

fn reset_stm(&mut self)

Return this state as a vector for the propagation/estimation By default, this is not implemented. This function must be implemented when filtering on this state.

source

fn set_with_delta_seconds( self, delta_t_s: f64, vector: &OVector<f64, Self::VecLength> ) -> Selfwhere DefaultAllocator: Allocator<f64, Self::VecLength>,

Reconstruct a new State from the provided delta time in seconds compared to the current state and with the provided vector.

source

fn add(self, _other: OVector<f64, Self::Size>) -> Self

By default, this is not implemented. This function must be implemented when filtering on this state.

source

fn value(&self, _param: &StateParameter) -> Result<f64, NyxError>

Return the value of the parameter, returns an error by default

source

fn set_value( &mut self, _param: &StateParameter, _val: f64 ) -> Result<(), NyxError>

Allows setting the value of the given parameter. NOTE: Most parameters where the value is available CANNOT be also set for that parameter (it’s a much harder problem!)

Implementors§

source§

impl State for Orbit

Implementation of Orbit as a State for orbital dynamics with STM

§

type Size = Const<6>

§

type VecLength = Const<42>

source§

impl<X: SpacecraftExt> State for BaseSpacecraft<X>

§

type Size = Const<9>

§

type VecLength = Const<90>