#[derive(Clone, Copy, Debug)]
pub struct Point {
pub x: f32,
pub y: f32,
pub z: f32,
pub amplitude: f32,
pub reflectance: f32,
pub deviation: u16,
pub echo_type: EchoType,
pub is_waveform_available: bool,
pub is_pseudo_echo: bool,
pub is_sw_target: bool,
pub with_fresh_pps: bool,
pub is_time_in_pps_timeframe: bool,
pub facet_number: u8,
pub time: f64,
}
#[derive(Clone, Copy, Debug)]
pub enum EchoType {
Single,
First,
Interior,
Last,
}
impl From<u16> for EchoType {
fn from(n: u16) -> EchoType {
match n & 3 {
0 => EchoType::Single,
1 => EchoType::First,
2 => EchoType::Interior,
3 => EchoType::Last,
_ => unreachable!(),
}
}
}