pub struct RecoveryForces<F> { /* private fields */ }Expand description
Apogee recovery: a stateless force-model wrapper that swaps the inner
model for recovery drag once the vehicle is descending (vy <= 0) and
the simulation time is at or past deploy_after_s. Recovery drag
replaces the inner acceleration entirely except for gravity:
a = g − (q·CdA/m)·v̂ evaluated against local air. Terminal velocity
sqrt(2·m·g/(ρ·CdA)) emerges naturally.
Because deployment is a pure function of the current state, the wrapper
is deterministic and side-effect free, as ForceModel requires.
Implementations§
Source§impl<F> RecoveryForces<F>
impl<F> RecoveryForces<F>
Sourcepub fn new(
inner: F,
recovery_cd_area_m2: f64,
deploy_after_s: f64,
atmosphere: Atmosphere,
wind_mps: Vec3,
) -> Result<Self>
pub fn new( inner: F, recovery_cd_area_m2: f64, deploy_after_s: f64, atmosphere: Atmosphere, wind_mps: Vec3, ) -> Result<Self>
recovery_cd_area_m2 is the parachute’s Cd·A product in m².
deploy_after_s is an absolute simulation-time gate: deployment
happens on the first descending state at or after it (0 = at
apogee). wind_mps should match the inner model’s uniform wind.
Trait Implementations§
Source§impl<F: Clone> Clone for RecoveryForces<F>
impl<F: Clone> Clone for RecoveryForces<F>
Source§impl<F: Debug> Debug for RecoveryForces<F>
impl<F: Debug> Debug for RecoveryForces<F>
Source§impl<F: ForceModel> ForceModel for RecoveryForces<F>
impl<F: ForceModel> ForceModel for RecoveryForces<F>
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<F> Freeze for RecoveryForces<F>where
F: Freeze,
impl<F> RefUnwindSafe for RecoveryForces<F>where
F: RefUnwindSafe,
impl<F> Send for RecoveryForces<F>where
F: Send,
impl<F> Sync for RecoveryForces<F>where
F: Sync,
impl<F> Unpin for RecoveryForces<F>where
F: Unpin,
impl<F> UnsafeUnpin for RecoveryForces<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for RecoveryForces<F>where
F: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.