![]() |
mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
|
#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/sensors/pressure/pressure_conversion.h>
Collaboration diagram for mars::PressureConversion:Public Types | |
| typedef Eigen::Matrix< double, 1, 1 > | Matrix1d |
Public Member Functions | |
| PressureConversion ()=default | |
| Default constructor for creating a PressureConversion object. | |
| PressureConversion (Pressure pressure) | |
| Detailed constructor to set also the pressure reference. | |
| PressureConversion (Pressure pressure, MediumPressureOptions gas_options) | |
| Detailed constructor to set the pressure reference and medium options. | |
| void | set_pressure_reference (Pressure pressure) |
| Setter function to set the reference pressure after construction of object. | |
| Matrix1d | get_height (Pressure pressure) |
| Converts the given pressure measurement to a height (distance) value. | |
Private Member Functions | |
| double | get_height_liquid (const Pressure &pressure) |
| Converts the given pressure measurement to a height based. | |
| double | get_height_gas (const Pressure &pressure) |
| Converts the given pressure measurement to a height based. | |
Private Attributes | |
| Pressure | reference_ |
| reference pressure for h=0 | |
| MediumPressureOptions | medium_options_ |
| pressure medium (gas or liquid) options to use | |
| bool | reference_is_set_ { false } |
| flag to determine if the reference_ has been set | |
| typedef Eigen::Matrix<double, 1, 1> mars::PressureConversion::Matrix1d |
|
default |
Default constructor for creating a PressureConversion object.
The medium_options_ are initialized to their default values.
|
inline |
Detailed constructor to set also the pressure reference.
| pressure | Pressure to set as reference for height = 0. |
The medium_options_ are initialized to their default values.
| mars::PressureConversion::PressureConversion | ( | Pressure | pressure, |
| MediumPressureOptions | gas_options | ||
| ) |
Detailed constructor to set the pressure reference and medium options.
| pressure | Pressure to set as reference for height = 0. |
| gas_options | MediumPressureOptions to use |
Use this constructor if your medium is different than either air (gas) or water (liquid).
| void mars::PressureConversion::set_pressure_reference | ( | Pressure | pressure | ) |
Setter function to set the reference pressure after construction of object.
| pressure | Pressure reference to set |
Here is the caller graph for this function:Converts the given pressure measurement to a height (distance) value.
| pressure | Pressure to convert to height |
Here is the caller graph for this function:
|
private |
Converts the given pressure measurement to a height based.
| pressure | Pressure of type Pressure::Type::LIQUID to convert to height. |
The measurement is converted assuming that the height is directly proportional to the pressure, .i.e,
h = \frac{P}{\rho g},
with P being the measured pressure, \rho the liquid's density, g the gravity at the surface of the liquid, and h the calculated height.
|
private |
Converts the given pressure measurement to a height based.
| pressure | Pressure of type Pressure::Type::GAS to convert to height. |
The measurement is converted assuming that the height is directly proportional to the pressure, .i.e,
h_start = ((log(P_0) - log(P_sl))*T_0 ) * (R)/(M*g),
h_now = ((log(P) - log(P_sl))*T ) * (R)/(M*g),
h = h_now-h_start,
with P being the measured pressure, P_0 the measured initial pressure (for h=0), P_sl the medium's pressure at sealevel, T the measured temperature, T_0 the measured initial temperature, R the universal gas constant, M the molar mass of the medium, g the gravity at sealevel, and h the calculated height.
|
private |
reference pressure for h=0
|
private |
pressure medium (gas or liquid) options to use
|
private |
flag to determine if the reference_ has been set