line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Astro::Constants::MKS; |
2
|
|
|
|
|
|
|
# ABSTRACT: This library provides physical constants for use in Physics and Astronomy based on values from 2018 CODATA. |
3
|
|
|
|
|
|
|
$Astro::Constants::MKS::VERSION = '0.1401'; |
4
|
15
|
|
|
15
|
|
1033847
|
use 5.006; |
|
15
|
|
|
|
|
180
|
|
5
|
15
|
|
|
15
|
|
86
|
use strict; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
346
|
|
6
|
15
|
|
|
15
|
|
73
|
use warnings; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
514
|
|
7
|
15
|
|
|
15
|
|
84
|
use base qw/Exporter/; |
|
15
|
|
|
|
|
51
|
|
|
15
|
|
|
|
|
2437
|
|
8
|
|
|
|
|
|
|
|
9
|
15
|
|
|
15
|
|
109
|
use constant LIGHT_SPEED => 299792458; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
1537
|
|
10
|
15
|
|
|
15
|
|
100
|
use constant SPEED_LIGHT => 299792458; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
1115
|
|
11
|
|
|
|
|
|
|
*A_c = \299792458; |
12
|
15
|
|
|
15
|
|
103
|
use constant BOLTZMANN => 1.380649e-23; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
1025
|
|
13
|
|
|
|
|
|
|
*A_k = \1.380649e-23; |
14
|
15
|
|
|
15
|
|
94
|
use constant GRAVITATIONAL => 6.67430e-11; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
995
|
|
15
|
|
|
|
|
|
|
*A_G = \6.67430e-11; |
16
|
15
|
|
|
15
|
|
100
|
use constant ELECTRON_VOLT => 1.602176634e-19; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
915
|
|
17
|
|
|
|
|
|
|
*A_eV = \1.602176634e-19; |
18
|
15
|
|
|
15
|
|
114
|
use constant PLANCK => 6.62607015e-34; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
984
|
|
19
|
|
|
|
|
|
|
*A_h = \6.62607015e-34; |
20
|
15
|
|
|
15
|
|
105
|
use constant HBAR => 1.0545718176763e-34; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
810
|
|
21
|
15
|
|
|
15
|
|
166
|
use constant H_BAR => 1.0545718176763e-34; |
|
15
|
|
|
|
|
43
|
|
|
15
|
|
|
|
|
1438
|
|
22
|
|
|
|
|
|
|
*A_hbar = \1.0545718176763e-34; |
23
|
15
|
|
|
15
|
|
97
|
use constant ELECTRON_CHARGE => 1.602176634e-19; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
842
|
|
24
|
15
|
|
|
15
|
|
89
|
use constant CHARGE_ELEMENTARY => 1.602176634e-19; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
1191
|
|
25
|
|
|
|
|
|
|
*A_e = \1.602176634e-19; |
26
|
15
|
|
|
15
|
|
94
|
use constant STEFAN_BOLTZMANN => 5.670374419e-8; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
1067
|
|
27
|
|
|
|
|
|
|
*A_sigma = \5.670374419e-8; |
28
|
15
|
|
|
15
|
|
93
|
use constant A_RAD => 7.565723e-16; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
793
|
|
29
|
15
|
|
|
15
|
|
92
|
use constant DENSITY_RADIATION => 7.565723e-16; |
|
15
|
|
|
|
|
58
|
|
|
15
|
|
|
|
|
910
|
|
30
|
|
|
|
|
|
|
*A_arad = \7.565723e-16; |
31
|
15
|
|
|
15
|
|
91
|
use constant WIEN => 2.897771955e-3; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
880
|
|
32
|
|
|
|
|
|
|
*A_Wien = \2.897771955e-3; |
33
|
15
|
|
|
15
|
|
125
|
use constant ALPHA => 7.2973525693e-3; |
|
15
|
|
|
|
|
53
|
|
|
15
|
|
|
|
|
1085
|
|
34
|
|
|
|
|
|
|
*A_alpha = \7.2973525693e-3; |
35
|
15
|
|
|
15
|
|
96
|
use constant VACUUM_IMPEDANCE => 376.730313461; |
|
15
|
|
|
|
|
38
|
|
|
15
|
|
|
|
|
757
|
|
36
|
15
|
|
|
15
|
|
95
|
use constant IMPEDANCE_VACUUM => 376.730313461; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
1012
|
|
37
|
|
|
|
|
|
|
*A_Z0 = \376.730313461; |
38
|
15
|
|
|
15
|
|
94
|
use constant PERMITIVITY_0 => 8.8541878128e-12; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
1023
|
|
39
|
15
|
|
|
15
|
|
101
|
use constant PERMITIV_FREE_SPACE => 8.8541878128e-12; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
926
|
|
40
|
|
|
|
|
|
|
*A_eps0 = \8.8541878128e-12; |
41
|
15
|
|
|
15
|
|
101
|
use constant PERMEABILITY_0 => 1.25663706212e-6; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
667
|
|
42
|
15
|
|
|
15
|
|
81
|
use constant CONSTANT_MAGNETIC => 1.25663706212e-6; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
722
|
|
43
|
15
|
|
|
15
|
|
87
|
use constant PERMEABL_FREE_SPACE => 1.25663706212e-6; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
1199
|
|
44
|
|
|
|
|
|
|
*A_mu0 = \1.25663706212e-6; |
45
|
15
|
|
|
15
|
|
139
|
use constant PI => 3.14159265358979324; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
957
|
|
46
|
|
|
|
|
|
|
*A_pi = \3.14159265358979324; |
47
|
15
|
|
|
15
|
|
104
|
use constant FOURPI => 12.5663706143592; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
788
|
|
48
|
15
|
|
|
15
|
|
90
|
use constant FOUR_PI => 12.5663706143592; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
976
|
|
49
|
|
|
|
|
|
|
*A_4pi = \12.5663706143592; |
50
|
15
|
|
|
15
|
|
91
|
use constant STERADIAN => 3282.80635001174; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
922
|
|
51
|
|
|
|
|
|
|
*A_ster = \3282.80635001174; |
52
|
15
|
|
|
15
|
|
109
|
use constant EXP => 2.71828182846; |
|
15
|
|
|
|
|
48
|
|
|
15
|
|
|
|
|
912
|
|
53
|
|
|
|
|
|
|
*A_exp = \2.71828182846; |
54
|
15
|
|
|
15
|
|
93
|
use constant ATOMIC_MASS_UNIT => 1.66053906660e-27; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
894
|
|
55
|
|
|
|
|
|
|
*A_amu = \1.66053906660e-27; |
56
|
15
|
|
|
15
|
|
88
|
use constant PARSEC => 3.08567758149e16; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
922
|
|
57
|
|
|
|
|
|
|
*A_pc = \3.08567758149e16; |
58
|
15
|
|
|
15
|
|
129
|
use constant ASTRONOMICAL_UNIT => 149_597_870_700; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
1034
|
|
59
|
|
|
|
|
|
|
*A_AU = \149_597_870_700; |
60
|
15
|
|
|
15
|
|
95
|
use constant LIGHT_YEAR => 9_460_730_472_580_800; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
884
|
|
61
|
|
|
|
|
|
|
*A_ly = \9_460_730_472_580_800; |
62
|
15
|
|
|
15
|
|
87
|
use constant ANGSTROM => 1e-10; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
888
|
|
63
|
|
|
|
|
|
|
*A_AA = \1e-10; |
64
|
15
|
|
|
15
|
|
96
|
use constant JANSKY => 1e-26; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
971
|
|
65
|
|
|
|
|
|
|
*A_Jy = \1e-26; |
66
|
15
|
|
|
15
|
|
116
|
use constant AVOGADRO => 6.02214076e23; |
|
15
|
|
|
|
|
72
|
|
|
15
|
|
|
|
|
1023
|
|
67
|
|
|
|
|
|
|
*A_NA = \6.02214076e23; |
68
|
15
|
|
|
15
|
|
99
|
use constant YEAR_JULIAN => 31_557_600; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
980
|
|
69
|
15
|
|
|
15
|
|
96
|
use constant YEAR => 31_557_600; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
891
|
|
70
|
|
|
|
|
|
|
*A_yr = \31_557_600; |
71
|
15
|
|
|
15
|
|
102
|
use constant YEAR_TROPICAL => 31_556_925.1; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
840
|
|
72
|
15
|
|
|
15
|
|
88
|
use constant YEAR_SIDEREAL => 31_558_149.8; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
719
|
|
73
|
15
|
|
|
15
|
|
97
|
use constant YEAR_ANOMALISTIC => 31_558_432.6; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
728
|
|
74
|
15
|
|
|
15
|
|
88
|
use constant YEAR_ECLIPSE => 29_947_974.3; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
683
|
|
75
|
15
|
|
|
15
|
|
86
|
use constant SOLAR_MASS => 1.9884e30; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
695
|
|
76
|
15
|
|
|
15
|
|
86
|
use constant MASS_SOLAR => 1.9884e30; |
|
15
|
|
|
|
|
42
|
|
|
15
|
|
|
|
|
869
|
|
77
|
|
|
|
|
|
|
*A_msun = \1.9884e30; |
78
|
15
|
|
|
15
|
|
108
|
use constant SOLAR_LUMINOSITY => 3.828e26; |
|
15
|
|
|
|
|
51
|
|
|
15
|
|
|
|
|
789
|
|
79
|
15
|
|
|
15
|
|
107
|
use constant LUMINOSITY_SOLAR => 3.828e26; |
|
15
|
|
|
|
|
51
|
|
|
15
|
|
|
|
|
1065
|
|
80
|
|
|
|
|
|
|
*A_Lsun = \3.828e26; |
81
|
15
|
|
|
15
|
|
112
|
use constant RHO_C => 1.87834e-26; |
|
15
|
|
|
|
|
43
|
|
|
15
|
|
|
|
|
767
|
|
82
|
15
|
|
|
15
|
|
89
|
use constant DENSITY_CRITICAL_RHOc => 1.87834e-26; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
1667
|
|
83
|
|
|
|
|
|
|
*A_rhoc = \1.87834e-26; |
84
|
1
|
|
|
1
|
0
|
1868
|
sub HUBBLE_TIME { warn "HUBBLE_TIME deprecated"; return 3.0853056e17; } |
|
1
|
|
|
|
|
11
|
|
85
|
15
|
|
|
15
|
|
99
|
use constant CMB_TEMPERATURE => 2.72548; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
820
|
|
86
|
15
|
|
|
15
|
|
94
|
use constant TEMPERATURE_CMB => 2.72548; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
886
|
|
87
|
|
|
|
|
|
|
*A_TCMB = \2.72548; |
88
|
15
|
|
|
15
|
|
112
|
use constant SOLAR_V_MAG => -26.74; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
728
|
|
89
|
15
|
|
|
15
|
|
104
|
use constant MAGNITUDE_SOLAR_V => -26.74; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
1273
|
|
90
|
|
|
|
|
|
|
*A_Vsun = \-26.74; |
91
|
15
|
|
|
15
|
|
103
|
use constant SOLAR_V_ABS_MAG => 4.83; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
749
|
|
92
|
15
|
|
|
15
|
|
93
|
use constant MAGNITUDE_SOLAR_V_ABSOLUTE => 4.83; |
|
15
|
|
|
|
|
46
|
|
|
15
|
|
|
|
|
948
|
|
93
|
|
|
|
|
|
|
*A_MVsun = \4.83; |
94
|
15
|
|
|
15
|
|
101
|
use constant SOLAR_RADIUS => 6.96e8; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
725
|
|
95
|
15
|
|
|
15
|
|
99
|
use constant RADIUS_SOLAR => 6.96e8; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
854
|
|
96
|
|
|
|
|
|
|
*A_rsun = \6.96e8; |
97
|
15
|
|
|
15
|
|
91
|
use constant EARTH_MASS => 5.9722e24; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
720
|
|
98
|
15
|
|
|
15
|
|
96
|
use constant MASS_EARTH => 5.9722e24; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
845
|
|
99
|
|
|
|
|
|
|
*A_mearth = \5.9722e24; |
100
|
15
|
|
|
15
|
|
87
|
use constant EARTH_RADIUS => 6.378_136_6e6; |
|
15
|
|
|
|
|
44
|
|
|
15
|
|
|
|
|
752
|
|
101
|
15
|
|
|
15
|
|
93
|
use constant RADIUS_EARTH => 6.378_136_6e6; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
955
|
|
102
|
|
|
|
|
|
|
*A_rearth = \6.378_136_6e6; |
103
|
15
|
|
|
15
|
|
91
|
use constant SOLAR_TEMPERATURE => 5772; |
|
15
|
|
|
|
|
42
|
|
|
15
|
|
|
|
|
780
|
|
104
|
15
|
|
|
15
|
|
101
|
use constant TEMPERATURE_SOLAR_SURFACE => 5772; |
|
15
|
|
|
|
|
53
|
|
|
15
|
|
|
|
|
971
|
|
105
|
|
|
|
|
|
|
*A_Tsun = \5772; |
106
|
15
|
|
|
15
|
|
130
|
use constant SOLAR_DENSITY => 1408; |
|
15
|
|
|
|
|
520
|
|
|
15
|
|
|
|
|
836
|
|
107
|
15
|
|
|
15
|
|
113
|
use constant DENSITY_SOLAR => 1408; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
795
|
|
108
|
|
|
|
|
|
|
*A_dsun = \1408; |
109
|
15
|
|
|
15
|
|
88
|
use constant EARTH_DENSITY => 5515; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
683
|
|
110
|
15
|
|
|
15
|
|
86
|
use constant DENSITY_EARTH => 5515; |
|
15
|
|
|
|
|
42
|
|
|
15
|
|
|
|
|
841
|
|
111
|
|
|
|
|
|
|
*A_dearth = \5515; |
112
|
15
|
|
|
15
|
|
104
|
use constant SOLAR_GRAVITY => 274.78; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
777
|
|
113
|
15
|
|
|
15
|
|
88
|
use constant GRAVITY_SOLAR => 274.78; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
885
|
|
114
|
|
|
|
|
|
|
*A_gsun = \274.78; |
115
|
15
|
|
|
15
|
|
106
|
use constant EARTH_GRAVITY => 9.80665; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
838
|
|
116
|
15
|
|
|
15
|
|
90
|
use constant GRAVITY_EARTH => 9.80665; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
848
|
|
117
|
|
|
|
|
|
|
*A_gearth = \9.80665; |
118
|
15
|
|
|
15
|
|
89
|
use constant LUNAR_RADIUS => 1.7381e6; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
764
|
|
119
|
15
|
|
|
15
|
|
155
|
use constant RADIUS_LUNAR => 1.7381e6; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
869
|
|
120
|
|
|
|
|
|
|
*A_rmoon = \1.7381e6; |
121
|
15
|
|
|
15
|
|
89
|
use constant LUNAR_MASS => 7.346e22; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
796
|
|
122
|
15
|
|
|
15
|
|
95
|
use constant MASS_LUNAR => 7.346e22; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
915
|
|
123
|
|
|
|
|
|
|
*A_mmoon = \7.346e22; |
124
|
15
|
|
|
15
|
|
108
|
use constant LUNAR_SM_AXIS => 3.84402e8; |
|
15
|
|
|
|
|
38
|
|
|
15
|
|
|
|
|
819
|
|
125
|
15
|
|
|
15
|
|
93
|
use constant AXIS_SM_LUNAR => 3.84402e8; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
1015
|
|
126
|
|
|
|
|
|
|
*A_amoon = \3.84402e8; |
127
|
15
|
|
|
15
|
|
143
|
use constant LUNAR_ECCENTRICITY => 0.0549; |
|
15
|
|
|
|
|
53
|
|
|
15
|
|
|
|
|
949
|
|
128
|
15
|
|
|
15
|
|
96
|
use constant ECCENTRICITY_LUNAR => 0.0549; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
894
|
|
129
|
|
|
|
|
|
|
*A_emoon = \0.0549; |
130
|
15
|
|
|
15
|
|
100
|
use constant THOMSON_XSECTION => 6.6524587321e-29; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
769
|
|
131
|
15
|
|
|
15
|
|
91
|
use constant THOMSON_CROSS_SECTION => 6.6524587321e-29; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
1125
|
|
132
|
|
|
|
|
|
|
*A_sigmaT = \6.6524587321e-29; |
133
|
15
|
|
|
15
|
|
115
|
use constant ELECTRON_MASS => 9.1093837015e-31; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
778
|
|
134
|
15
|
|
|
15
|
|
90
|
use constant MASS_ELECTRON => 9.1093837015e-31; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
904
|
|
135
|
|
|
|
|
|
|
*A_me = \9.1093837015e-31; |
136
|
15
|
|
|
15
|
|
95
|
use constant PROTON_MASS => 1.67262192369e-27; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
764
|
|
137
|
15
|
|
|
15
|
|
112
|
use constant MASS_PROTON => 1.67262192369e-27; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
1027
|
|
138
|
|
|
|
|
|
|
*A_mp = \1.67262192369e-27; |
139
|
15
|
|
|
15
|
|
100
|
use constant NEUTRON_MASS => 1.67492749804e-27; |
|
15
|
|
|
|
|
61
|
|
|
15
|
|
|
|
|
772
|
|
140
|
15
|
|
|
15
|
|
101
|
use constant MASS_NEUTRON => 1.67492749804e-27; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
978
|
|
141
|
|
|
|
|
|
|
*A_mn = \1.67492749804e-27; |
142
|
15
|
|
|
15
|
|
104
|
use constant HYDROGEN_MASS => 1.6738e-27; |
|
15
|
|
|
|
|
41
|
|
|
15
|
|
|
|
|
797
|
|
143
|
15
|
|
|
15
|
|
93
|
use constant MASS_HYDROGEN => 1.6738e-27; |
|
15
|
|
|
|
|
38
|
|
|
15
|
|
|
|
|
792
|
|
144
|
|
|
|
|
|
|
*A_mH = \1.6738e-27; |
145
|
15
|
|
|
15
|
|
81
|
use constant MASS_ALPHA => 6.6446573357e-27; |
|
15
|
|
|
|
|
38
|
|
|
15
|
|
|
|
|
999
|
|
146
|
|
|
|
|
|
|
*A_ma = \6.6446573357e-27; |
147
|
15
|
|
|
15
|
|
101
|
use constant ELECTRON_RADIUS => 2.8179403262e-15; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
690
|
|
148
|
15
|
|
|
15
|
|
83
|
use constant RADIUS_ELECTRON => 2.8179403262e-15; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
893
|
|
149
|
|
|
|
|
|
|
*A_re = \2.8179403262e-15; |
150
|
15
|
|
|
15
|
|
121
|
use constant BOHR_RADIUS => 5.29177210903e-11; |
|
15
|
|
|
|
|
64
|
|
|
15
|
|
|
|
|
730
|
|
151
|
15
|
|
|
15
|
|
97
|
use constant RADIUS_BOHR => 5.29177210903e-11; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
855
|
|
152
|
|
|
|
|
|
|
*A_a0 = \5.29177210903e-11; |
153
|
15
|
|
|
15
|
|
92
|
use constant RADIUS_JUPITER => 69_911_000; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
895
|
|
154
|
|
|
|
|
|
|
*A_rjup = \69_911_000; |
155
|
15
|
|
|
15
|
|
111
|
use constant MASS_JUPITER => 1.89819e27; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
13500
|
|
156
|
|
|
|
|
|
|
*A_mjup = \1.89819e27; |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
my %_precision = ( |
159
|
|
|
|
|
|
|
ALPHA => {value => 1.5e-10, type => 'relative'}, |
160
|
|
|
|
|
|
|
ANGSTROM => {value => 0, type => 'relative'}, |
161
|
|
|
|
|
|
|
ASTRONOMICAL_UNIT => {value => 0, type => 'relative'}, |
162
|
|
|
|
|
|
|
ATOMIC_MASS_UNIT => {value => 3.0e-10, type => 'relative'}, |
163
|
|
|
|
|
|
|
AVOGADRO => {value => 0, type => 'relative'}, |
164
|
|
|
|
|
|
|
AXIS_SM_LUNAR => {value => 3e-9, type => 'relative'}, |
165
|
|
|
|
|
|
|
BOLTZMANN => {value => 0, type => 'relative'}, |
166
|
|
|
|
|
|
|
CHARGE_ELEMENTARY => {value => 0, type => 'relative'}, |
167
|
|
|
|
|
|
|
DENSITY_CRITICAL_RHOc => {value => 2.3e-5, type => 'relative'}, |
168
|
|
|
|
|
|
|
DENSITY_EARTH => {value => 0.0002, type => 'relative'}, |
169
|
|
|
|
|
|
|
DENSITY_RADIATION => {value => 2.3e-6, type => 'relative'}, |
170
|
|
|
|
|
|
|
DENSITY_SOLAR => {value => 0.001, type => 'relative'}, |
171
|
|
|
|
|
|
|
ECCENTRICITY_LUNAR => {value => 0.002, type => 'relative'}, |
172
|
|
|
|
|
|
|
ELECTRON_VOLT => {value => 0, type => 'relative'}, |
173
|
|
|
|
|
|
|
EXP => {value => 0.00000000001, type => 'relative'}, |
174
|
|
|
|
|
|
|
FOUR_PI => {value => 0.0000000000001, type => 'relative'}, |
175
|
|
|
|
|
|
|
GRAVITATIONAL => {value => 2.2e-5, type => 'relative'}, |
176
|
|
|
|
|
|
|
GRAVITY_EARTH => {value => 0.000001, type => 'relative'}, |
177
|
|
|
|
|
|
|
GRAVITY_SOLAR => {value => 0.0004, type => 'relative'}, |
178
|
|
|
|
|
|
|
HUBBLE_TIME => {value => 0.0000001, type => 'relative'}, |
179
|
|
|
|
|
|
|
H_BAR => {value => 1.5e-9, type => 'relative'}, |
180
|
|
|
|
|
|
|
IMPEDANCE_VACUUM => {value => 1e-50, type => 'relative'}, |
181
|
|
|
|
|
|
|
JANSKY => {value => 0, type => 'relative'}, |
182
|
|
|
|
|
|
|
LIGHT_YEAR => {value => 0, type => 'relative'}, |
183
|
|
|
|
|
|
|
LUMINOSITY_SOLAR => {value => 0.0003, type => 'relative'}, |
184
|
|
|
|
|
|
|
MAGNITUDE_SOLAR_V => {value => 0.0004, type => 'relative'}, |
185
|
|
|
|
|
|
|
MAGNITUDE_SOLAR_V_ABSOLUTE => {value => 0.002, type => 'relative'}, |
186
|
|
|
|
|
|
|
MASS_ALPHA => {value => 3.0e-10, type => 'relative'}, |
187
|
|
|
|
|
|
|
MASS_EARTH => {value => 6e20, type => 'absolute'}, |
188
|
|
|
|
|
|
|
MASS_ELECTRON => {value => 3e-10, type => 'relative'}, |
189
|
|
|
|
|
|
|
MASS_HYDROGEN => {value => 3.3e-31, type => 'absolute'}, |
190
|
|
|
|
|
|
|
MASS_JUPITER => {value => 5e-6, type => 'relative'}, |
191
|
|
|
|
|
|
|
MASS_LUNAR => {value => 0.0002, type => 'relative'}, |
192
|
|
|
|
|
|
|
MASS_NEUTRON => {value => 5.7e-10, type => 'relative'}, |
193
|
|
|
|
|
|
|
MASS_PROTON => {value => 3.1e-10, type => 'relative'}, |
194
|
|
|
|
|
|
|
MASS_SOLAR => {value => 0.0001, type => 'relative'}, |
195
|
|
|
|
|
|
|
PARSEC => {value => 1e-11, type => 'relative'}, |
196
|
|
|
|
|
|
|
PERMEABL_FREE_SPACE => {value => 1.5e-10, type => 'relative'}, |
197
|
|
|
|
|
|
|
PERMITIV_FREE_SPACE => {value => 1.5e-10, type => 'relative'}, |
198
|
|
|
|
|
|
|
PI => {value => 0.00000000000000001, type => 'relative'}, |
199
|
|
|
|
|
|
|
PLANCK => {value => 0, type => 'relative'}, |
200
|
|
|
|
|
|
|
RADIUS_BOHR => {value => 1.5e-10, type => 'relative'}, |
201
|
|
|
|
|
|
|
RADIUS_EARTH => {value => 0.1, type => 'absolute'}, |
202
|
|
|
|
|
|
|
RADIUS_ELECTRON => {value => 4.5e-10, type => 'relative'}, |
203
|
|
|
|
|
|
|
RADIUS_JUPITER => {value => 1.5e-5, type => 'relative'}, |
204
|
|
|
|
|
|
|
RADIUS_LUNAR => {value => 6e-5, type => 'relative'}, |
205
|
|
|
|
|
|
|
RADIUS_SOLAR => {value => 0.002, type => 'relative'}, |
206
|
|
|
|
|
|
|
SPEED_LIGHT => {value => 0, type => 'relative'}, |
207
|
|
|
|
|
|
|
STEFAN_BOLTZMANN => {value => 1.7e-10, type => 'relative'}, |
208
|
|
|
|
|
|
|
STERADIAN => {value => 0.00000000000001, type => 'relative'}, |
209
|
|
|
|
|
|
|
TEMPERATURE_CMB => {value => 0.00057, type => 'absolute'}, |
210
|
|
|
|
|
|
|
TEMPERATURE_SOLAR_SURFACE => {value => 0.0002, type => 'relative'}, |
211
|
|
|
|
|
|
|
THOMSON_CROSS_SECTION => {value => 9.1e-10, type => 'relative'}, |
212
|
|
|
|
|
|
|
WIEN => {value => 1e-10, type => 'relative'}, |
213
|
|
|
|
|
|
|
YEAR => {value => 0, type => 'relative'}, |
214
|
|
|
|
|
|
|
YEAR_ANOMALISTIC => {value => 0.1, type => 'absolute'}, |
215
|
|
|
|
|
|
|
YEAR_ECLIPSE => {value => 0.1, type => 'absolute'}, |
216
|
|
|
|
|
|
|
YEAR_SIDEREAL => {value => 1, type => 'absolute'}, |
217
|
|
|
|
|
|
|
YEAR_TROPICAL => {value => 0.1, type => 'absolute'}, |
218
|
|
|
|
|
|
|
); |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
# some helper functions |
221
|
|
|
|
|
|
|
sub pretty { |
222
|
4
|
50
|
|
4
|
0
|
716
|
if (@_ > 1) { |
223
|
0
|
|
|
|
|
0
|
return map { sprintf("%1.3e", $_) } @_; |
|
0
|
|
|
|
|
0
|
|
224
|
|
|
|
|
|
|
} |
225
|
4
|
|
|
|
|
50
|
return sprintf("%1.3e", shift); |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
sub precision { |
229
|
7
|
|
|
7
|
0
|
7332
|
my ($name, $type) = @_; |
230
|
|
|
|
|
|
|
warn "precision() requires a string, not the constant value" |
231
|
7
|
50
|
|
|
|
28
|
unless exists $_precision{$name}; |
232
|
|
|
|
|
|
|
|
233
|
7
|
|
|
|
|
31
|
return $_precision{$name}->{value}; |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
237
|
|
|
|
|
|
|
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 |
238
|
|
|
|
|
|
|
$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 |
239
|
|
|
|
|
|
|
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 |
240
|
|
|
|
|
|
|
pretty precision |
241
|
|
|
|
|
|
|
); |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
244
|
|
|
|
|
|
|
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 /], |
245
|
|
|
|
|
|
|
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 /], |
246
|
|
|
|
|
|
|
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 /], |
247
|
|
|
|
|
|
|
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 /], |
248
|
|
|
|
|
|
|
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 /], |
249
|
|
|
|
|
|
|
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 /], |
250
|
|
|
|
|
|
|
mathematical => [qw/ PI FOUR_PI FOURPI EXP /], |
251
|
|
|
|
|
|
|
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 /], |
252
|
|
|
|
|
|
|
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 /], |
253
|
|
|
|
|
|
|
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 /], |
254
|
|
|
|
|
|
|
); |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
'Perl is my Igor'; |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
__END__ |