Utility library
#include "crow/constants.hpp"
namespace Crow;
All of the constants defined here follow the conventions of the standard
<numbers>
header. Each constant is defined in two forms:
constexpr double name = [value as double];
template <std::floating_point T> constexpr T name_v = [value as T];
For the physical and astronomical constants, long and short versions of the
constant names are provided. The short symbol-named constants (but not the
full-named equivalents) are in the Constants
sub-namespace to avoid name
collisions.
The values quoted here are approximate; the values actually supplied are accurate to the precision of the type or to the best known precision, whichever is appropriate.
Constant | Value |
---|---|
arcsec |
4.84814×10-6 rad |
arcmin |
2.90888×10-4 rad |
degree |
0.0174533 rad |
inch |
0.0254 m |
foot |
0.3048 m |
yard |
0.9144 m |
mile |
1609.344 m |
nautical_mile |
1852 m |
ounce |
0.0283495 kg |
pound |
0.453592 kg |
short_ton |
907.185 kg |
long_ton |
1016.05 kg |
pound_force |
4.44822 N |
erg |
10-7 J |
foot_pound |
1.35582 J |
calorie |
4.184 J |
kilocalorie |
4184 J |
ton_tnt |
4.184×109 J |
horsepower |
745.700 W |
mmHg |
133.322 Pa |
atmosphere |
101325 Pa |
zero_celsius |
273.15 K |
Sources:
Values related to quantity of substance are given in kilomoles to avoid intrusive factors of 1000 in expressions.
Constant | Symbol | Value |
---|---|---|
alpha_particle_mass |
m_alpha |
6.64466×10-27 kg |
atomic_mass_constant |
m_u |
1.66054×10-27 kg |
avogadro_constant |
N_A |
6.02214×1026 kmol-1 |
boltzmann_constant |
k |
1.38065×10-23 J/K |
electron_mass |
m_e |
9.10938×10-31 kg |
elementary_charge |
ec |
1.60218×10-19 C |
fine_structure_constant |
alpha |
7.29735×10-3 dimensionless |
first_radiation_constant |
c_1 |
3.74177×10-16 W m2 |
gravitational_constant |
G |
6.67428×10-11 m3 kg-1 s-2 |
josephson_constant |
K_J |
4.83598×1014 Hz V-1 |
molar_gas_constant |
R |
8314.46 J kmol-1 K-1 |
neutron_mass |
m_n |
1.67493×10-27 kg |
planck_constant |
h |
6.62607×10-34 J s |
proton_mass |
m_p |
1.67262×10-27 kg |
rydberg_constant |
R_inf |
1.09737×107 m-1 |
second_radiation_constant |
c_2 |
0.0143878×10-2 m K |
speed_of_light |
c |
2.99792×108 m/s |
stefan_boltzmann_constant |
sigma |
5.67037×10-8 W m-2 K-4 |
vacuum_impedance |
Z_0 |
376.730 Ω |
vacuum_permeability |
mu_0 |
1.25664×10-6 N A-2 |
vacuum_permittivity |
epsilon_0 |
8.85419×10-12 F m-1 |
von_klitzing_constant |
R_K |
25812.8 Ω |
wien_constant |
b_W |
2.89777×10-3 m K |
Sources:
Constant | Symbol | Value |
---|---|---|
astronomical_unit |
au |
1.49598×1011 m |
light_year |
ly |
9.46073×1015 m |
parsec |
pc |
3.08568×1016 m |
earth_mass |
M_earth |
5.97219×1024 kg |
earth_radius |
R_earth |
6.37814×106 m |
standard_gravity |
g_0 |
9.80665 m s-2 |
julian_day |
jd |
86400 s |
sidereal_day |
d_sid |
86164.1 s |
tropical_year |
y_trop |
3.15569×107 s |
julian_year |
jy |
3.15576×107 s |
sidereal_year |
y_sid |
3.15581×107 s |
lunar_mass |
M_moon |
7.34581×1022 kg |
lunar_radius |
R_moon |
1.7381×106 m |
lunar_distance |
a_moon |
3.84399×108 m |
sidereal_month |
sid_mon |
2.36059×106 s |
synodic_month |
syn_mon |
2.55144×106 s |
jupiter_mass |
M_jup |
1.89852×1027 kg |
jupiter_radius |
R_jup |
7.1492×107 m |
solar_mass |
M_sun |
1.98842×1030 kg |
solar_radius |
R_sun |
6.957×108 m |
solar_temperature |
T_sun |
5772 K |
solar_luminosity |
L_sun |
3.828×1026 W |
solar_visual_magnitude |
Mv_sun |
4.81 mag |
solar_bolometric_magnitude |
Mbol_sun |
4.74 mag |
solar_bolometric_correction |
BC_sun |
-0.07 mag |
bolometric_luminosity_constant |
L_0 |
3.0128×1028 W |
age_of_universe |
t_0 |
4.3508×1017 s |