pub struct BlendSetpoint {
pub hover: AttitudeSetpoint,
pub plane: PlaneSetpoint,
pub lift_share: f32,
}Expand description
A hover and a wing-borne target flown together, for Setpoint::Blend: a lift+cruise
VTOL (quadplane) in transition, its lift rotors flying hover and its surfaces and pusher
flying plane.
The stabilizer weights the lift rotors’ thrust and moments by lift_share and flies the
surfaces and pusher in full (PX4’s standard VTOL,
src/modules/vtol_att_control/standard.cpp:294-368). A NaN share counts as 1, the lift
rotors carrying it all; others saturate to [0, 1].
§Examples
use stable_flight::{AttitudeSetpoint, BlendSetpoint, PlaneSetpoint, Setpoint};
// Halfway through handing the lift to the wing, the pusher at full throttle.
let blend = Setpoint::Blend(BlendSetpoint {
hover: AttitudeSetpoint { thrust: 0.5, ..Default::default() },
plane: PlaneSetpoint { thrust: 1.0, ..Default::default() },
lift_share: 0.5,
});
assert_eq!(blend.thrust(), 0.5);Fields§
§hover: AttitudeSetpointThe lift rotors’ target, flown by the hover side.
plane: PlaneSetpointThe surfaces’ and pusher’s target, flown by the plane side.
The share of hover lift the lift rotors carry, 0.0 to 1.0.
Trait Implementations§
Source§impl Clone for BlendSetpoint
impl Clone for BlendSetpoint
impl Copy for BlendSetpoint
Source§impl Debug for BlendSetpoint
impl Debug for BlendSetpoint
Source§impl Default for BlendSetpoint
impl Default for BlendSetpoint
Source§impl<'de> Deserialize<'de> for BlendSetpoint
impl<'de> Deserialize<'de> for BlendSetpoint
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 BlendSetpoint
impl PartialEq for BlendSetpoint
Source§impl Serialize for BlendSetpoint
impl Serialize for BlendSetpoint
impl StructuralPartialEq for BlendSetpoint
Auto Trait Implementations§
impl Freeze for BlendSetpoint
impl RefUnwindSafe for BlendSetpoint
impl Send for BlendSetpoint
impl Sync for BlendSetpoint
impl Unpin for BlendSetpoint
impl UnsafeUnpin for BlendSetpoint
impl UnwindSafe for BlendSetpoint
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.