pub struct UniformGravity(pub Vec3);Expand description
Constant gravity with no atmosphere. Use a zero vector for an inertial vacuum.
Tuple Fields§
§0: Vec3Trait Implementations§
Source§impl Clone for UniformGravity
impl Clone for UniformGravity
impl Copy for UniformGravity
Source§impl Debug for UniformGravity
impl Debug for UniformGravity
Source§impl Default for UniformGravity
impl Default for UniformGravity
Source§impl ForceModel for UniformGravity
impl ForceModel for UniformGravity
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 Freeze for UniformGravity
impl RefUnwindSafe for UniformGravity
impl Send for UniformGravity
impl Sync for UniformGravity
impl Unpin for UniformGravity
impl UnsafeUnpin for UniformGravity
impl UnwindSafe for UniformGravity
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.