pub struct FlightHandling {
pub turn_rate: f32,
pub turn_response: f32,
pub pitch_limit: f32,
pub pitch_response: f32,
pub bank_limit: f32,
pub bank_response: f32,
pub speed_response: f32,
}Fields§
§turn_rate: f32§turn_response: f32§pitch_limit: f32§pitch_response: f32§bank_limit: f32§bank_response: f32§speed_response: f32Implementations§
Source§impl FlightHandling
impl FlightHandling
Sourcepub fn validate(&self) -> Result<(), VehicleError>
pub fn validate(&self) -> Result<(), VehicleError>
Check finite coefficients in 0..=10000, pitch limit in 0..=1.5
radians and bank limit in 0..=PI radians.
These are exactly the handling limits enforced by FlightState::step.
Zero responses are valid and freeze their corresponding smoothing.
use ferravex_play::vehicle::{FlightHandling, VehicleError};
let mut handling = FlightHandling::default();
assert_eq!(handling.validate(), Ok(()));
handling.pitch_limit = 1.6;
assert_eq!(handling.validate(), Err(VehicleError::Invalid));Trait Implementations§
Source§impl Clone for FlightHandling
impl Clone for FlightHandling
Source§fn clone(&self) -> FlightHandling
fn clone(&self) -> FlightHandling
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlightHandling
impl Debug for FlightHandling
Source§impl Default for FlightHandling
impl Default for FlightHandling
Source§fn default() -> FlightHandling
fn default() -> FlightHandling
Returns the “default value” for a type. Read more
impl Copy for FlightHandling
Auto Trait Implementations§
impl Freeze for FlightHandling
impl RefUnwindSafe for FlightHandling
impl Send for FlightHandling
impl Sync for FlightHandling
impl Unpin for FlightHandling
impl UnwindSafe for FlightHandling
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