Loading...
Searching...
No Matches
supernovas::Constant Class Reference
Helpers and utilities

Various physical constants that SuperNOVAS uses for astrometric calculations, all expressed in terms of SI units. More...

`#include <supernovas.h>`

## Static Public Attributes

static constexpr double | c = NOVAS_C
| [m/s] speed of light
static constexpr double | F_earth = NOVAS_GRS80_FLATTENING
| GRS80 Earth flattening.
static constexpr double | G = 6.67428e-11
| [m3 kg-1 s-2] Gravitational constant
static constexpr double | GM_earth = NOVAS_G_EARTH
| [m3 s-2] Earth graviational constant
static constexpr double | GM_sun = NOVAS_G_SUN
| [m3 s-2] Solar graviational constant
static constexpr double | half_pi = 0.5 * pi
| [rad] π/2
static constexpr double | L_B = 1.550519768e-8
| Barycentric clock rate increment over TT.
static constexpr double | L_G = 6.969290134e-10
| Geocentric clock rate increment over TT.
static constexpr double | M_earth = GM_earth / G
| [kg] Earth mass
static constexpr double | M_sun = GM_sun / G
| [kg] Mass of the Sun
static constexpr double | pi = M_PI
| [rad] π
static constexpr double | R_earth = NOVAS_GRS80_RADIUS
| [m] 1 Earth quatorial radius (GRS80) in meters
static constexpr double | two_pi = TWOPI
| [rad] 2π

## Detailed Description

Various physical constants that SuperNOVAS uses for astrometric calculations, all expressed in terms of SI units.

You can use them also. For example, you might use Constant::c to turn a velocity (in m/s) to a unitless β:

double beta = (29.5 * Unit::km / Unit::sec) / Constant::c;
supernovas::Constant::c
static constexpr double c
[m/s] speed of light
Definition supernovas.h:227
supernovas::Unit::km
static constexpr double km
[m] 1 kilometer in meters
Definition supernovas.h:135
supernovas::Unit::sec
static constexpr double sec
[s] 1 second by another name
Definition supernovas.h:147

Note, this class cannot be instantiated or copied. You should only use its static fields.

Since
  1.6

See also
  Unit

## Member Data Documentation

## c

double supernovas::Constant::c = NOVAS_C

static constexpr

[m/s] speed of light

Referenced by supernovas::ScalarVelocity::ScalarVelocity(), supernovas::Velocity::Velocity(), supernovas::ScalarVelocity::beta(), supernovas::Interferometric::geometric_delay(), supernovas::AstrometricPosition::obs_time(), supernovas::ScalarVelocity::operator+(), supernovas::ScalarVelocity::operator-(), supernovas::CatalogEntry::radial_velocity(), and supernovas::CatalogEntry::v_lsr().

## F_earth

double supernovas::Constant::F_earth = NOVAS_GRS80_FLATTENING

static constexpr

GRS80 Earth flattening.

## G

double supernovas::Constant::G = 6.67428e-11

static constexpr

[m3 kg-1 s-2] Gravitational constant

## GM_earth

double supernovas::Constant::GM_earth = NOVAS_G_EARTH

static constexpr

[m3 s-2] Earth graviational constant

## GM_sun

double supernovas::Constant::GM_sun = NOVAS_G_SUN

static constexpr

[m3 s-2] Solar graviational constant

## half_pi

double supernovas::Constant::half_pi = 0.5 * pi

static constexpr

[rad] π/2

Referenced by supernovas::Site::Site(), supernovas::Spherical::Spherical(), supernovas::Orbital::pole(), supernovas::Orbital::pole(), supernovas::OrbitalSystem::pole(), supernovas::OrbitalSystem::pole(), and supernovas::Horizontal::zenith_angle().

## L_B

double supernovas::Constant::L_B = 1.550519768e-8

static constexpr

Barycentric clock rate increment over TT.

## L_G

double supernovas::Constant::L_G = 6.969290134e-10

static constexpr

Geocentric clock rate increment over TT.

## M_earth

double supernovas::Constant::M_earth = GM_earth / G

static constexpr

[kg] Earth mass

## M_sun

double supernovas::Constant::M_sun = GM_sun / G

static constexpr

[kg] Mass of the Sun

Referenced by supernovas::Planet::mass().

## pi

double supernovas::Constant::pi = M_PI

static constexpr

[rad] π

## R_earth

double supernovas::Constant::R_earth = NOVAS_GRS80_RADIUS

static constexpr

[m] 1 Earth quatorial radius (GRS80) in meters

## two_pi

double supernovas::Constant::two_pi = TWOPI

static constexpr

[rad] 2π

Referenced by supernovas::Orbital::apsis_rate(), supernovas::Orbital::apsis_rate(), supernovas::Angle::equals(), supernovas::Angle::fraction(), supernovas::Orbital::from_mean_motion(), supernovas::Orbital::node_rate(), supernovas::Orbital::node_rate(), and supernovas::Orbital::period().