Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
International Standard Atmosphere utilities
+ Collaboration diagram for International Standard Atmosphere utilities:

Macros

#define PPRZ_ISA_SEA_LEVEL_PRESSURE   101325.0
 ISA sea level standard atmospheric pressure in Pascal. More...
 
#define PPRZ_ISA_SEA_LEVEL_TEMP   288.15
 ISA sea level standard temperature in Kelvin. More...
 
#define PPRZ_ISA_TEMP_LAPS_RATE   0.0065
 temperature laps rate in K/m More...
 
#define PPRZ_ISA_GRAVITY   9.80665
 earth-surface gravitational acceleration in m/s^2 More...
 
#define PPRZ_ISA_GAS_CONSTANT   8.31447
 universal gas constant in J/(mol*K) More...
 
#define PPRZ_ISA_MOLAR_MASS   0.0289644
 molar mass of dry air in kg/mol More...
 
#define PPRZ_ISA_AIR_GAS_CONSTANT   (PPRZ_ISA_GAS_CONSTANT/PPRZ_ISA_MOLAR_MASS)
 universal gas constant / molar mass of dry air in J*kg/K More...
 
#define PPRZ_ISA_AIR_DENSITY   1.225
 standard air density in kg/m^3 More...
 
#define PPRZ_ISA_ABS_NULL   -273.15
 absolute null in celcius More...
 
#define CelsiusOfKelvin(_t)   (_t - 274.15f)
 Convert temperature from Kelvin to Celsius. More...
 
#define KelvinOfCelsius(_t)   (_t + 274.15f)
 Convert temperature from Celsius to Kelvin. More...
 

Functions

static float pprz_isa_altitude_of_pressure (float pressure)
 Get absolute altitude from pressure (using simplified equation). More...
 
static float pprz_isa_height_of_pressure (float pressure, float ref_p)
 Get relative altitude from pressure (using simplified equation). More...
 
static float pprz_isa_pressure_of_altitude (float altitude)
 Get pressure in Pa from absolute altitude (using simplified equation). More...
 
static float pprz_isa_pressure_of_height (float height, float ref_p)
 Get pressure in Pa from height (using simplified equation). More...
 
static float pprz_isa_height_of_pressure_full (float pressure, float ref_p)
 Get relative altitude from pressure (using full equation). More...
 
static float pprz_isa_ref_pressure_of_height_full (float pressure, float height)
 Get reference pressure (QFE or QNH) from current pressure and height. More...
 
static float pprz_isa_temperature_of_altitude (float alt)
 Get ISA temperature from a MSL altitude. More...
 
static float pprz_isa_density_of_pressure (float pressure, float temp)
 Get the air density (rho) from a given pressure and temperature. More...
 

Variables

static const float PPRZ_ISA_M_OF_P_CONST = (PPRZ_ISA_AIR_GAS_CONSTANT *PPRZ_ISA_SEA_LEVEL_TEMP / PPRZ_ISA_GRAVITY)
 

Detailed Description

Macro Definition Documentation

◆ CelsiusOfKelvin

#define CelsiusOfKelvin (   _t)    (_t - 274.15f)

Convert temperature from Kelvin to Celsius.

Definition at line 71 of file pprz_isa.h.

◆ KelvinOfCelsius

#define KelvinOfCelsius (   _t)    (_t + 274.15f)

Convert temperature from Celsius to Kelvin.

Definition at line 73 of file pprz_isa.h.

◆ PPRZ_ISA_ABS_NULL

#define PPRZ_ISA_ABS_NULL   -273.15

absolute null in celcius

Definition at line 66 of file pprz_isa.h.

◆ PPRZ_ISA_AIR_DENSITY

#define PPRZ_ISA_AIR_DENSITY   1.225

standard air density in kg/m^3

Definition at line 64 of file pprz_isa.h.

◆ PPRZ_ISA_AIR_GAS_CONSTANT

#define PPRZ_ISA_AIR_GAS_CONSTANT   (PPRZ_ISA_GAS_CONSTANT/PPRZ_ISA_MOLAR_MASS)

universal gas constant / molar mass of dry air in J*kg/K

Definition at line 62 of file pprz_isa.h.

◆ PPRZ_ISA_GAS_CONSTANT

#define PPRZ_ISA_GAS_CONSTANT   8.31447

universal gas constant in J/(mol*K)

Definition at line 58 of file pprz_isa.h.

◆ PPRZ_ISA_GRAVITY

#define PPRZ_ISA_GRAVITY   9.80665

earth-surface gravitational acceleration in m/s^2

Definition at line 56 of file pprz_isa.h.

◆ PPRZ_ISA_MOLAR_MASS

#define PPRZ_ISA_MOLAR_MASS   0.0289644

molar mass of dry air in kg/mol

Definition at line 60 of file pprz_isa.h.

◆ PPRZ_ISA_SEA_LEVEL_PRESSURE

#define PPRZ_ISA_SEA_LEVEL_PRESSURE   101325.0

ISA sea level standard atmospheric pressure in Pascal.

Definition at line 50 of file pprz_isa.h.

◆ PPRZ_ISA_SEA_LEVEL_TEMP

#define PPRZ_ISA_SEA_LEVEL_TEMP   288.15

ISA sea level standard temperature in Kelvin.

Definition at line 52 of file pprz_isa.h.

◆ PPRZ_ISA_TEMP_LAPS_RATE

#define PPRZ_ISA_TEMP_LAPS_RATE   0.0065

temperature laps rate in K/m

Definition at line 54 of file pprz_isa.h.

Function Documentation

◆ pprz_isa_altitude_of_pressure()

