Struct wave::measurements::SensorMeasurement
source · #[repr(C)]pub struct SensorMeasurement<const RES_X: usize, const RES_Y: usize> {
pub zone_dist: [[f32; RES_X]; RES_Y],
pub time_ms: u32,
}
Expand description
Represents a sensor measurement coming from the TOF sensor.
Expects that the zones are already rotated and mirrored, so that the zone with index [0][0] is the top left corner when looking at the sensor.
Fields§
§zone_dist: [[f32; RES_X]; RES_Y]
The measured distances of each zone.
Invalid distance measurements are represented by value -1.0.
time_ms: u32
The time of the measurement in milliseconds. Must be monotonically increasing.
Implementations§
Trait Implementations§
source§impl<const RES_X: usize, const RES_Y: usize> Clone for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> Clone for SensorMeasurement<RES_X, RES_Y>
source§fn clone(&self) -> SensorMeasurement<RES_X, RES_Y>
fn clone(&self) -> SensorMeasurement<RES_X, RES_Y>
Returns a copy 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<const RES_X: usize, const RES_Y: usize> PartialEq for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> PartialEq for SensorMeasurement<RES_X, RES_Y>
source§fn eq(&self, other: &SensorMeasurement<RES_X, RES_Y>) -> bool
fn eq(&self, other: &SensorMeasurement<RES_X, RES_Y>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<const RES_X: usize, const RES_Y: usize> PartialOrd for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> PartialOrd for SensorMeasurement<RES_X, RES_Y>
source§fn partial_cmp(
&self,
other: &SensorMeasurement<RES_X, RES_Y>
) -> Option<Ordering>
fn partial_cmp( &self, other: &SensorMeasurement<RES_X, RES_Y> ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<const RES_X: usize, const RES_Y: usize> Copy for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> StructuralPartialEq for SensorMeasurement<RES_X, RES_Y>
Auto Trait Implementations§
impl<const RES_X: usize, const RES_Y: usize> RefUnwindSafe for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> Send for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> Sync for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> Unpin for SensorMeasurement<RES_X, RES_Y>
impl<const RES_X: usize, const RES_Y: usize> UnwindSafe for SensorMeasurement<RES_X, RES_Y>
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