pub struct BodyRateSetpoint {
pub roll_radps: f32,
pub pitch_radps: f32,
pub yaw_radps: f32,
pub thrust: f32,
pub idle: bool,
}Expand description
Absolute body-rate target, for Setpoint::BodyRate (copter) and Setpoint::PlaneRate
(plane). The stabilizer saturates each rate to its limit (NaN as zero).
Fields§
§roll_radps: f32Roll rate about body x in rad/s, right positive.
pitch_radps: f32Pitch rate about body y in rad/s, nose up positive.
yaw_radps: f32Yaw rate about body z in rad/s, nose right positive.
thrust: f32Linear collective thrust, 0.0 to 1.0, before the stabilizer’s thrust curve.
idle: boolGround idle, as AttitudeSetpoint::idle; a plane stabilizer ignores it.
Trait Implementations§
Source§impl Clone for BodyRateSetpoint
impl Clone for BodyRateSetpoint
impl Copy for BodyRateSetpoint
Source§impl Debug for BodyRateSetpoint
impl Debug for BodyRateSetpoint
Source§impl Default for BodyRateSetpoint
impl Default for BodyRateSetpoint
Source§impl<'de> Deserialize<'de> for BodyRateSetpoint
impl<'de> Deserialize<'de> for BodyRateSetpoint
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 From<&AbsoluteRateCommand> for BodyRateSetpoint
The rates of an AbsoluteRateCommand, as given.
impl From<&AbsoluteRateCommand> for BodyRateSetpoint
The rates of an AbsoluteRateCommand, as given.
§Examples
use stable_flight::{AbsoluteRateCommand, BodyRateSetpoint};
let command = AbsoluteRateCommand { roll_radps: 2.0, thrust: 0.5, ..Default::default() };
assert_eq!(BodyRateSetpoint::from(&command).roll_radps, 2.0);Source§fn from(command: &AbsoluteRateCommand) -> Self
fn from(command: &AbsoluteRateCommand) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BodyRateSetpoint
impl PartialEq for BodyRateSetpoint
Source§impl Serialize for BodyRateSetpoint
impl Serialize for BodyRateSetpoint
impl StructuralPartialEq for BodyRateSetpoint
Auto Trait Implementations§
impl Forget for BodyRateSetpoint
impl Freeze for BodyRateSetpoint
impl Move for BodyRateSetpoint
impl RefUnwindSafe for BodyRateSetpoint
impl Send for BodyRateSetpoint
impl Sync for BodyRateSetpoint
impl Unpin for BodyRateSetpoint
impl UnsafeUnpin for BodyRateSetpoint
impl UnwindSafe for BodyRateSetpoint
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.