Skip to main content

ForceModel

Trait ForceModel 

Source
pub trait ForceModel {
    // Required method
    fn acceleration(&self, state: &FlightState, mass_kg: f64) -> Result<Vec3>;
}
Expand description

Environmental acceleration hook (gravity, drag, wind, etc.), without motor or controls.

Called at every RK4 stage with the stage’s position, velocity, time and current mass. Implementations must be deterministic and side-effect free for reproducible integration.

Required Methods§

Source

fn acceleration(&self, state: &FlightState, mass_kg: f64) -> Result<Vec3>

Acceleration in world-frame metres per second squared.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§