MAV'RIC
|
Interface class for barometers. More...
#include <barometer.hpp>
Public Member Functions | |
Barometer (float pressure_at_sea_level=101325.0f) | |
virtual bool | init (void)=0 |
Initialise the sensor. | |
virtual bool | update (void)=0 |
Main update function Reads new values from sensor. | |
virtual uint64_t | last_update_us (void) const =0 |
Get the last update time in microseconds. | |
virtual float | pressure (void) const =0 |
Return the pressure (in Pa) | |
virtual float | altitude_gf (void) const =0 |
Get the altitude in meters above sea level. | |
virtual float | altitude_gf_raw (void) const =0 |
Get the altitude in meters above sea level (not filtered) | |
virtual float | vertical_speed_lf (void) const =0 |
Get the vertical speed in meters/second. | |
virtual float | vertical_speed_lf_raw (void) const =0 |
Get the vertical speed in meters/second (not filtered) | |
virtual float | temperature (void) const =0 |
Get sensor temperature. | |
Static Public Member Functions | |
static float | pressure_at_sea_level (void) |
Get the pressure at sea level The pressure at sea level is used to compute altitude from pressure. | |
static float | compute_altitude_from_pressure (float pressure, float pressure_at_sea_level_=pressure_at_sea_level()) |
Compute altitude above sea level from pressure. | |
static float | compute_pressure_at_sea_level (float pressure, float altitude) |
Compute pressure at sea level from pressure and altitude. | |
Static Protected Member Functions | |
static void | set_pressure_at_sea_level (float pressure_at_sea_level) |
Update the pressure at sea level The pressure at sea level is used to compute altitude from pressure. |
Interface class for barometers.
virtual float Barometer::altitude_gf | ( | void | ) | const [pure virtual] |
Get the altitude in meters above sea level.
Global frame: (>0 means upward)
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
virtual float Barometer::altitude_gf_raw | ( | void | ) | const [pure virtual] |
Get the altitude in meters above sea level (not filtered)
Global frame: (>0 means upward)
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
float Barometer::compute_altitude_from_pressure | ( | float | pressure, |
float | pressure_at_sea_level_ = pressure_at_sea_level() |
||
) | [static] |
Compute altitude above sea level from pressure.
pressure | Current atmospheric pressure (in Pa) |
pressure_at_sea_level | Pressure at sea level (in Pa) (optional) |
float Barometer::compute_pressure_at_sea_level | ( | float | pressure, |
float | altitude | ||
) | [static] |
Compute pressure at sea level from pressure and altitude.
pressure | Current atmospheric pressure (in Pa) |
altitude_ | Altitude |
virtual bool Barometer::init | ( | void | ) | [pure virtual] |
Initialise the sensor.
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
virtual uint64_t Barometer::last_update_us | ( | void | ) | const [pure virtual] |
Get the last update time in microseconds.
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
virtual float Barometer::pressure | ( | void | ) | const [pure virtual] |
Return the pressure (in Pa)
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
float Barometer::pressure_at_sea_level | ( | void | ) | [static] |
Get the pressure at sea level The pressure at sea level is used to compute altitude from pressure.
pressure_at_sea_level | (in Pa) |
void Barometer::set_pressure_at_sea_level | ( | float | pressure_at_sea_level | ) | [static, protected] |
Update the pressure at sea level The pressure at sea level is used to compute altitude from pressure.
pressure_at_sea_level |
virtual float Barometer::temperature | ( | void | ) | const [pure virtual] |
Get sensor temperature.
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
virtual bool Barometer::update | ( | void | ) | [pure virtual] |
Main update function Reads new values from sensor.
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
virtual float Barometer::vertical_speed_lf | ( | void | ) | const [pure virtual] |
Get the vertical speed in meters/second.
NED frame: (>0 means downward)
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.
virtual float Barometer::vertical_speed_lf_raw | ( | void | ) | const [pure virtual] |
Get the vertical speed in meters/second (not filtered)
NED frame: (>0 means downward)
Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.