SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
Loading...
Searching...
No Matches
supernovas::Pressure Class Reference

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>

Inheritance diagram for supernovas::Pressure:

Public Member Functions

double atm () const
 Returns the atmospheric pressure value in atmospheres.
double bar () const
 Returns the atmospheric pressure value in bars.
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.
double Pa () const
 Returns the atmospheric pressure value in pascals.
std::string to_string () const
 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::Validating
bool is_valid () const
 Returns the previously set 'valid' stae 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::Validating
 Validating ()
 dummy constructor;
Protected Attributes inherited from supernovas::Validating
bool _valid = false
 the state variable.

Detailed Description

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.

See also
Weather

Member Function Documentation

◆ atm() [1/2]

double supernovas::Pressure::atm ( ) const

Returns the atmospheric pressure value in atmospheres.

Returns
[atm] the atmospheric pressure.
See also
Pa(), hPa(), kPa(), mbar(), bar(), torr()

References atm(), and supernovas::Unit::atm.

Referenced by atm(), and atm().

◆ atm() [2/2]

Pressure supernovas::Pressure::atm ( double value)
static

Returns a new pressure object, with the specified value defined in atmopsheres.

Parameters
value[atm] atmospheric pressure value
Returns
A new pressure object with the specified value.
See also
Pa(), hPa(), kPa(), mbar(), bar(), torr()

References atm(), supernovas::Unit::atm, and supernovas::Validating::is_valid().

◆ bar() [1/2]

double supernovas::Pressure::bar ( ) const

Returns the atmospheric pressure value in bars.

Returns
[bar] the atmospheric pressure
See also
Pa(), hPa(), kPa(), mbar(), torr(), atm()

References bar(), and supernovas::Unit::bar.

Referenced by bar(), and bar().

◆ bar() [2/2]

Pressure supernovas::Pressure::bar ( double value)
static

Returns a new pressure object, with the specified value defined in bars.

Parameters
value[bar] atmospheric pressure value
Returns
A new pressure object with the specified value.
See also
Pa(), hPa(), kPa(), mbar(), torr(), atm()

References bar(), supernovas::Unit::bar, and supernovas::Validating::is_valid().

◆ hPa() [1/2]

double supernovas::Pressure::hPa ( ) const

Returns the atmospheric pressure value in hectopascals.

Returns
[hPa] the atmospheric pressure
See also
Pa(), kPa(), mbar(), bar(), torr(), atm()

References hPa().

Referenced by hPa(), and hPa().

◆ hPa() [2/2]

Pressure supernovas::Pressure::hPa ( double value)
static

Returns a new pressure object, with the specified value defined in hectopascals.

Parameters
value[hPa] atmospheric pressure value
Returns
A new pressure object with the specified value.
See also
Pa(), kPa(), mbar(), bar(), torr(), atm()

References hPa(), and supernovas::Validating::is_valid().

◆ kPa() [1/2]

double supernovas::Pressure::kPa ( ) const

Returns the atmospheric pressure value in kilopascals.

Returns
[kPa] the atmospheric pressure
See also
Pa(), hPa(), mbar(), bar(), torr(), atm()

References kPa().

Referenced by kPa(), and kPa().

◆ kPa() [2/2]

Pressure supernovas::Pressure::kPa ( double value)
static

Returns a new pressure object, with the specified value defined in kilopascals.

Parameters
value[kPa] atmospheric pressure value
Returns
A new pressure object with the specified value.
See also
Pa(), hPa(), mbar(), bar(), torr(), atm()

References supernovas::Validating::is_valid(), and kPa().

◆ mbar() [1/2]

double supernovas::Pressure::mbar ( ) const

Returns the atmospheric pressure value in millibars.

Returns
[mbar] the atmospheric pressure
See also
Pa(), hPa(), kPa(), bar(), torr(), atm()

References mbar(), and supernovas::Unit::mbar.

Referenced by supernovas::Source::horizontal_track(), mbar(), and mbar().

◆ mbar() [2/2]

Pressure supernovas::Pressure::mbar ( double value)
static

Returns a new pressure object, with the specified value defined in millibars.

Parameters
value[mbar] atmospheric pressure value
Returns
A new pressure object with the specified value.
See also
Pa(), hPa(), kPa(), bar(), torr(), atm()

References supernovas::Validating::is_valid(), mbar(), and supernovas::Unit::mbar.

◆ Pa() [1/2]

double supernovas::Pressure::Pa ( ) const

Returns the atmospheric pressure value in pascals.

Returns
[Pa] the atmospheric pressure
See also
hPa(), kPa(), mbar(), bar(), torr(), atm()

References Pa().

Referenced by Pa(), and Pa().

◆ Pa() [2/2]

Pressure supernovas::Pressure::Pa ( double value)
static

Returns a new pressure object, with the specified value defined in pascals.

Parameters
value[Pa] atmospheric pressure value
Returns
A new pressure object with the specified value.
See also
hPa(), kPa(), mbar(), bar(), torr(), atm()

References supernovas::Validating::is_valid(), and Pa().

◆ to_string()

std::string supernovas::Pressure::to_string ( ) const

Returns a human-readable string representation of this atmospheric pressure in millibars.

Returns
a new string representation of this pressure in millibars.

References supernovas::Unit::mbar, and to_string().

Referenced by to_string().

◆ torr() [1/2]

double supernovas::Pressure::torr ( ) const

Returns the atmospheric pressure value in millimeters of Hg (torr).

Returns
[torr] the atmospheric pressure (millimeters of Hg).
See also
Pressure::Pa(), Pressure::hPa(), Pressure::kPa(), Pressure::mbar(), Pressure::bar(), Pressure::atm()

References torr(), and supernovas::Unit::torr.

Referenced by torr(), and torr().

◆ torr() [2/2]

Pressure supernovas::Pressure::torr ( double value)
static

Returns a new pressure object, with the specified value defined in millimeters of Hg (torr).

Parameters
value[torr] atmospheric pressure value in millimeters of Hg.
Returns
A new pressure object with the specified value.
See also
Pa(), hPa(), kPa(), mbar(), bar(), atm()

References supernovas::Validating::is_valid(), torr(), and supernovas::Unit::torr.