pub struct ThrustMisalignment<G> { /* private fields */ }Expand description
A fixed thrust-axis misalignment, applied to any inner guidance command.
Models the small, constant boresight error that is the dominant dispersion
source for unguided rockets: tilt_rad is the angular offset magnitude and
clock_rad its orientation about the commanded axis. Zero tilt is
bit-identical to the inner command.
Implementations§
Source§impl<G> ThrustMisalignment<G>
impl<G> ThrustMisalignment<G>
Sourcepub fn new(inner: G, tilt_rad: f64, clock_rad: f64) -> Result<Self>
pub fn new(inner: G, tilt_rad: f64, clock_rad: f64) -> Result<Self>
Wrap an inner guidance source. tilt_rad >= 0; clock_rad measured
about the commanded axis from an arbitrary but deterministic reference.
Sourcepub fn basis_u(&self) -> Option<Vec3>
pub fn basis_u(&self) -> Option<Vec3>
Current reference-basis vector, for snapshot/replay continuity.
Sourcepub fn set_basis_u(&mut self, basis_u: Option<Vec3>)
pub fn set_basis_u(&mut self, basis_u: Option<Vec3>)
Restore a previously snapshotted reference basis (or None to reseed).
Trait Implementations§
Source§impl<G: Clone> Clone for ThrustMisalignment<G>
impl<G: Clone> Clone for ThrustMisalignment<G>
impl<G: Copy> Copy for ThrustMisalignment<G>
Source§impl<G: Debug> Debug for ThrustMisalignment<G>
impl<G: Debug> Debug for ThrustMisalignment<G>
Source§impl<G: Guidance> Guidance for ThrustMisalignment<G>
impl<G: Guidance> Guidance for ThrustMisalignment<G>
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<G> Freeze for ThrustMisalignment<G>where
G: Freeze,
impl<G> RefUnwindSafe for ThrustMisalignment<G>where
G: RefUnwindSafe,
impl<G> Send for ThrustMisalignment<G>where
G: Send,
impl<G> Sync for ThrustMisalignment<G>where
G: Sync,
impl<G> Unpin for ThrustMisalignment<G>where
G: Unpin,
impl<G> UnsafeUnpin for ThrustMisalignment<G>where
G: UnsafeUnpin,
impl<G> UnwindSafe for ThrustMisalignment<G>where
G: 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.