Trait nyx_space::dynamics::ForceModel[][src]

pub trait ForceModel: Send + Sync {
    fn eom(&self, ctx: &SpacecraftState) -> Result<Vector3<f64>, NyxError>;
fn dual_eom(
        &self,
        radius: &Vector3<Hyperdual<f64, U7>>,
        osc_ctx: &SpacecraftState
    ) -> Result<(Vector3<f64>, Matrix3<f64>), NyxError>; }

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

fn eom(&self, ctx: &SpacecraftState) -> Result<Vector3<f64>, NyxError>[src]

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

fn dual_eom(
    &self,
    radius: &Vector3<Hyperdual<f64, U7>>,
    osc_ctx: &SpacecraftState
) -> Result<(Vector3<f64>, Matrix3<f64>), NyxError>
[src]

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.

Loading content...

Implementors

impl ForceModel for ConstantDrag[src]

impl ForceModel for Drag[src]

impl ForceModel for SolarPressure[src]

Loading content...