[][src]Trait nyx_space::dynamics::thrustctrl::ThrustControl

pub trait ThrustControl {
    fn direction(&self, state: &State) -> Vector3<f64>;
fn throttle(&self, state: &State) -> f64;
fn next(&mut self, state: &State); fn achieved(&self, _state: &State) -> Result<bool, ThrustingError> { ... } }

The ThrustControl trait handles control 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

fn direction(&self, state: &State) -> Vector3<f64>

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

fn throttle(&self, state: &State) -> 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.

fn next(&mut self, state: &State)

Prepares the controller for the next maneuver (called from set_state of the dynamics).

Loading content...

Provided methods

fn achieved(&self, _state: &State) -> Result<bool, ThrustingError>

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

Loading content...

Implementors

impl ThrustControl for FiniteBurns[src]

impl ThrustControl for Ruggiero[src]

fn achieved(&self, state: &State) -> Result<bool, ThrustingError>[src]

Returns whether the control law has achieved all goals

fn next(&mut self, osc: &State)[src]

Update the state for the next iteration

Loading content...