Trait nyx_space::dynamics::ForceModel

source ·
pub trait ForceModel: Send + Sync + Display {
    // Required methods
    fn eom(
        &self,
        ctx: &Spacecraft,
        almanac: Arc<Almanac>
    ) -> Result<Vector3<f64>, DynamicsError>;
    fn dual_eom(
        &self,
        osc_ctx: &Spacecraft,
        almanac: Arc<Almanac>
    ) -> Result<(Vector3<f64>, Matrix3<f64>), DynamicsError>;
}
Expand description

The ForceModel trait handles immutable dynamics which return a force. Those will be divided by the mass of the spacecraft to compute the acceleration (F = ma).

Examples include Solar Radiation Pressure, drag, etc., i.e. forces which do not need to save the current state, only act on it.

Required Methods§

source

fn eom( &self, ctx: &Spacecraft, almanac: Arc<Almanac> ) -> Result<Vector3<f64>, DynamicsError>

Defines the equations of motion for this force model from the provided osculating state.

source

fn dual_eom( &self, osc_ctx: &Spacecraft, almanac: Arc<Almanac> ) -> Result<(Vector3<f64>, Matrix3<f64>), DynamicsError>

Force models must implement their partials, although those will only be called if the propagation requires the computation of the STM. The osc_ctx is the osculating context, i.e. it changes for each sub-step of the integrator.

Implementors§