![]() |
SuperNOVAS C++ API v1.8
High-precision C/C++ astrometry library
|
A physical pressure value, which can be instantiated, and then expressed, in different commonly used pressure units (kPa, mbar, torr, atm, and more). More...
#include <supernovas.h>
Public Member Functions | |
| double | atm () const |
| Returns the atmospheric pressure value in atmospheres. | |
| double | bar () const |
| Returns the atmospheric pressure value in bars. | |
| bool | equals (const Pressure &p, double precision=0.1 *Unit::Pa) const |
| Checks if this pressure value is the same as another, within the specified precision. | |
| double | hPa () const |
| Returns the atmospheric pressure value in hectopascals. | |
| double | kPa () const |
| Returns the atmospheric pressure value in kilopascals. | |
| double | mbar () const |
| Returns the atmospheric pressure value in millibars. | |
| bool | operator!= (const Pressure &p) const |
| Checks if this pressure value differs from another by more than 0.1 Pa (= 1 μbar). | |
| bool | operator== (const Pressure &p) const |
| Checks if this pressure value is the same as another, within 0.1 Pa (= 1 μbar). | |
| double | Pa () const |
| Returns the atmospheric pressure value in pascals. | |
| std::string | SI_unit () const override |
| std::string | to_string (int decimals=3) const override |
| Returns a human-readable string representation of this atmospheric pressure in millibars. | |
| double | torr () const |
| Returns the atmospheric pressure value in millimeters of Hg (torr). | |
| Public Member Functions inherited from supernovas::Scalar | |
| virtual | ~Scalar () |
| bool | equals (const Scalar &other, double precision) const |
| Checks if this scalar quantity is the same as another, within the specified precision. | |
| double | SI_value () const |
| The value of this scalar quantity in S.I. | |
| Public Member Functions inherited from supernovas::Validating | |
| bool | is_valid () const |
| Returns the previously set 'valid' state of the implementing instance. | |
| operator bool () const | |
| Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid(). | |
Static Public Member Functions | |
| static Pressure | atm (double value) |
| Returns a new pressure object, with the specified value defined in atmopsheres. | |
| static Pressure | bar (double value) |
| Returns a new pressure object, with the specified value defined in bars. | |
| static Pressure | hPa (double value) |
| Returns a new pressure object, with the specified value defined in hectopascals. | |
| static Pressure | kPa (double value) |
| Returns a new pressure object, with the specified value defined in kilopascals. | |
| static Pressure | mbar (double value) |
| Returns a new pressure object, with the specified value defined in millibars. | |
| static Pressure | Pa (double value) |
| Returns a new pressure object, with the specified value defined in pascals. | |
| static Pressure | torr (double value) |
| Returns a new pressure object, with the specified value defined in millimeters of Hg (torr). | |
Additional Inherited Members | |
| Protected Member Functions inherited from supernovas::Scalar | |
| Scalar () | |
| Instantiates a standard undefined (invalid) scalar quantity with NAN value. | |
| Scalar (double SI_value) | |
| Instantiates a scalar quantity with an initializing value in standard S.I. | |
| Protected Member Functions inherited from supernovas::Validating | |
| Validating () | |
| dummy constructor; | |
| Protected Attributes inherited from supernovas::Scalar | |
| double | _value |
| The value in S.I. units. | |
| Protected Attributes inherited from supernovas::Validating | |
| bool | _valid = false |
| the state variable. | |
A physical pressure value, which can be instantiated, and then expressed, in different commonly used pressure units (kPa, mbar, torr, atm, and more).
Within SuperNOVAS it is normally used to express atmospheric pressure at an observing location, but users may utilize it in any other context also.
| double supernovas::Pressure::atm | ( | ) | const |
|
static |
Returns a new pressure object, with the specified value defined in atmopsheres.
| value | [atm] atmospheric pressure value |
References atm(), supernovas::Unit::atm, and supernovas::Validating::is_valid().
| double supernovas::Pressure::bar | ( | ) | const |
|
static |
Returns a new pressure object, with the specified value defined in bars.
| value | [bar] atmospheric pressure value |
References bar(), supernovas::Unit::bar, and supernovas::Validating::is_valid().
Checks if this pressure value is the same as another, within the specified precision.
| p | Another pressure value. |
| precision | [Pa] (optional) Precision for the comparison (default: 0.1 Pa). |
References equals(), and supernovas::Scalar::equals().
Referenced by equals(), and operator==().
| double supernovas::Pressure::hPa | ( | ) | const |
|
static |
Returns a new pressure object, with the specified value defined in hectopascals.
| value | [hPa] atmospheric pressure value |
References hPa(), and supernovas::Validating::is_valid().
| double supernovas::Pressure::kPa | ( | ) | const |
|
static |
Returns a new pressure object, with the specified value defined in kilopascals.
| value | [kPa] atmospheric pressure value |
References supernovas::Validating::is_valid(), and kPa().
| double supernovas::Pressure::mbar | ( | ) | const |
Returns the atmospheric pressure value in millibars.
References supernovas::Scalar::_value, mbar(), and supernovas::Unit::mbar.
Referenced by mbar(), mbar(), and to_string().
|
static |
Returns a new pressure object, with the specified value defined in millibars.
| value | [mbar] atmospheric pressure value |
References supernovas::Validating::is_valid(), mbar(), and supernovas::Unit::mbar.
| bool supernovas::Pressure::operator!= | ( | const Pressure & | p | ) | const |
Checks if this pressure value differs from another by more than 0.1 Pa (= 1 μbar).
| p | Another pressure value. |
References operator!=().
Referenced by operator!=().
| bool supernovas::Pressure::operator== | ( | const Pressure & | p | ) | const |
Checks if this pressure value is the same as another, within 0.1 Pa (= 1 μbar).
| p | Another pressure value. |
References equals(), and operator==().
Referenced by operator==().
| double supernovas::Pressure::Pa | ( | ) | const |
|
static |
|
overridevirtual |
|
overridevirtual |
Returns a human-readable string representation of this atmospheric pressure in millibars.
| decimals | (optional) [0:16] decimal places to print (default: 3). |
Reimplemented from supernovas::Scalar.
References mbar(), and to_string().
Referenced by to_string().
| double supernovas::Pressure::torr | ( | ) | const |
|
static |
Returns a new pressure object, with the specified value defined in millimeters of Hg (torr).
| value | [torr] atmospheric pressure value in millimeters of Hg. |
References supernovas::Validating::is_valid(), torr(), and supernovas::Unit::torr.