pub struct BoxedForces(pub Box<dyn ForceModel>);Expand description
Owned, type-erased force-model handle for heterogeneous model composition.
A newtype rather than Box<dyn ForceModel> so it cannot collide with the
blanket closure implementations.
Tuple Fields§
§0: Box<dyn ForceModel>Trait Implementations§
Source§impl Debug for BoxedForces
impl Debug for BoxedForces
Source§impl ForceModel for BoxedForces
impl ForceModel for BoxedForces
Source§fn acceleration(&self, state: &FlightState, mass_kg: f64) -> Result<Vec3>
fn acceleration(&self, state: &FlightState, mass_kg: f64) -> Result<Vec3>
Acceleration in world-frame metres per second squared.
Source§fn acceleration_with_axis(
&self,
state: &FlightState,
mass_kg: f64,
body_axis: Vec3,
) -> Result<Vec3>
fn acceleration_with_axis( &self, state: &FlightState, mass_kg: f64, body_axis: Vec3, ) -> Result<Vec3>
Acceleration when the commanded body axis is known, for angle-of-attack-aware
models (body lift, induced drag).
body_axis is the solver-resolved unit
thrust axis at this stage. The default ignores the axis, which keeps every
orientation-blind model (gravity, plain drag) bit-identical.Auto Trait Implementations§
impl !RefUnwindSafe for BoxedForces
impl !Send for BoxedForces
impl !Sync for BoxedForces
impl !UnwindSafe for BoxedForces
impl Freeze for BoxedForces
impl Unpin for BoxedForces
impl UnsafeUnpin for BoxedForces
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.