embedded-camsense-x1 0.1.0

Platform-agnostic Rust driver for the Camsense-X1 LiDAR sensor.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Constants module

/// Number of measurements per scan
pub const NUMBER_OF_MEASUREMENTS_PER_SCAN: usize = 50;
/// Number of points per single measurement / partial scan
pub const NUMBER_OF_POINTS_PER_MEASUREMENT: usize = 8;
/// Number of points per scan
pub const NUMBER_OF_POINTS_PER_SCAN: usize =
    NUMBER_OF_POINTS_PER_MEASUREMENT * NUMBER_OF_MEASUREMENTS_PER_SCAN;
/// Size of payload sent by sensor in bytes
pub const PAYLOAD_SIZE_IN_BYTES: usize = 36;
/// Multiplier for converting point angle to index
pub const INDEX_MULTIPLIER: f32 = NUMBER_OF_POINTS_PER_SCAN as f32 / 360.0;
/// Default offset value from center for measured angles
pub const ANGLE_CENTER_OFFSET_DEFAULT: f32 = 13.0;
/// Default duration between partial scans
pub const UPDATE_INTERVAL_DEFAULT: u64 = 10;