pub struct Scenario {
pub name: &'static str,
pub roll_deg: f32,
pub pitch_deg: f32,
pub heading_deg: f32,
pub body_rates_degps: [f32; 3],
pub position_neu_m: [f32; 3],
pub velocity_neu_mps: [f32; 3],
pub acceleration_neu_mps2: [f32; 3],
}Expand description
One physical situation and the VehicleState it must map to.
Fields give the physical truth in the frame contract’s axes and signs, with angles in degrees (as simulators usually report them), so a backend can build its native fixture from them.
Fields§
§name: &'static strShort name used in failure messages.
roll_deg: f32Roll angle in degrees.
pitch_deg: f32Pitch angle in degrees.
heading_deg: f32Heading in degrees.
body_rates_degps: [f32; 3]Body rates (roll, pitch, yaw) in degrees per second.
position_neu_m: [f32; 3]World position (north, east, up) in meters.
velocity_neu_mps: [f32; 3]World velocity (north, east, up) in m/s.
acceleration_neu_mps2: [f32; 3]World acceleration (north, east, up) in m/s².
Implementations§
Source§impl Scenario
impl Scenario
Sourcepub fn expected_state(&self) -> VehicleState
pub fn expected_state(&self) -> VehicleState
The VehicleState a conforming backend reports for this scenario.
Sourcepub fn check(&self, state: &VehicleState) -> Result<(), ConformanceError>
pub fn check(&self, state: &VehicleState) -> Result<(), ConformanceError>
Checks state against this scenario: position, velocity, acceleration, the Euler
angles, the attitude quaternion’s Euler angles, and the body rates.
Angles are compared modulo a full turn, so a heading in [0, 2π) or [-π, π) both pass. A NaN field always fails.
§Errors
ConformanceError listing every field outside ANGLE_TOLERANCE or
LINEAR_TOLERANCE.
Trait Implementations§
impl Copy for Scenario
impl StructuralPartialEq for Scenario
Auto Trait Implementations§
impl Freeze for Scenario
impl RefUnwindSafe for Scenario
impl Send for Scenario
impl Sync for Scenario
impl Unpin for Scenario
impl UnsafeUnpin for Scenario
impl UnwindSafe for Scenario
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
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.