pub struct ControlOutput {
pub thrust: f32,
pub moments: Vec3,
}Expand description
Represents the high-level control outputs from the stabilization system.
This struct encapsulates the desired thrust and moments to be applied to the
vehicle, which are later translated to specific actuator commands by a Mixer.
§Examples
Creating a control output for a simple hover command:
use stable_flight::{ControlOutput, Vec3};
let output = ControlOutput::new(
0.5, // 50% thrust
Vec3::zeros() // No roll, pitch, or yaw moments
);Fields§
§thrust: f32Normalized thrust value, typically ranging from 0.0 (no thrust) to 1.0 (maximum thrust).
moments: Vec3Control moments in roll (x), pitch (y), and yaw (z) axes. Values are typically normalized between -1.0 and 1.0, where the magnitude represents the proportion of maximum control authority in each axis.
Implementations§
Source§impl ControlOutput
impl ControlOutput
Sourcepub fn new(thrust: f32, moments: Vec3) -> ControlOutput
pub fn new(thrust: f32, moments: Vec3) -> ControlOutput
Trait Implementations§
Source§impl Clone for ControlOutput
impl Clone for ControlOutput
impl Copy for ControlOutput
Source§impl Debug for ControlOutput
impl Debug for ControlOutput
Source§impl Default for ControlOutput
impl Default for ControlOutput
Source§impl<'de> Deserialize<'de> for ControlOutput
impl<'de> Deserialize<'de> for ControlOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ControlOutput
impl PartialEq for ControlOutput
Source§impl Serialize for ControlOutput
impl Serialize for ControlOutput
impl StructuralPartialEq for ControlOutput
Auto Trait Implementations§
impl Freeze for ControlOutput
impl RefUnwindSafe for ControlOutput
impl Send for ControlOutput
impl Sync for ControlOutput
impl Unpin for ControlOutput
impl UnsafeUnpin for ControlOutput
impl UnwindSafe for ControlOutput
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.