line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Constants::CGS; |
2
|
|
|
|
|
|
|
# ABSTRACT: This library provides physical constants for use in Physics and Astronomy based on values from 2018 CODATA. |
3
|
|
|
|
|
|
|
$Astro::Constants::CGS::VERSION = '0.1401'; |
4
|
1
|
|
|
1
|
|
66791
|
use 5.006; |
|
1
|
|
|
|
|
12
|
|
5
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
7
|
1
|
|
|
1
|
|
6
|
use base qw/Exporter/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
96
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
warn "use of Astro::Constants::CGS is deprecated and will be removed from the package in version 0.15"; |
10
|
|
|
|
|
|
|
warn "write new code to use Astro::Constants::MKS instead"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
7
|
use constant LIGHT_SPEED => 2.99792458e10; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
97
|
|
15
|
1
|
|
|
1
|
|
15
|
use constant SPEED_LIGHT => 2.99792458e10; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
74
|
|
16
|
|
|
|
|
|
|
*A_c = \2.99792458e10; |
17
|
1
|
|
|
1
|
|
7
|
use constant BOLTZMANN => 1.380649e-16; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
78
|
|
18
|
|
|
|
|
|
|
*A_k = \1.380649e-16; |
19
|
1
|
|
|
1
|
|
6
|
use constant GRAVITATIONAL => 6.67430e-8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
20
|
|
|
|
|
|
|
*A_G = \6.67430e-8; |
21
|
1
|
|
|
1
|
|
5
|
use constant ELECTRON_VOLT => 1.602176634e-12; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
80
|
|
22
|
|
|
|
|
|
|
*A_eV = \1.602176634e-12; |
23
|
1
|
|
|
1
|
|
36
|
use constant PLANCK => 6.62607015e-27; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
99
|
|
24
|
|
|
|
|
|
|
*A_h = \6.62607015e-27; |
25
|
1
|
|
|
1
|
|
7
|
use constant HBAR => 1.054571817e-27; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
26
|
1
|
|
|
1
|
|
6
|
use constant H_BAR => 1.054571817e-27; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
72
|
|
27
|
|
|
|
|
|
|
*A_hbar = \1.054571817e-27; |
28
|
1
|
|
|
1
|
|
7
|
use constant ELECTRON_CHARGE => 4.8032046729e-10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
29
|
1
|
|
|
1
|
|
6
|
use constant CHARGE_ELEMENTARY => 4.8032046729e-10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
30
|
|
|
|
|
|
|
*A_e = \4.8032046729e-10; |
31
|
1
|
|
|
1
|
|
5
|
use constant STEFAN_BOLTZMANN => 5.670367e-5; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
68
|
|
32
|
|
|
|
|
|
|
*A_sigma = \5.670367e-5; |
33
|
1
|
|
|
1
|
|
6
|
use constant A_RAD => 7.565723e-15; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
34
|
1
|
|
|
1
|
|
7
|
use constant DENSITY_RADIATION => 7.565723e-15; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
35
|
|
|
|
|
|
|
*A_arad = \7.565723e-15; |
36
|
1
|
|
|
1
|
|
5
|
use constant WIEN => 2.897771955e-1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
37
|
|
|
|
|
|
|
*A_Wien = \2.897771955e-1; |
38
|
1
|
|
|
1
|
|
6
|
use constant ALPHA => 7.2973525693e-3; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
39
|
|
|
|
|
|
|
*A_alpha = \7.2973525693e-3; |
40
|
1
|
|
|
1
|
|
7
|
use constant VACUUM_IMPEDANCE => 376.730313461; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
55
|
|
41
|
1
|
|
|
1
|
|
6
|
use constant IMPEDANCE_VACUUM => 376.730313461; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
42
|
|
|
|
|
|
|
*A_Z0 = \376.730313461; |
43
|
1
|
|
|
1
|
|
7
|
use constant PERMITIVITY_0 => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
44
|
1
|
|
|
1
|
|
6
|
use constant PERMITIV_FREE_SPACE => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
76
|
|
45
|
|
|
|
|
|
|
*A_eps0 = \1; |
46
|
1
|
|
|
1
|
|
6
|
use constant PERMEABILITY_0 => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
47
|
1
|
|
|
1
|
|
5
|
use constant CONSTANT_MAGNETIC => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
48
|
1
|
|
|
1
|
|
6
|
use constant PERMEABL_FREE_SPACE => 1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
49
|
|
|
|
|
|
|
*A_mu0 = \1; |
50
|
1
|
|
|
1
|
|
6
|
use constant PI => 3.14159265358979324; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
51
|
|
|
|
|
|
|
*A_pi = \3.14159265358979324; |
52
|
1
|
|
|
1
|
|
13
|
use constant FOURPI => 12.5663706143592; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
54
|
|
53
|
1
|
|
|
1
|
|
6
|
use constant FOUR_PI => 12.5663706143592; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
54
|
|
|
|
|
|
|
*A_4pi = \12.5663706143592; |
55
|
1
|
|
|
1
|
|
5
|
use constant STERADIAN => 3282.80635001174; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
61
|
|
56
|
|
|
|
|
|
|
*A_ster = \3282.80635001174; |
57
|
1
|
|
|
1
|
|
6
|
use constant EXP => 2.71828182846; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
58
|
|
|
|
|
|
|
*A_exp = \2.71828182846; |
59
|
1
|
|
|
1
|
|
6
|
use constant ATOMIC_MASS_UNIT => 1.66053906660e-24; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
60
|
|
|
|
|
|
|
*A_amu = \1.66053906660e-24; |
61
|
1
|
|
|
1
|
|
5
|
use constant PARSEC => 3.08567758149e18; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
62
|
|
|
|
|
|
|
*A_pc = \3.08567758149e18; |
63
|
1
|
|
|
1
|
|
7
|
use constant ASTRONOMICAL_UNIT => 1.496e13; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
64
|
|
|
|
|
|
|
*A_AU = \1.496e13; |
65
|
1
|
|
|
1
|
|
6
|
use constant LIGHT_YEAR => 9.4607304725808e17; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
66
|
|
|
|
|
|
|
*A_ly = \9.4607304725808e17; |
67
|
1
|
|
|
1
|
|
6
|
use constant ANGSTROM => 1e-8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
68
|
|
|
|
|
|
|
*A_AA = \1e-8; |
69
|
1
|
|
|
1
|
|
7
|
use constant JANSKY => 1e-23; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
66
|
|
70
|
|
|
|
|
|
|
*A_Jy = \1e-23; |
71
|
1
|
|
|
1
|
|
7
|
use constant AVOGADRO => 6.02214076e23; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
72
|
|
|
|
|
|
|
*A_NA = \6.02214076e23; |
73
|
1
|
|
|
1
|
|
7
|
use constant YEAR_JULIAN => 31_557_600; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
68
|
|
74
|
1
|
|
|
1
|
|
6
|
use constant YEAR => 31_557_600; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
75
|
|
|
|
|
|
|
*A_yr = \31_557_600; |
76
|
1
|
|
|
1
|
|
7
|
use constant YEAR_TROPICAL => 31_556_925.1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
77
|
1
|
|
|
1
|
|
5
|
use constant YEAR_SIDEREAL => 31_558_149.8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
78
|
1
|
|
|
1
|
|
6
|
use constant YEAR_ANOMALISTIC => 31_558_432.6; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
79
|
1
|
|
|
1
|
|
6
|
use constant YEAR_ECLIPSE => 29_947_974.3; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
80
|
1
|
|
|
1
|
|
6
|
use constant SOLAR_MASS => 1.9884e33; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
81
|
1
|
|
|
1
|
|
6
|
use constant MASS_SOLAR => 1.9884e33; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
82
|
|
|
|
|
|
|
*A_msun = \1.9884e33; |
83
|
1
|
|
|
1
|
|
6
|
use constant SOLAR_LUMINOSITY => 3.828e33; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
61
|
|
84
|
1
|
|
|
1
|
|
6
|
use constant LUMINOSITY_SOLAR => 3.828e33; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
85
|
|
|
|
|
|
|
*A_Lsun = \3.828e33; |
86
|
1
|
|
|
1
|
|
7
|
use constant RHO_C => 1.87834e-29; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
87
|
1
|
|
|
1
|
|
5
|
use constant DENSITY_CRITICAL_RHOc => 1.87834e-29; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
73
|
|
88
|
|
|
|
|
|
|
*A_rhoc = \1.87834e-29; |
89
|
1
|
|
|
1
|
|
6
|
use constant HUBBLE_TIME => 3.0853056e17; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
84
|
|
90
|
|
|
|
|
|
|
*A_tH = \3.0853056e17; |
91
|
1
|
|
|
1
|
|
7
|
use constant CMB_TEMPERATURE => 2.72548; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
46
|
|
92
|
1
|
|
|
1
|
|
6
|
use constant TEMPERATURE_CMB => 2.72548; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
93
|
|
|
|
|
|
|
*A_TCMB = \2.72548; |
94
|
1
|
|
|
1
|
|
6
|
use constant SOLAR_V_MAG => -26.74; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
95
|
1
|
|
|
1
|
|
5
|
use constant MAGNITUDE_SOLAR_V => -26.74; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
96
|
|
|
|
|
|
|
*A_Vsun = \-26.74; |
97
|
1
|
|
|
1
|
|
6
|
use constant SOLAR_V_ABS_MAG => 4.83; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
98
|
1
|
|
|
1
|
|
6
|
use constant MAGNITUDE_SOLAR_V_ABSOLUTE => 4.83; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
62
|
|
99
|
|
|
|
|
|
|
*A_MVsun = \4.83; |
100
|
1
|
|
|
1
|
|
6
|
use constant SOLAR_RADIUS => 6.96e10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
101
|
1
|
|
|
1
|
|
7
|
use constant RADIUS_SOLAR => 6.96e10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
102
|
|
|
|
|
|
|
*A_rsun = \6.96e10; |
103
|
1
|
|
|
1
|
|
5
|
use constant EARTH_MASS => 5.9722e27; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
45
|
|
104
|
1
|
|
|
1
|
|
7
|
use constant MASS_EARTH => 5.9722e27; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
59
|
|
105
|
|
|
|
|
|
|
*A_mearth = \5.9722e27; |
106
|
1
|
|
|
1
|
|
6
|
use constant EARTH_RADIUS => 6.378_136_6e8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
107
|
1
|
|
|
1
|
|
6
|
use constant RADIUS_EARTH => 6.378_136_6e8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
51
|
|
108
|
|
|
|
|
|
|
*A_rearth = \6.378_136_6e8; |
109
|
1
|
|
|
1
|
|
5
|
use constant SOLAR_TEMPERATURE => 5772; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
110
|
1
|
|
|
1
|
|
6
|
use constant TEMPERATURE_SOLAR_SURFACE => 5772; |
|
1
|
|
|
|
|
35
|
|
|
1
|
|
|
|
|
76
|
|
111
|
|
|
|
|
|
|
*A_Tsun = \5772; |
112
|
1
|
|
|
1
|
|
7
|
use constant SOLAR_DENSITY => 1.408; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
113
|
1
|
|
|
1
|
|
6
|
use constant DENSITY_SOLAR => 1.408; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
62
|
|
114
|
|
|
|
|
|
|
*A_dsun = \1.408; |
115
|
1
|
|
|
1
|
|
7
|
use constant EARTH_DENSITY => 5.515; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
116
|
1
|
|
|
1
|
|
5
|
use constant DENSITY_EARTH => 5.515; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
104
|
|
117
|
|
|
|
|
|
|
*A_dearth = \5.515; |
118
|
1
|
|
|
1
|
|
8
|
use constant SOLAR_GRAVITY => 27478; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
54
|
|
119
|
1
|
|
|
1
|
|
6
|
use constant GRAVITY_SOLAR => 27478; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
120
|
|
|
|
|
|
|
*A_gsun = \27478; |
121
|
1
|
|
|
1
|
|
6
|
use constant EARTH_GRAVITY => 980.665; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
122
|
1
|
|
|
1
|
|
6
|
use constant GRAVITY_EARTH => 980.665; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
123
|
|
|
|
|
|
|
*A_gearth = \980.665; |
124
|
1
|
|
|
1
|
|
5
|
use constant LUNAR_RADIUS => 1.7381e8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
50
|
|
125
|
1
|
|
|
1
|
|
7
|
use constant RADIUS_LUNAR => 1.7381e8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
126
|
|
|
|
|
|
|
*A_rmoon = \1.7381e8; |
127
|
1
|
|
|
1
|
|
7
|
use constant LUNAR_MASS => 7.346e25; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
128
|
1
|
|
|
1
|
|
5
|
use constant MASS_LUNAR => 7.346e25; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
129
|
|
|
|
|
|
|
*A_mmoon = \7.346e25; |
130
|
1
|
|
|
1
|
|
6
|
use constant LUNAR_SM_AXIS => 3.84402e10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
131
|
1
|
|
|
1
|
|
6
|
use constant AXIS_SM_LUNAR => 3.84402e10; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
68
|
|
132
|
|
|
|
|
|
|
*A_amoon = \3.84402e10; |
133
|
1
|
|
|
1
|
|
6
|
use constant LUNAR_ECCENTRICITY => 0.0549; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
134
|
1
|
|
|
1
|
|
7
|
use constant ECCENTRICITY_LUNAR => 0.0549; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
135
|
|
|
|
|
|
|
*A_emoon = \0.0549; |
136
|
1
|
|
|
1
|
|
7
|
use constant THOMSON_XSECTION => 6.6524587321e-25; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
137
|
1
|
|
|
1
|
|
6
|
use constant THOMSON_CROSS_SECTION => 6.6524587321e-25; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
138
|
|
|
|
|
|
|
*A_sigmaT = \6.6524587321e-25; |
139
|
1
|
|
|
1
|
|
7
|
use constant ELECTRON_MASS => 9.1093837015e-28; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
140
|
1
|
|
|
1
|
|
7
|
use constant MASS_ELECTRON => 9.1093837015e-28; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
141
|
|
|
|
|
|
|
*A_me = \9.1093837015e-28; |
142
|
1
|
|
|
1
|
|
5
|
use constant PROTON_MASS => 1.67262192369e-24; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
143
|
1
|
|
|
1
|
|
6
|
use constant MASS_PROTON => 1.67262192369e-24; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
61
|
|
144
|
|
|
|
|
|
|
*A_mp = \1.67262192369e-24; |
145
|
1
|
|
|
1
|
|
6
|
use constant NEUTRON_MASS => 1.67492749804e-24; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
146
|
1
|
|
|
1
|
|
7
|
use constant MASS_NEUTRON => 1.67492749804e-24; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
63
|
|
147
|
|
|
|
|
|
|
*A_mn = \1.67492749804e-24; |
148
|
1
|
|
|
1
|
|
7
|
use constant HYDROGEN_MASS => 1.6738e-27; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
149
|
1
|
|
|
1
|
|
6
|
use constant MASS_HYDROGEN => 1.6738e-27; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
150
|
|
|
|
|
|
|
*A_mH = \1.6738e-27; |
151
|
1
|
|
|
1
|
|
6
|
use constant MASS_ALPHA => 6.6446573357e-27; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
152
|
|
|
|
|
|
|
*A_ma = \6.6446573357e-27; |
153
|
1
|
|
|
1
|
|
7
|
use constant ELECTRON_RADIUS => 2.8179403262e-13; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
154
|
1
|
|
|
1
|
|
5
|
use constant RADIUS_ELECTRON => 2.8179403262e-13; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
155
|
|
|
|
|
|
|
*A_re = \2.8179403262e-13; |
156
|
1
|
|
|
1
|
|
6
|
use constant BOHR_RADIUS => 5.29177210903e-9; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
157
|
1
|
|
|
1
|
|
7
|
use constant RADIUS_BOHR => 5.29177210903e-9; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
875
|
|
158
|
|
|
|
|
|
|
*A_a0 = \5.29177210903e-9; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
my %_precision = ( |
161
|
|
|
|
|
|
|
ALPHA => {value => 1.5e-10, type => 'relative'}, |
162
|
|
|
|
|
|
|
ANGSTROM => {value => 0, type => 'relative'}, |
163
|
|
|
|
|
|
|
ASTRONOMICAL_UNIT => {value => 0, type => 'relative'}, |
164
|
|
|
|
|
|
|
ATOMIC_MASS_UNIT => {value => 3.0e-10, type => 'relative'}, |
165
|
|
|
|
|
|
|
AVOGADRO => {value => 0, type => 'relative'}, |
166
|
|
|
|
|
|
|
AXIS_SM_LUNAR => {value => 3e-9, type => 'relative'}, |
167
|
|
|
|
|
|
|
BOLTZMANN => {value => 0, type => 'relative'}, |
168
|
|
|
|
|
|
|
CHARGE_ELEMENTARY => {value => 0, type => 'relative'}, |
169
|
|
|
|
|
|
|
DENSITY_CRITICAL_RHOc => {value => 2.3e-5, type => 'relative'}, |
170
|
|
|
|
|
|
|
DENSITY_EARTH => {value => 0.0002, type => 'relative'}, |
171
|
|
|
|
|
|
|
DENSITY_RADIATION => {value => 2.3e-6, type => 'relative'}, |
172
|
|
|
|
|
|
|
DENSITY_SOLAR => {value => 0.001, type => 'relative'}, |
173
|
|
|
|
|
|
|
ECCENTRICITY_LUNAR => {value => 0.002, type => 'relative'}, |
174
|
|
|
|
|
|
|
ELECTRON_VOLT => {value => 0, type => 'relative'}, |
175
|
|
|
|
|
|
|
EXP => {value => 0.00000000001, type => 'relative'}, |
176
|
|
|
|
|
|
|
FOUR_PI => {value => 0.0000000000001, type => 'relative'}, |
177
|
|
|
|
|
|
|
GRAVITATIONAL => {value => 2.2e-5, type => 'relative'}, |
178
|
|
|
|
|
|
|
GRAVITY_EARTH => {value => 0.000001, type => 'relative'}, |
179
|
|
|
|
|
|
|
GRAVITY_SOLAR => {value => 0.0004, type => 'relative'}, |
180
|
|
|
|
|
|
|
HUBBLE_TIME => {value => 0.0000001, type => 'relative'}, |
181
|
|
|
|
|
|
|
H_BAR => {value => 1.5e-9, type => 'relative'}, |
182
|
|
|
|
|
|
|
IMPEDANCE_VACUUM => {value => 1e-50, type => 'relative'}, |
183
|
|
|
|
|
|
|
JANSKY => {value => 0, type => 'relative'}, |
184
|
|
|
|
|
|
|
LIGHT_YEAR => {value => 0, type => 'relative'}, |
185
|
|
|
|
|
|
|
LUMINOSITY_SOLAR => {value => 0.0003, type => 'relative'}, |
186
|
|
|
|
|
|
|
MAGNITUDE_SOLAR_V => {value => 0.0004, type => 'relative'}, |
187
|
|
|
|
|
|
|
MAGNITUDE_SOLAR_V_ABSOLUTE => {value => 0.002, type => 'relative'}, |
188
|
|
|
|
|
|
|
MASS_ALPHA => {value => 3.0e-10, type => 'relative'}, |
189
|
|
|
|
|
|
|
MASS_EARTH => {value => 6e20, type => 'absolute'}, |
190
|
|
|
|
|
|
|
MASS_ELECTRON => {value => 3e-10, type => 'relative'}, |
191
|
|
|
|
|
|
|
MASS_HYDROGEN => {value => 3.3e-31, type => 'absolute'}, |
192
|
|
|
|
|
|
|
MASS_JUPITER => {value => 5e-6, type => 'relative'}, |
193
|
|
|
|
|
|
|
MASS_LUNAR => {value => 0.0002, type => 'relative'}, |
194
|
|
|
|
|
|
|
MASS_NEUTRON => {value => 5.7e-10, type => 'relative'}, |
195
|
|
|
|
|
|
|
MASS_PROTON => {value => 3.1e-10, type => 'relative'}, |
196
|
|
|
|
|
|
|
MASS_SOLAR => {value => 0.0001, type => 'relative'}, |
197
|
|
|
|
|
|
|
PARSEC => {value => 1e-11, type => 'relative'}, |
198
|
|
|
|
|
|
|
PERMEABL_FREE_SPACE => {value => 1.5e-10, type => 'relative'}, |
199
|
|
|
|
|
|
|
PERMITIV_FREE_SPACE => {value => 1.5e-10, type => 'relative'}, |
200
|
|
|
|
|
|
|
PI => {value => 0.00000000000000001, type => 'relative'}, |
201
|
|
|
|
|
|
|
PLANCK => {value => 0, type => 'relative'}, |
202
|
|
|
|
|
|
|
RADIUS_BOHR => {value => 1.5e-10, type => 'relative'}, |
203
|
|
|
|
|
|
|
RADIUS_EARTH => {value => 0.1, type => 'absolute'}, |
204
|
|
|
|
|
|
|
RADIUS_ELECTRON => {value => 4.5e-10, type => 'relative'}, |
205
|
|
|
|
|
|
|
RADIUS_JUPITER => {value => 1.5e-5, type => 'relative'}, |
206
|
|
|
|
|
|
|
RADIUS_LUNAR => {value => 6e-5, type => 'relative'}, |
207
|
|
|
|
|
|
|
RADIUS_SOLAR => {value => 0.002, type => 'relative'}, |
208
|
|
|
|
|
|
|
SPEED_LIGHT => {value => 0, type => 'relative'}, |
209
|
|
|
|
|
|
|
STEFAN_BOLTZMANN => {value => 1.7e-10, type => 'relative'}, |
210
|
|
|
|
|
|
|
STERADIAN => {value => 0.00000000000001, type => 'relative'}, |
211
|
|
|
|
|
|
|
TEMPERATURE_CMB => {value => 0.00057, type => 'absolute'}, |
212
|
|
|
|
|
|
|
TEMPERATURE_SOLAR_SURFACE => {value => 0.0002, type => 'relative'}, |
213
|
|
|
|
|
|
|
THOMSON_CROSS_SECTION => {value => 9.1e-10, type => 'relative'}, |
214
|
|
|
|
|
|
|
WIEN => {value => 1e-10, type => 'relative'}, |
215
|
|
|
|
|
|
|
YEAR => {value => 0, type => 'relative'}, |
216
|
|
|
|
|
|
|
YEAR_ANOMALISTIC => {value => 0.1, type => 'absolute'}, |
217
|
|
|
|
|
|
|
YEAR_ECLIPSE => {value => 0.1, type => 'absolute'}, |
218
|
|
|
|
|
|
|
YEAR_SIDEREAL => {value => 1, type => 'absolute'}, |
219
|
|
|
|
|
|
|
YEAR_TROPICAL => {value => 0.1, type => 'absolute'}, |
220
|
|
|
|
|
|
|
); |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
# some helper functions |
223
|
|
|
|
|
|
|
sub pretty { |
224
|
0
|
0
|
|
0
|
0
|
|
if (@_ > 1) { |
225
|
0
|
|
|
|
|
|
return map { sprintf("%1.3e", $_) } @_; |
|
0
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
} |
227
|
0
|
|
|
|
|
|
return sprintf("%1.3e", shift); |
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub precision { |
231
|
0
|
|
|
0
|
0
|
|
my ($name, $type) = @_; |
232
|
|
|
|
|
|
|
warn "precision() requires a string, not the constant value" |
233
|
0
|
0
|
|
|
|
|
unless exists $_precision{$name}; |
234
|
|
|
|
|
|
|
|
235
|
0
|
|
|
|
|
|
return $_precision{$name}->{value}; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
239
|
|
|
|
|
|
|
LIGHT_SPEED SPEED_LIGHT BOLTZMANN GRAVITATIONAL ELECTRON_VOLT PLANCK HBAR H_BAR ELECTRON_CHARGE CHARGE_ELEMENTARY STEFAN_BOLTZMANN A_RAD DENSITY_RADIATION WIEN ALPHA VACUUM_IMPEDANCE IMPEDANCE_VACUUM PERMITIVITY_0 PERMITIV_FREE_SPACE PERMEABILITY_0 CONSTANT_MAGNETIC PERMEABL_FREE_SPACE PI FOURPI FOUR_PI STERADIAN EXP ATOMIC_MASS_UNIT PARSEC ASTRONOMICAL_UNIT LIGHT_YEAR ANGSTROM JANSKY AVOGADRO YEAR_JULIAN YEAR YEAR_TROPICAL YEAR_SIDEREAL YEAR_ANOMALISTIC YEAR_ECLIPSE SOLAR_MASS MASS_SOLAR SOLAR_LUMINOSITY LUMINOSITY_SOLAR RHO_C DENSITY_CRITICAL_RHOc HUBBLE_TIME CMB_TEMPERATURE TEMPERATURE_CMB SOLAR_V_MAG MAGNITUDE_SOLAR_V SOLAR_V_ABS_MAG MAGNITUDE_SOLAR_V_ABSOLUTE SOLAR_RADIUS RADIUS_SOLAR EARTH_MASS MASS_EARTH EARTH_RADIUS RADIUS_EARTH SOLAR_TEMPERATURE TEMPERATURE_SOLAR_SURFACE SOLAR_DENSITY DENSITY_SOLAR EARTH_DENSITY DENSITY_EARTH SOLAR_GRAVITY GRAVITY_SOLAR EARTH_GRAVITY GRAVITY_EARTH LUNAR_RADIUS RADIUS_LUNAR LUNAR_MASS MASS_LUNAR LUNAR_SM_AXIS AXIS_SM_LUNAR LUNAR_ECCENTRICITY ECCENTRICITY_LUNAR THOMSON_XSECTION THOMSON_CROSS_SECTION ELECTRON_MASS MASS_ELECTRON PROTON_MASS MASS_PROTON NEUTRON_MASS MASS_NEUTRON HYDROGEN_MASS MASS_HYDROGEN MASS_ALPHA ELECTRON_RADIUS RADIUS_ELECTRON BOHR_RADIUS RADIUS_BOHR RADIUS_JUPITER MASS_JUPITER |
240
|
|
|
|
|
|
|
$A_c $A_k $A_G $A_eV $A_h $A_hbar $A_e $A_sigma $A_arad $A_Wien $A_alpha $A_Z0 $A_eps0 $A_mu0 $A_pi $A_4pi $A_ster $A_exp $A_amu $A_pc $A_AU $A_ly $A_AA $A_Jy $A_NA $A_yr $A_msun $A_Lsun $A_rhoc $A_tH $A_TCMB $A_Vsun $A_MVsun $A_rsun $A_mearth $A_rearth $A_Tsun $A_dsun $A_dearth $A_gsun $A_gearth $A_rmoon $A_mmoon $A_amoon $A_emoon $A_sigmaT $A_me $A_mp $A_mn $A_mH $A_ma $A_re $A_a0 $A_rjup $A_mjup |
241
|
|
|
|
|
|
|
LIGHT_SPEED HBAR ELECTRON_CHARGE A_RAD VACUUM_IMPEDANCE PERMITIVITY_0 PERMEABILITY_0 CONSTANT_MAGNETIC FOURPI YEAR_JULIAN SOLAR_MASS SOLAR_LUMINOSITY RHO_C CMB_TEMPERATURE SOLAR_V_MAG SOLAR_V_ABS_MAG SOLAR_RADIUS EARTH_MASS EARTH_RADIUS SOLAR_TEMPERATURE SOLAR_DENSITY EARTH_DENSITY SOLAR_GRAVITY EARTH_GRAVITY LUNAR_RADIUS LUNAR_MASS LUNAR_SM_AXIS LUNAR_ECCENTRICITY THOMSON_XSECTION ELECTRON_MASS PROTON_MASS NEUTRON_MASS HYDROGEN_MASS ELECTRON_RADIUS BOHR_RADIUS |
242
|
|
|
|
|
|
|
pretty precision |
243
|
|
|
|
|
|
|
); |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
246
|
|
|
|
|
|
|
alternates => [qw/ LIGHT_SPEED HBAR ELECTRON_CHARGE A_RAD VACUUM_IMPEDANCE PERMITIVITY_0 PERMEABILITY_0 CONSTANT_MAGNETIC FOURPI YEAR_JULIAN SOLAR_MASS SOLAR_LUMINOSITY RHO_C CMB_TEMPERATURE SOLAR_V_MAG SOLAR_V_ABS_MAG SOLAR_RADIUS EARTH_MASS EARTH_RADIUS SOLAR_TEMPERATURE SOLAR_DENSITY EARTH_DENSITY SOLAR_GRAVITY EARTH_GRAVITY LUNAR_RADIUS LUNAR_MASS LUNAR_SM_AXIS LUNAR_ECCENTRICITY THOMSON_XSECTION ELECTRON_MASS PROTON_MASS NEUTRON_MASS HYDROGEN_MASS ELECTRON_RADIUS BOHR_RADIUS /], |
247
|
|
|
|
|
|
|
conversion => [qw/ ELECTRON_VOLT STERADIAN ATOMIC_MASS_UNIT PARSEC ASTRONOMICAL_UNIT LIGHT_YEAR ANGSTROM JANSKY AVOGADRO YEAR YEAR_JULIAN YEAR_TROPICAL YEAR_SIDEREAL YEAR_ANOMALISTIC YEAR_ECLIPSE /], |
248
|
|
|
|
|
|
|
cosmology => [qw/ SPEED_LIGHT LIGHT_SPEED GRAVITATIONAL PLANCK H_BAR HBAR STEFAN_BOLTZMANN DENSITY_RADIATION A_RAD WIEN ALPHA IMPEDANCE_VACUUM VACUUM_IMPEDANCE PARSEC ASTRONOMICAL_UNIT LIGHT_YEAR JANSKY YEAR YEAR_JULIAN YEAR_TROPICAL YEAR_SIDEREAL MASS_SOLAR SOLAR_MASS LUMINOSITY_SOLAR SOLAR_LUMINOSITY DENSITY_CRITICAL_RHOc RHO_C HUBBLE_TIME TEMPERATURE_CMB CMB_TEMPERATURE MAGNITUDE_SOLAR_V SOLAR_V_MAG MAGNITUDE_SOLAR_V_ABSOLUTE SOLAR_V_ABS_MAG /], |
249
|
|
|
|
|
|
|
electromagnetic => [qw/ SPEED_LIGHT LIGHT_SPEED BOLTZMANN ELECTRON_VOLT PLANCK H_BAR HBAR CHARGE_ELEMENTARY ELECTRON_CHARGE STEFAN_BOLTZMANN DENSITY_RADIATION A_RAD WIEN ALPHA IMPEDANCE_VACUUM VACUUM_IMPEDANCE PERMITIV_FREE_SPACE PERMITIVITY_0 PERMEABL_FREE_SPACE CONSTANT_MAGNETIC ANGSTROM JANSKY THOMSON_CROSS_SECTION THOMSON_XSECTION MASS_ELECTRON ELECTRON_MASS RADIUS_ELECTRON ELECTRON_RADIUS RADIUS_BOHR BOHR_RADIUS /], |
250
|
|
|
|
|
|
|
fundamental => [qw/ SPEED_LIGHT LIGHT_SPEED BOLTZMANN GRAVITATIONAL ELECTRON_VOLT PLANCK H_BAR HBAR CHARGE_ELEMENTARY ELECTRON_CHARGE STEFAN_BOLTZMANN DENSITY_RADIATION A_RAD WIEN ALPHA IMPEDANCE_VACUUM VACUUM_IMPEDANCE PERMITIV_FREE_SPACE PERMITIVITY_0 PERMEABL_FREE_SPACE CONSTANT_MAGNETIC /], |
251
|
|
|
|
|
|
|
long => [qw/ LIGHT_SPEED SPEED_LIGHT BOLTZMANN GRAVITATIONAL ELECTRON_VOLT PLANCK HBAR H_BAR ELECTRON_CHARGE CHARGE_ELEMENTARY STEFAN_BOLTZMANN A_RAD DENSITY_RADIATION WIEN ALPHA VACUUM_IMPEDANCE IMPEDANCE_VACUUM PERMITIVITY_0 PERMITIV_FREE_SPACE PERMEABILITY_0 CONSTANT_MAGNETIC PERMEABL_FREE_SPACE PI FOURPI FOUR_PI STERADIAN EXP ATOMIC_MASS_UNIT PARSEC ASTRONOMICAL_UNIT LIGHT_YEAR ANGSTROM JANSKY AVOGADRO YEAR_JULIAN YEAR YEAR_TROPICAL YEAR_SIDEREAL YEAR_ANOMALISTIC YEAR_ECLIPSE SOLAR_MASS MASS_SOLAR SOLAR_LUMINOSITY LUMINOSITY_SOLAR RHO_C DENSITY_CRITICAL_RHOc HUBBLE_TIME CMB_TEMPERATURE TEMPERATURE_CMB SOLAR_V_MAG MAGNITUDE_SOLAR_V SOLAR_V_ABS_MAG MAGNITUDE_SOLAR_V_ABSOLUTE SOLAR_RADIUS RADIUS_SOLAR EARTH_MASS MASS_EARTH EARTH_RADIUS RADIUS_EARTH SOLAR_TEMPERATURE TEMPERATURE_SOLAR_SURFACE SOLAR_DENSITY DENSITY_SOLAR EARTH_DENSITY DENSITY_EARTH SOLAR_GRAVITY GRAVITY_SOLAR EARTH_GRAVITY GRAVITY_EARTH LUNAR_RADIUS RADIUS_LUNAR LUNAR_MASS MASS_LUNAR LUNAR_SM_AXIS AXIS_SM_LUNAR LUNAR_ECCENTRICITY ECCENTRICITY_LUNAR THOMSON_XSECTION THOMSON_CROSS_SECTION ELECTRON_MASS MASS_ELECTRON PROTON_MASS MASS_PROTON NEUTRON_MASS MASS_NEUTRON HYDROGEN_MASS MASS_HYDROGEN MASS_ALPHA ELECTRON_RADIUS RADIUS_ELECTRON BOHR_RADIUS RADIUS_BOHR RADIUS_JUPITER MASS_JUPITER /], |
252
|
|
|
|
|
|
|
mathematical => [qw/ PI FOUR_PI FOURPI EXP /], |
253
|
|
|
|
|
|
|
nuclear => [qw/ ELECTRON_VOLT PLANCK H_BAR HBAR CHARGE_ELEMENTARY ELECTRON_CHARGE STEFAN_BOLTZMANN DENSITY_RADIATION A_RAD WIEN ALPHA IMPEDANCE_VACUUM VACUUM_IMPEDANCE PERMITIV_FREE_SPACE PERMITIVITY_0 PERMEABL_FREE_SPACE CONSTANT_MAGNETIC ATOMIC_MASS_UNIT ANGSTROM AVOGADRO THOMSON_CROSS_SECTION THOMSON_XSECTION MASS_ELECTRON ELECTRON_MASS MASS_PROTON PROTON_MASS MASS_NEUTRON NEUTRON_MASS MASS_HYDROGEN HYDROGEN_MASS MASS_ALPHA RADIUS_ELECTRON ELECTRON_RADIUS RADIUS_BOHR BOHR_RADIUS /], |
254
|
|
|
|
|
|
|
planetary => [qw/ GRAVITATIONAL WIEN PARSEC ASTRONOMICAL_UNIT LIGHT_YEAR YEAR_ANOMALISTIC YEAR_ECLIPSE MASS_SOLAR SOLAR_MASS LUMINOSITY_SOLAR SOLAR_LUMINOSITY MAGNITUDE_SOLAR_V SOLAR_V_MAG MAGNITUDE_SOLAR_V_ABSOLUTE SOLAR_V_ABS_MAG RADIUS_SOLAR SOLAR_RADIUS MASS_EARTH EARTH_MASS RADIUS_EARTH EARTH_RADIUS TEMPERATURE_SOLAR_SURFACE SOLAR_TEMPERATURE DENSITY_SOLAR SOLAR_DENSITY DENSITY_EARTH EARTH_DENSITY GRAVITY_SOLAR SOLAR_GRAVITY GRAVITY_EARTH EARTH_GRAVITY RADIUS_LUNAR LUNAR_RADIUS MASS_LUNAR LUNAR_MASS AXIS_SM_LUNAR LUNAR_SM_AXIS ECCENTRICITY_LUNAR LUNAR_ECCENTRICITY RADIUS_JUPITER MASS_JUPITER /], |
255
|
|
|
|
|
|
|
short => [qw/ $A_c $A_k $A_G $A_eV $A_h $A_hbar $A_e $A_sigma $A_arad $A_Wien $A_alpha $A_Z0 $A_eps0 $A_mu0 $A_pi $A_4pi $A_ster $A_exp $A_amu $A_pc $A_AU $A_ly $A_AA $A_Jy $A_NA $A_yr $A_msun $A_Lsun $A_rhoc $A_tH $A_TCMB $A_Vsun $A_MVsun $A_rsun $A_mearth $A_rearth $A_Tsun $A_dsun $A_dearth $A_gsun $A_gearth $A_rmoon $A_mmoon $A_amoon $A_emoon $A_sigmaT $A_me $A_mp $A_mn $A_mH $A_ma $A_re $A_a0 $A_rjup $A_mjup /], |
256
|
|
|
|
|
|
|
); |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
'Perl is my Igor'; |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
__END__ |