GNU-Darwin Web

# Physical Constants

This chapter describes macros for the values of physical constants, such as the speed of light, c, and gravitational constant, G. The values are available in different unit systems, including the standard MKS system (meters, kilograms, seconds) and the CGS system (centimeters, grams, seconds), which is commonly used in Astronomy.

The definitions of constants in the MKS system are available in the file gsl_const_mks.h'. The constants in the CGS system are defined in gsl_const_cgs.h'. Dimensionless constants, such as the fine structure constant, which are pure numbers are defined in gsl_const_num.h'.

The full list of constants is described briefly below. Consult the header files themselves for the values of the constants used in the library.

## Fundamental Constants

GSL_CONST_MKS_SPEED_OF_LIGHT
The speed of light in vacuum, c.
GSL_CONST_MKS_VACUUM_PERMEABILITY
The permeability of free space, \mu_0
GSL_CONST_MKS_VACUUM_PERMITTIVITY
The permittivity of free space, \epsilon_0.
GSL_CONST_NUM_AVOGADRO
GSL_CONST_MKS_FARADAY
The molar charge of 1 Faraday.
GSL_CONST_MKS_BOLTZMANN
The Boltzmann constant, k.
GSL_CONST_MKS_MOLAR_GAS
The molar gas constant, R_0.
GSL_CONST_MKS_STANDARD_GAS_VOLUME
The standard gas volume, V_0.
GSL_CONST_MKS_GAUSS
The magnetic field of 1 Gauss.
GSL_CONST_MKS_MICRON
The length of 1 micron.
GSL_CONST_MKS_HECTARE
The area of 1 hectare.
GSL_CONST_MKS_MILES_PER_HOUR
The speed of 1 mile per hour.
GSL_CONST_MKS_KILOMETERS_PER_HOUR
The speed of 1 kilometer per hour.

## Astronomy and Astrophysics

GSL_CONST_MKS_ASTRONOMICAL_UNIT
The length of 1 astronomical unit (mean earth-sun distance), au.
GSL_CONST_MKS_GRAVITATIONAL_CONSTANT
The gravitational constant, G.
GSL_CONST_MKS_LIGHT_YEAR
The distance of 1 light-year, ly.
GSL_CONST_MKS_PARSEC
The distance of 1 parsec, pc.
GSL_CONST_MKS_GRAV_ACCEL
The standard gravitational acceleration on Earth, g.
GSL_CONST_MKS_SOLAR_MASS
The mass of the Sun.

## Atomic and Nuclear Physics

GSL_CONST_MKS_ELECTRON_CHARGE
The charge of the electron, e.
GSL_CONST_MKS_ELECTRON_VOLT
The energy of 1 electron volt, eV.
GSL_CONST_MKS_UNIFIED_ATOMIC_MASS
The unified atomic mass, amu.
GSL_CONST_MKS_MASS_ELECTRON
The mass of the electron, m_e.
GSL_CONST_MKS_MASS_MUON
The mass of the muon, m_\mu.
GSL_CONST_MKS_MASS_PROTON
The mass of the proton, m_p.
GSL_CONST_MKS_MASS_NEUTRON
The mass of the neutron, m_n.
GSL_CONST_NUM_FINE_STRUCTURE
The electromagnetic fine structure constant \alpha.
GSL_CONST_MKS_RYDBERG
The Rydberg constant, Ry, in units of energy. This is related to the Rydberg inverse wavelength R by Ry = h c R.
GSL_CONST_MKS_BOHR_RADIUS
GSL_CONST_MKS_ANGSTROM
The length of 1 angstrom.
GSL_CONST_MKS_BARN
The area of 1 barn.
GSL_CONST_MKS_BOHR_MAGNETON
The Bohr Magneton, \mu_B.
GSL_CONST_MKS_NUCLEAR_MAGNETON
The Nuclear Magneton, \mu_N.
GSL_CONST_MKS_ELECTRON_MAGNETIC_MOMENT
The absolute value of the magnetic moment of the electron, \mu_e. The physical magnetic moment of the election is negative.
GSL_CONST_MKS_PROTON_MAGNETIC_MOMENT
The magnetic moment of the proton, \mu_p.

## Measurement of Time

GSL_CONST_MKS_MINUTE
The number of seconds in 1 minute.
GSL_CONST_MKS_HOUR
The number of seconds in 1 hour.
GSL_CONST_MKS_DAY
The number of seconds in 1 day.
GSL_CONST_MKS_WEEK
The number of seconds in 1 week.

## Imperial Units

GSL_CONST_MKS_INCH
The length of 1 inch.
GSL_CONST_MKS_FOOT
The length of 1 foot.
GSL_CONST_MKS_YARD
The length of 1 yard.
GSL_CONST_MKS_MILE
The length of 1 mile.
GSL_CONST_MKS_MIL
The length of 1 mil (1/1000th of an inch).

## Nautical Units

GSL_CONST_MKS_NAUTICAL_MILE
The length of 1 nautical mile.
GSL_CONST_MKS_FATHOM
The length of 1 fathom.
GSL_CONST_MKS_KNOT
The speed of 1 knot.

## Printers Units

GSL_CONST_MKS_POINT
The length of 1 printer's point (1/72 inch).
GSL_CONST_MKS_TEXPOINT
The length of 1 TeX point (1/72.27 inch).

## Volume

GSL_CONST_MKS_ACRE
The area of 1 acre.
GSL_CONST_MKS_LITER
The volume of 1 liter.
GSL_CONST_MKS_US_GALLON
The volume of 1 US gallon.
GSL_CONST_MKS_CANADIAN_GALLON
The volume of 1 Canadian gallon.
GSL_CONST_MKS_UK_GALLON
The volume of 1 UK gallon.
GSL_CONST_MKS_QUART
The volume of 1 quart.
GSL_CONST_MKS_PINT
The volume of 1 pint.

