pub struct Weathercock { /* private fields */ }Expand description
Second-order weathercock: the body axis relaxes toward the relative wind with natural frequency ωₙ² = q·A·Cnα·(CP−CG)/I and exponential damping 2ζωₙ. Positive static margin (CP aft of CG) is stable; negative margin diverges, as it should. The axis and rate are snapshot-able state, updated once per public step with an explicit first-order-in-dt scheme, so choose the public cadence well below the axis’s natural period.
Implementations§
Source§impl Weathercock
impl Weathercock
Sourcepub fn new(
params: WeathercockParams,
initial_axis: Vec3,
atmosphere: Atmosphere,
wind_mps: Vec3,
) -> Result<Self>
pub fn new( params: WeathercockParams, initial_axis: Vec3, atmosphere: Atmosphere, wind_mps: Vec3, ) -> Result<Self>
initial_axis is the pad orientation (normalized at construction).
atmosphere and wind_mps should match the force model’s air.
Trait Implementations§
Source§impl Clone for Weathercock
impl Clone for Weathercock
Source§impl Debug for Weathercock
impl Debug for Weathercock
Source§impl Guidance for Weathercock
impl Guidance for Weathercock
Source§fn command(&mut self, context: GuidanceContext<'_>) -> Result<ControlInput>
fn command(&mut self, context: GuidanceContext<'_>) -> Result<ControlInput>
Produce a finite control command, or explain why control cannot be computed.
Auto Trait Implementations§
impl Freeze for Weathercock
impl RefUnwindSafe for Weathercock
impl Send for Weathercock
impl Sync for Weathercock
impl Unpin for Weathercock
impl UnsafeUnpin for Weathercock
impl UnwindSafe for Weathercock
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.