Enroute Flight Navigation
A navigation app for VFR pilots
|
Convenience class for pressure computations. More...
#include <Pressure.h>
Public Member Functions | |
Q_INVOKABLE bool | isFinite () const |
Checks if the pressure is valid. | |
Q_INVOKABLE Units::Pressure & | operator+= (Units::Pressure other) |
Add pressure to this pressure. | |
Q_INVOKABLE std::partial_ordering | operator<=> (const Units::Pressure &rhs) const =default |
Comparison. | |
Q_INVOKABLE double | toHPa () const |
Convert to Hectopascal. | |
Q_INVOKABLE double | toInHg () const |
Convert to Inches of Mercury. | |
Q_INVOKABLE double | toPa () const |
Convert to Pascal. | |
Static Public Member Functions | |
static constexpr auto | fromHPa (double pressureInHPa) -> Pressure |
Constructs a pressure. | |
static constexpr auto | fromInHg (double pressureInInHg) -> Pressure |
Constructs a pressure. | |
static constexpr auto | fromPa (double pressureInPa) -> Pressure |
Constructs a pressure. | |
Convenience class for pressure computations.
This extremely simple class allows computation with pressures, without the need to worry about units. On construction, the pressure is set to NaN.
Definition at line 35 of file Pressure.h.
|
inlinestaticconstexpr |
Constructs a pressure.
pressureInHPa | pressure in hectoPascal |
Definition at line 46 of file Pressure.h.
|
inlinestaticconstexpr |
Constructs a pressure.
pressureInInHg | pressure in inches mercury |
Definition at line 59 of file Pressure.h.
|
inlinestaticconstexpr |
Constructs a pressure.
pressureInPa | pressure in Pascal |
Definition at line 72 of file Pressure.h.
|
inlinenodiscard |
Checks if the pressure is valid.
Definition at line 83 of file Pressure.h.
|
inline |
Add pressure to this pressure.
other | pressure to be added |
Definition at line 94 of file Pressure.h.
|
nodiscarddefault |
Comparison.
rhs | Right hand side of the comparison |
|
inlinenodiscard |
|
inlinenodiscard |
Convert to Inches of Mercury.
Definition at line 121 of file Pressure.h.
|
inlinenodiscard |