robotics_signals/sensors/
illuminance.rs

1use crate::standard::Header;
2use cdds_derive::*;
3use cyclonedds_rs::*;
4use serde_derive::{Deserialize, Serialize};
5
6/// Single photometric illuminance measurement.  Light should be assumed to be
7/// measured along the sensor's x-axis (the area of detection is the y-z plane).
8/// The illuminance should have a 0 or positive value and be received with
9/// the sensor's +X axis pointing toward the light source.
10///
11/// Photometric illuminance is the measure of the human eye's sensitivity of the
12/// intensity of light encountering or passing through a surface.
13///
14/// All other Photometric and Radiometric measurements should not use this message.
15/// This message cannot represent:
16///  - Luminous intensity (candela/light source output)
17///  - Luminance (nits/light output per area)
18///  - Irradiance (watt/area), etc.
19
20#[repr(C)]
21#[derive(Serialize, Deserialize, Topic)]
22pub struct Illuminance {
23    /// frame_id is the location and direction of the reading
24    pub header: Header,
25    /// Measurement of the Photometric Illuminance in Lux.
26    pub illuminance: f64,
27    ///  0 is interpreted as variance unknown
28    pub variance: f64,
29}