refactor: move firmware workspace under firmware
This commit is contained in:
1 parent
153b0bf262
commit
f03fc119a4
222 files changed
+56
-13
No files matched your search
@@ -0,0 +1,26 @@
|
||||
//! Distance sensor observations.
|
||||
|
||||
use kaptan_time::Timestamp;
|
||||
|
||||
/// Coherent range observation in the sensor frame.
|
||||
///
|
||||
/// The timestamp is captured when the measurement is requested. Distance is
|
||||
/// expressed in millimetres so rangefinders with centimetre resolution can be
|
||||
/// published without floating-point conversion.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct RangeSnapshot {
|
||||
/// Monotonic timestamp captured when the acquisition was requested.
|
||||
pub timestamp: Timestamp,
|
||||
/// Measured distance in millimetres.
|
||||
pub distance_millimetres: u32,
|
||||
}
|
||||
|
||||
impl RangeSnapshot {
|
||||
/// Creates one accepted range observation.
|
||||
pub const fn new(timestamp: Timestamp, distance_millimetres: u32) -> Self {
|
||||
Self {
|
||||
timestamp,
|
||||
distance_millimetres,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user