## Mass and Weight

GSL_CONST_MKS_POUND_MASS
The mass of 1 pound.
GSL_CONST_MKS_OUNCE_MASS
The mass of 1 ounce.
GSL_CONST_MKS_TON
The mass of 1 ton.
GSL_CONST_MKS_METRIC_TON
The mass of 1 metric ton (1000 kg).
GSL_CONST_MKS_UK_TON
The mass of 1 UK ton.
GSL_CONST_MKS_TROY_OUNCE
The mass of 1 troy ounce.
GSL_CONST_MKS_CARAT
The mass of 1 carat.
GSL_CONST_MKS_GRAM_FORCE
The force of 1 gram weight.
GSL_CONST_MKS_POUND_FORCE
The force of 1 pound weight.
GSL_CONST_MKS_KILOPOUND_FORCE
The force of 1 kilopound weight.
GSL_CONST_MKS_POUNDAL
The force of 1 poundal.

## Thermal Energy and Power

GSL_CONST_MKS_CALORIE
The energy of 1 calorie.
GSL_CONST_MKS_BTU
The energy of 1 British Thermal Unit, btu.
GSL_CONST_MKS_THERM
The energy of 1 Therm.
GSL_CONST_MKS_HORSEPOWER
The power of 1 horsepower.

## Pressure

GSL_CONST_MKS_BAR
The pressure of 1 bar.
GSL_CONST_MKS_STD_ATMOSPHERE
The pressure of 1 standard atmosphere.
GSL_CONST_MKS_TORR
The pressure of 1 torr.
GSL_CONST_MKS_METER_OF_MERCURY
The pressure of 1 meter of mercury.
GSL_CONST_MKS_INCH_OF_MERCURY
The pressure of 1 inch of mercury.
GSL_CONST_MKS_INCH_OF_WATER
The pressure of 1 inch of water.
GSL_CONST_MKS_PSI
The pressure of 1 pound per square inch.

## Viscosity

GSL_CONST_MKS_POISE
The dynamic viscosity of 1 poise.
GSL_CONST_MKS_STOKES
The kinematic viscosity of 1 stokes.

## Light and Illumination

GSL_CONST_MKS_STILB
The luminance of 1 stilb.
GSL_CONST_MKS_LUMEN
The luminous flux of 1 lumen.
GSL_CONST_MKS_LUX
The illuminance of 1 lux.
GSL_CONST_MKS_PHOT
The illuminance of 1 phot.
GSL_CONST_MKS_FOOTCANDLE
The illuminance of 1 footcandle.
GSL_CONST_MKS_LAMBERT
The luminance of 1 lambert.
GSL_CONST_MKS_FOOTLAMBERT
The luminance of 1 footlambert.

GSL_CONST_MKS_CURIE
The activity of 1 curie.
GSL_CONST_MKS_ROENTGEN
The exposure of 1 roentgen.
GSL_CONST_MKS_RAD
The absorbed dose of 1 rad.

## Force and Energy

GSL_CONST_MKS_NEWTON
The SI unit of force, 1 Newton.
GSL_CONST_MKS_DYNE
The force of 1 Dyne = 10^-5 Newton.
GSL_CONST_MKS_JOULE
The SI unit of energy, 1 Joule.
GSL_CONST_MKS_ERG
The energy 1 erg = 10^-7 Joule.

## Prefixes

These constants are dimensionless scaling factors.

GSL_CONST_NUM_YOTTA
10^24
GSL_CONST_NUM_ZETTA
10^21
GSL_CONST_NUM_EXA
10^18
GSL_CONST_NUM_PETA
10^15
GSL_CONST_NUM_TERA
10^12
GSL_CONST_NUM_GIGA
10^9
GSL_CONST_NUM_MEGA
10^6
GSL_CONST_NUM_KILO
10^3
GSL_CONST_NUM_MILLI
10^-3
GSL_CONST_NUM_MICRO
10^-6
GSL_CONST_NUM_NANO
10^-9
GSL_CONST_NUM_PICO
10^-12
GSL_CONST_NUM_FEMTO
10^-15
GSL_CONST_NUM_ATTO
10^-18
GSL_CONST_NUM_ZEPTO
10^-21
GSL_CONST_NUM_YOCTO
10^-24

## Examples

The following program demonstrates the use of the physical constants in a calculation. In this case, the goal is to calculate the range of light-travel times from Earth to Mars.

The required data is the average distance of each planet from the Sun in astronomical units (the eccentricities of the orbits will be neglected for the purposes of this calculation). The average radius of the orbit of Mars is 1.52 astronomical units, and for the orbit of Earth it is 1 astronomical unit (by definition). These values are combined with the MKS values of the constants for the speed of light and the length of an astronomical unit to produce a result for the shortest and longest light-travel times in seconds. The figures are converted into minutes before being displayed.

#include <stdio.h>
#include <gsl/gsl_const_mks.h>

int
main (void)
{
double c  = GSL_CONST_MKS_SPEED_OF_LIGHT;
double au = GSL_CONST_MKS_ASTRONOMICAL_UNIT;
double minutes = GSL_CONST_MKS_MINUTE;

/* distance stored in meters */
double r_earth = 1.00 * au;
double r_mars  = 1.52 * au;

double t_min, t_max;

t_min = (r_mars - r_earth) / c;
t_max = (r_mars + r_earth) / c;

printf("light travel time from Earth to Mars:\n");
printf("minimum = %.1f minutes\n", t_min / minutes);
printf("maximum = %.1f minutes\n", t_max / minutes);

return 0;
}


Here is the output from the program,

light travel time from Earth to Mars:
minimum = 4.3 minutes
maximum = 21.0 minutes
`