pub trait Dynamics: Clone + Sync + Sendwhere
    DefaultAllocator: Allocator<f64, <Self::StateType as State>::Size> + Allocator<f64, <Self::StateType as State>::VecLength> + Allocator<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size>,{
    type HyperdualSize: DimName;
    type StateType: State;

    // Required method
    fn eom(
        &self,
        delta_t: f64,
        state_vec: &OVector<f64, <Self::StateType as State>::VecLength>,
        state_ctx: &Self::StateType
    ) -> Result<OVector<f64, <Self::StateType as State>::VecLength>, NyxError>
       where DefaultAllocator: Allocator<f64, <Self::StateType as State>::VecLength>;

    // Provided methods
    fn dual_eom(
        &self,
        _delta_t: f64,
        _osculating_state: &Self::StateType
    ) -> Result<(OVector<f64, <Self::StateType as State>::Size>, OMatrix<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size>), NyxError>
       where DefaultAllocator: Allocator<f64, Self::HyperdualSize> + Allocator<f64, <Self::StateType as State>::Size> + Allocator<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size> + Allocator<OHyperdual<f64, Self::HyperdualSize>, <Self::StateType as State>::Size>,
             Owned<f64, Self::HyperdualSize>: Copy { ... }
    fn finally(
        &self,
        next_state: Self::StateType
    ) -> Result<Self::StateType, NyxError> { ... }
}
Expand description

Defines the Exponentially Correlated Random Variable dynamics The Dynamics trait handles and stores any equation of motion and the state is integrated.

Its design is such that several of the provided dynamics can be combined fairly easily. However, when combining the dynamics (e.g. integrating both the attitude of a spaceraft and its orbital parameters), it is up to the implementor to handle time and state organization correctly. For time management, I highly recommend using hifitime which is thoroughly validated.

Required Associated Types§

source

type HyperdualSize: DimName

The state of the associated hyperdual state, almost always StateType + U1

source

type StateType: State

Required Methods§

source

fn eom( &self, delta_t: f64, state_vec: &OVector<f64, <Self::StateType as State>::VecLength>, state_ctx: &Self::StateType ) -> Result<OVector<f64, <Self::StateType as State>::VecLength>, NyxError>where DefaultAllocator: Allocator<f64, <Self::StateType as State>::VecLength>,

Defines the equations of motion for these dynamics, or a combination of provided dynamics. The time delta_t is in seconds PAST the context epoch. The state vector is the state which changes for every intermediate step of the integration. The state context is the state of what is being propagated, it should allow rebuilding a new state context from the provided state vector.

Provided Methods§

source

fn dual_eom( &self, _delta_t: f64, _osculating_state: &Self::StateType ) -> Result<(OVector<f64, <Self::StateType as State>::Size>, OMatrix<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size>), NyxError>where DefaultAllocator: Allocator<f64, Self::HyperdualSize> + Allocator<f64, <Self::StateType as State>::Size> + Allocator<f64, <Self::StateType as State>::Size, <Self::StateType as State>::Size> + Allocator<OHyperdual<f64, Self::HyperdualSize>, <Self::StateType as State>::Size>, Owned<f64, Self::HyperdualSize>: Copy,

Defines the equations of motion for Dual numbers for these dynamics. All dynamics need to allow for automatic differentiation. However, if differentiation is not supported, then the dynamics should prevent initialization with a context which has an STM defined.

source

fn finally( &self, next_state: Self::StateType ) -> Result<Self::StateType, NyxError>

Optionally performs some final changes after each successful integration of the equations of motion. For example, this can be used to update the Guidance mode. NOTE: This function is also called just prior to very first integration step in order to update the initial state if needed.

Implementors§