static float pprz_isa_altitude_of_pressure ( float  pressure)
inlinestatic

Get absolute altitude from pressure (using simplified equation).

Referrence pressure is standard pressure at sea level

Parameters
pressurecurrent pressure in Pascal (Pa)
Returns
altitude in m in ISA conditions

Definition at line 82 of file pprz_isa.h.

References PPRZ_ISA_M_OF_P_CONST, and PPRZ_ISA_SEA_LEVEL_PRESSURE.

Referenced by baro_bmp280_event(), and baro_ms5611_event().

+ Here is the caller graph for this function:

◆ pprz_isa_density_of_pressure()

static float pprz_isa_density_of_pressure ( float  pressure,
float  temp 
)
inlinestatic

Get the air density (rho) from a given pressure and temperature.

Parameters
pressurecurrent pressure in Pascal (Pa)
temptemperature in celcius
Returns
air density rho

Definition at line 193 of file pprz_isa.h.

References PPRZ_ISA_ABS_NULL, and PPRZ_ISA_AIR_GAS_CONSTANT.

Referenced by baro_cb().

+ Here is the caller graph for this function:

◆ pprz_isa_height_of_pressure()

static float pprz_isa_height_of_pressure ( float  pressure,
float  ref_p 
)
inlinestatic

Get relative altitude from pressure (using simplified equation).

Given the current pressure and a reference pressure (at height=0), calculate the height above the reference in meters. If you pass QNH as reference pressure, you get the height above sea level. Using QFE as reference pressure, you get height above the airfield.

Parameters
pressurecurrent pressure in Pascal (Pa)
ref_preference pressure (QFE) when height=0 or QNH at sea level
Returns
height in m above reference in ISA conditions

Definition at line 102 of file pprz_isa.h.

References PPRZ_ISA_M_OF_P_CONST.

Referenced by baro_cb(), ins_alt_float_update_baro(), and ins_float_invariant_update_baro().

+ Here is the caller graph for this function:

◆ pprz_isa_height_of_pressure_full()

static float pprz_isa_height_of_pressure_full ( float  pressure,
float  ref_p 
)
inlinestatic

Get relative altitude from pressure (using full equation).

Given the current pressure and a reference pressure (at height=0), calculate the height above the reference in meters. If you pass QNH as reference pressure, you get the height above sea level. Using QFE as reference pressure, you get height above the airfield.

Parameters
pressurecurrent pressure in Pascal (Pa)
ref_preference pressure (QFE or QNH) in Pa
Returns
height above reference in m in ISA conditions

Definition at line 146 of file pprz_isa.h.

References PPRZ_ISA_GAS_CONSTANT, PPRZ_ISA_GRAVITY, PPRZ_ISA_MOLAR_MASS, PPRZ_ISA_SEA_LEVEL_TEMP, and PPRZ_ISA_TEMP_LAPS_RATE.

Referenced by baro_cb(), and pressure_abs_cb().

+ Here is the caller graph for this function:

◆ pprz_isa_pressure_of_altitude()

static float pprz_isa_pressure_of_altitude ( float  altitude)
inlinestatic

Get pressure in Pa from absolute altitude (using simplified equation).

Parameters
altitudecurrent absolute altitude in meters
Returns
static pressure in Pa at given altitude in ISA conditions

Definition at line 117 of file pprz_isa.h.

References altitude, PPRZ_ISA_M_OF_P_CONST, and PPRZ_ISA_SEA_LEVEL_PRESSURE.

Referenced by baro_sim_periodic(), compute_tas_factor(), and decode_gpspacket().

+ Here is the caller graph for this function:

◆ pprz_isa_pressure_of_height()

static float pprz_isa_pressure_of_height ( float  height,
float  ref_p 
)
inlinestatic

Get pressure in Pa from height (using simplified equation).

Parameters
heightcurrent height over reference (relative altitude) in meters
ref_preference pressure (QFE or QNH) when height = 0
Returns
static pressure in Pa at given height in ISA conditions

Definition at line 129 of file pprz_isa.h.

References PPRZ_ISA_M_OF_P_CONST.

Referenced by gazebo_read().

+ Here is the caller graph for this function:

◆ pprz_isa_ref_pressure_of_height_full()

static float pprz_isa_ref_pressure_of_height_full ( float  pressure,
float  height 
)
inlinestatic

Get reference pressure (QFE or QNH) from current pressure and height.

(using full equation)

Parameters
pressurecurrent pressure in Pascal (Pa)
heightheight above referece (sea level for QNH, airfield alt for QFE) in m
Returns
reference pressure at height=0 in Pa

Definition at line 166 of file pprz_isa.h.

References PPRZ_ISA_GAS_CONSTANT, PPRZ_ISA_GRAVITY, PPRZ_ISA_MOLAR_MASS, PPRZ_ISA_SEA_LEVEL_TEMP, and PPRZ_ISA_TEMP_LAPS_RATE.

Referenced by pressure_abs_cb().

+ Here is the caller graph for this function:

◆ pprz_isa_temperature_of_altitude()

static float pprz_isa_temperature_of_altitude ( float  alt)
inlinestatic

Get ISA temperature from a MSL altitude.

Parameters
altAMSL altitude
Returns
temperature in ISA condition

Definition at line 181 of file pprz_isa.h.

References PPRZ_ISA_SEA_LEVEL_TEMP, and PPRZ_ISA_TEMP_LAPS_RATE.

Referenced by compute_tas_factor().

+ Here is the caller graph for this function:

Variable Documentation

◆ PPRZ_ISA_M_OF_P_CONST