pub struct LateralTarget {
pub position_m: Vec2,
pub velocity_mps: Vec2,
pub max_speed_mps: f32,
}Expand description
What the LateralController tracks: a horizontal position, a velocity fed forward
toward it, and a speed limit. Horizontal components are (north, east), as in the
VehicleState frame contract.
§Examples
use stable_flight::Vec2;
use stable_flight::controllers::LateralTarget;
// Fly to 20 m north at up to 5 m/s, stopping there.
let target = LateralTarget {
position_m: Vec2::new(20.0, 0.0),
velocity_mps: Vec2::zeros(),
max_speed_mps: 5.0,
};Fields§
§position_m: Vec2Desired position in meters.
velocity_mps: Vec2Velocity in m/s added to the position loop’s demand: zero stops at the target, a non-zero value flies through it.
max_speed_mps: f32Cap on the desired speed in m/s. Zero, negative, or NaN means no cap (the guidance’s tilt limit still applies).
Trait Implementations§
Source§impl Clone for LateralTarget
impl Clone for LateralTarget
impl Copy for LateralTarget
Source§impl Debug for LateralTarget
impl Debug for LateralTarget
Source§impl PartialEq for LateralTarget
impl PartialEq for LateralTarget
impl StructuralPartialEq for LateralTarget
Auto Trait Implementations§
impl Freeze for LateralTarget
impl RefUnwindSafe for LateralTarget
impl Send for LateralTarget
impl Sync for LateralTarget
impl Unpin for LateralTarget
impl UnsafeUnpin for LateralTarget
impl UnwindSafe for LateralTarget
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,
impl<T> Scalar for T
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.