pub trait GuidanceLaw<X: SpacecraftExt>: Display + Send + Sync {
    // Required methods
    fn direction(&self, osc_state: &BaseSpacecraft<X>) -> Vector3<f64>;
    fn throttle(&self, osc_state: &BaseSpacecraft<X>) -> f64;
    fn next(&self, next_state: &mut BaseSpacecraft<X>);

    // Provided method
    fn achieved(&self, _osc_state: &BaseSpacecraft<X>) -> Result<bool, NyxError> { ... }
}
Expand description

The GuidanceLaw trait handles guidance laws, optimizations, and other such methods for controlling the overall thrust direction when tied to a Spacecraft. For delta V control, tie the DeltaVctrl to a MissionArc.

Required Methods§

source

fn direction(&self, osc_state: &BaseSpacecraft<X>) -> Vector3<f64>

Returns a unit vector corresponding to the thrust direction in the inertial frame.

source

fn throttle(&self, osc_state: &BaseSpacecraft<X>) -> f64

Returns a number between [0;1] corresponding to the engine throttle level. For example, 0 means coasting, i.e. no thrusting, and 1 means maximum thrusting.

source

fn next(&self, next_state: &mut BaseSpacecraft<X>)

Updates the state of the spacecraft for the next maneuver, e.g. prepares the controller for the next maneuver

Provided Methods§

source

fn achieved(&self, _osc_state: &BaseSpacecraft<X>) -> Result<bool, NyxError>

Returns whether this thrust control has been achieved, if it has an objective

Implementors§