nyx_space::cosmic

Trait State

Source
pub trait State:
    Default
    + Copy
    + PartialEq
    + Display
    + LowerExp
    + Send
    + Sync
where Self: Sized, DefaultAllocator: Allocator<Self::Size> + Allocator<Self::Size, Self::Size> + Allocator<Self::VecLength>,
{ type Size: DimName; type VecLength: DimName;
Show 14 methods // Required methods fn to_vector(&self) -> OVector<f64, Self::VecLength>; fn unset_stm(&mut self); fn set(&mut self, epoch: Epoch, vector: &OVector<f64, Self::VecLength>); fn epoch(&self) -> Epoch; fn set_epoch(&mut self, epoch: Epoch); fn orbit(&self) -> Orbit; // Provided methods fn zeros() -> Self { ... } fn stm(&self) -> Result<OMatrix<f64, Self::Size, Self::Size>, DynamicsError> { ... } fn reset_stm(&mut self) { ... } fn set_with_delta_seconds( self, delta_t_s: f64, vector: &OVector<f64, Self::VecLength>, ) -> Self where DefaultAllocator: Allocator<Self::VecLength> { ... } fn add(self, _other: OVector<f64, Self::Size>) -> Self { ... } fn value(&self, param: StateParameter) -> Result<f64, StateError> { ... } fn set_value( &mut self, param: StateParameter, _val: f64, ) -> Result<(), StateError> { ... } fn set_orbit(&mut self, _orbit: Orbit) { ... }
}
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 to_vector(&self) -> OVector<f64, Self::VecLength>

Return this state as a vector for the propagation/estimation

Source

fn unset_stm(&mut self)

Unsets the STM for this state

Source

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

Set this state

Source

fn epoch(&self) -> Epoch

Retrieve the Epoch

Source

fn set_epoch(&mut self, epoch: Epoch)

Set the Epoch

Source

fn orbit(&self) -> Orbit

Returns a copy of the orbit

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>, DynamicsError>

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>, ) -> Self

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, StateError>

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

Source

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

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!)

Source

fn set_orbit(&mut self, _orbit: Orbit)

Modifies this state’s orbit

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§