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.
Sourcepub fn with_wind_segments(
self,
zones: Vec<(f64, f64, f64, f64)>,
) -> Result<Self>
pub fn with_wind_segments( self, zones: Vec<(f64, f64, f64, f64)>, ) -> Result<Self>
Sample downrange-segmented wind like the force model does: each zone applies until its downrange limit, then the next takes over.
Sourcepub fn with_turbulence(
self,
sigma_mps: f64,
tau_s: f64,
seed: u64,
) -> Result<Self>
pub fn with_turbulence( self, sigma_mps: f64, tau_s: f64, seed: u64, ) -> Result<Self>
Add the same deterministic frozen-field turbulence as the force
model: with equal sigma/tau/seed the gusts are identical, so
the axis responds to the same air the drag sees.
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>
Auto Trait Implementations§
impl !RefUnwindSafe for Weathercock
impl !UnwindSafe for Weathercock
impl Freeze for Weathercock
impl Send for Weathercock
impl Sync for Weathercock
impl Unpin for Weathercock
impl UnsafeUnpin 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
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.