MAV'RIC
Public Member Functions | Static Public Member Functions | Static Protected Member Functions
Barometer Class Reference

Interface class for barometers. More...

#include <barometer.hpp>

Inheritance diagram for Barometer:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

Interface class for barometers.


Member Function Documentation

virtual float Barometer::altitude_gf ( void  ) const [pure virtual]

Get the altitude in meters above sea level.

Global frame: (>0 means upward)

Returns:
Value

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)

Returns:
Value

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.

Parameters:
pressureCurrent atmospheric pressure (in Pa)
pressure_at_sea_levelPressure at sea level (in Pa) (optional)
Returns:
Altitude (global frame)

Here is the caller graph for this function:

float Barometer::compute_pressure_at_sea_level ( float  pressure,
float  altitude 
) [static]

Compute pressure at sea level from pressure and altitude.

Parameters:
pressureCurrent atmospheric pressure (in Pa)
altitude_Altitude
Returns:
Pressure at sea level (in Pa)
virtual bool Barometer::init ( void  ) [pure virtual]

Initialise the sensor.

Returns:
Success

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.

Returns:
Value

Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.

Here is the caller graph for this function:

virtual float Barometer::pressure ( void  ) const [pure virtual]

Return the pressure (in Pa)

Returns:
Value

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.

Parameters:
pressure_at_sea_level(in Pa)

Here is the caller graph for this function:

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.

Parameters:
pressure_at_sea_level

Here is the call graph for this function:

virtual float Barometer::temperature ( void  ) const [pure virtual]

Get sensor temperature.

Returns:
Value

Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.

virtual bool Barometer::update ( void  ) [pure virtual]

Main update function Reads new values from sensor.

Returns:
Success

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)

Returns:
Value

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)

Returns:
Value

Implemented in Barometer_MS5611, Barometer_BMP085, and Barometer_sim.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines