Trait nyx_space::dynamics::Dynamics[][src]

pub trait Dynamics where
    Self: Sized
{ type StateSize: DimName; fn time(&self) -> f64;
fn state(&self) -> VectorN<f64, Self::StateSize>
    where
        DefaultAllocator: Allocator<f64, Self::StateSize>
;
fn eom(
        &self,
        t: f64,
        state: &VectorN<f64, Self::StateSize>
    ) -> VectorN<f64, Self::StateSize>
    where
        DefaultAllocator: Allocator<f64, Self::StateSize>
;
fn set_state(
        &mut self,
        new_t: f64,
        new_state: &VectorN<f64, Self::StateSize>
    )
    where
        DefaultAllocator: Allocator<f64, Self::StateSize>
; }

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.

Associated Types

Defines the state size for these dynamics. It must be imported from nalgebra.

Required Methods

Returns the time of the current state

Returns the current state of the dynamics so it can be integrated.

Defines the equations of motion for these dynamics, or a combination of provided dynamics.

Updates the internal state of the dynamics.

Implementors