Trait i2csensors::Altimeter [] [src]

pub trait Altimeter {
    type Error: Error;
    fn altitude_meters(
        &mut self,
        sea_level_kpa: f32
    ) -> Result<f32, Self::Error>; }

Trait for sensors that provide access to altitude readings

Associated Types

Required Methods

Get an altitude reading from the sensor in meters, relative to the pressure in kPa at sea level

Returns Ok(altitude) if available, otherwise returns Err(Self::Error)

Implementors