Skip to main content

Guidance

Trait Guidance 

Source
pub trait Guidance {
    // Required method
    fn command(&mut self, context: GuidanceContext<'_>) -> Result<ControlInput>;
}
Expand description

Application-owned controller hook, independent of entities, targets and render timing.

Controllers are called once per public step, never inside RK4 stages. The command is then held constant over every internal substep. Stateful controllers should save their own state alongside FlightState and use a fixed update cadence for replay. Controller mutations are not rolled back if subsequent integration fails.

Required Methods§

Source

fn command(&mut self, context: GuidanceContext<'_>) -> Result<ControlInput>

Produce a finite control command, or explain why control cannot be computed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§