Barometer
This sensor follows the International Standard Atmosphere (ISA) model [Cav00] .
Classes:
The class that implements a barometer sensor. |
- class pegasus.simulator.logic.sensors.barometer.Barometer
Bases:
Sensor
The class that implements a barometer sensor. This class inherits the base class Sensor.
Methods:
__init__
([config])Initialize the Barometer class
update
(state, dt)Method that should be implemented by the class that inherits Sensor.
Attributes:
(dict) The 'state' of the sensor, i.e. the data produced by the sensor at any given point in time.
- __init__(config={})
Initialize the Barometer class
- Parameters:
config (dict) – A Dictionary that contains all the parameters for configuring the Barometer - it can be empty or only have some of the parameters used by the Barometer.
Examples
The dictionary default parameters are
>>> {"temperature_msl": 288.15, # temperature at MSL [K] (15 [C]) >>> "pressure_msl": 101325.0, # pressure at MSL [Pa] >>> "lapse_rate": 0.0065, # reduction in temperature with altitude for troposphere [K/m] >>> "air_density_msl": 1.225, # air density at MSL [kg/m^3] >>> "absolute_zero": -273.15, # [C] >>> "drift_pa_per_sec": 0.0, # Pa >>> "update_rate": 250.0} # Hz
- update(state, dt)
Method that should be implemented by the class that inherits Sensor. This is where the actual implementation of the sensor should be performed.
- property state
(dict) The ‘state’ of the sensor, i.e. the data produced by the sensor at any given point in time