pub struct CentralGravity { /* private fields */ }Expand description
Inverse-square gravity toward a fixed center, for planet-scale flight.
Unlike UniformGravity, both magnitude and direction vary with position,
which matters once trajectories span hundreds of kilometres or climb above
the atmosphere. Positions are read in the caller’s frame; place center_m
at the attracting body’s center (for an Earth-centered inertial coast, the
origin). There is no atmosphere here: pair with an AltitudeSwitch or a
custom model when drag still applies.
Implementations§
Trait Implementations§
Source§impl Clone for CentralGravity
impl Clone for CentralGravity
impl Copy for CentralGravity
Source§impl Debug for CentralGravity
impl Debug for CentralGravity
Source§impl ForceModel for CentralGravity
impl ForceModel for CentralGravity
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.
Auto Trait Implementations§
impl Freeze for CentralGravity
impl RefUnwindSafe for CentralGravity
impl Send for CentralGravity
impl Sync for CentralGravity
impl Unpin for CentralGravity
impl UnsafeUnpin for CentralGravity
impl UnwindSafe for CentralGravity
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.