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,37 @@
|
||||
//! Inertial measurement unit observations.
|
||||
|
||||
use kaptan_time::Timestamp;
|
||||
|
||||
/// Coherent IMU observation in the board body frame.
|
||||
///
|
||||
/// Acceleration is milligravity, angular rate is milliradians per second, and
|
||||
/// temperature is centidegrees Celsius. The board-frame transform is complete
|
||||
/// before this value is published.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub struct ImuSnapshot {
|
||||
/// Monotonic timestamp captured at acquisition interrupt entry.
|
||||
pub timestamp: Timestamp,
|
||||
/// Body-frame acceleration in milligravity.
|
||||
pub acceleration_milligravity: [i16; 3],
|
||||
/// Body-frame angular rate in milliradians per second.
|
||||
pub angular_rate_milliradians_per_second: [i16; 3],
|
||||
/// Sensor temperature in centidegrees Celsius.
|
||||
pub temperature_centidegrees_celsius: i16,
|
||||
}
|
||||
|
||||
impl ImuSnapshot {
|
||||
/// Creates one accepted IMU observation.
|
||||
pub const fn new(
|
||||
timestamp: Timestamp,
|
||||
acceleration_milligravity: [i16; 3],
|
||||
angular_rate_milliradians_per_second: [i16; 3],
|
||||
temperature_centidegrees_celsius: i16,
|
||||
) -> Self {
|
||||
Self {
|
||||
timestamp,
|
||||
acceleration_milligravity,
|
||||
angular_rate_milliradians_per_second,
|
||||
temperature_centidegrees_celsius,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user