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 CODATA2014. |
3
|
|
|
|
|
|
|
$Astro::Constants::MKS::VERSION = '0.14'; |
4
|
15
|
|
|
15
|
|
959520
|
use 5.006; |
|
15
|
|
|
|
|
162
|
|
5
|
15
|
|
|
15
|
|
75
|
use strict; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
333
|
|
6
|
15
|
|
|
15
|
|
70
|
use warnings; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
455
|
|
7
|
15
|
|
|
15
|
|
76
|
use base qw/Exporter/; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
2223
|
|
8
|
|
|
|
|
|
|
|
9
|
15
|
|
|
15
|
|
102
|
use constant LIGHT_SPEED => 299792458; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
1370
|
|
10
|
15
|
|
|
15
|
|
91
|
use constant SPEED_LIGHT => 299792458; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
1014
|
|
11
|
|
|
|
|
|
|
*A_c = \299792458; |
12
|
15
|
|
|
15
|
|
91
|
use constant BOLTZMANN => 1.380649e-23; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
913
|
|
13
|
|
|
|
|
|
|
*A_k = \1.380649e-23; |
14
|
15
|
|
|
15
|
|
86
|
use constant GRAVITATIONAL => 6.67430e-11; |
|
15
|
|
|
|
|
40
|
|
|
15
|
|
|
|
|
888
|
|
15
|
|
|
|
|
|
|
*A_G = \6.67430e-11; |
16
|
15
|
|
|
15
|
|
85
|
use constant ELECTRON_VOLT => 1.602176634e-19; |
|
15
|
|
|
|
|
42
|
|
|
15
|
|
|
|
|
880
|
|
17
|
|
|
|
|
|
|
*A_eV = \1.602176634e-19; |
18
|
15
|
|
|
15
|
|
115
|
use constant PLANCK => 6.62607015e-34; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
848
|
|
19
|
|
|
|
|
|
|
*A_h = \6.62607015e-34; |
20
|
15
|
|
|
15
|
|
86
|
use constant HBAR => 1.0545718176763e-34; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
779
|
|
21
|
15
|
|
|
15
|
|
105
|
use constant H_BAR => 1.0545718176763e-34; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
1106
|
|
22
|
|
|
|
|
|
|
*A_hbar = \1.0545718176763e-34; |
23
|
15
|
|
|
15
|
|
91
|
use constant ELECTRON_CHARGE => 1.602176634e-19; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
766
|
|
24
|
15
|
|
|
15
|
|
83
|
use constant CHARGE_ELEMENTARY => 1.602176634e-19; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
850
|
|
25
|
|
|
|
|
|
|
*A_e = \1.602176634e-19; |
26
|
15
|
|
|
15
|
|
84
|
use constant STEFAN_BOLTZMANN => 5.670374419e-8; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
1025
|
|
27
|
|
|
|
|
|
|
*A_sigma = \5.670374419e-8; |
28
|
15
|
|
|
15
|
|
93
|
use constant A_RAD => 7.565723e-16; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
717
|
|
29
|
15
|
|
|
15
|
|
82
|
use constant DENSITY_RADIATION => 7.565723e-16; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
867
|
|
30
|
|
|
|
|
|
|
*A_arad = \7.565723e-16; |
31
|
15
|
|
|
15
|
|
86
|
use constant WIEN => 2.897771955e-3; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
820
|
|
32
|
|
|
|
|
|
|
*A_Wien = \2.897771955e-3; |
33
|
15
|
|
|
15
|
|
110
|
use constant ALPHA => 7.2973525693e-3; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
927
|
|
34
|
|
|
|
|
|
|
*A_alpha = \7.2973525693e-3; |
35
|
15
|
|
|
15
|
|
92
|
use constant VACUUM_IMPEDANCE => 376.730313461; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
673
|
|
36
|
15
|
|
|
15
|
|
86
|
use constant IMPEDANCE_VACUUM => 376.730313461; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
883
|
|
37
|
|
|
|
|
|
|
*A_Z0 = \376.730313461; |
38
|
15
|
|
|
15
|
|
86
|
use constant PERMITIVITY_0 => 8.8541878128e-12; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
922
|
|
39
|
15
|
|
|
15
|
|
97
|
use constant PERMITIV_FREE_SPACE => 8.8541878128e-12; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
824
|
|
40
|
|
|
|
|
|
|
*A_eps0 = \8.8541878128e-12; |
41
|
15
|
|
|
15
|
|
83
|
use constant PERMEABILITY_0 => 1.25663706212e-6; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
641
|
|
42
|
15
|
|
|
15
|
|
77
|
use constant CONSTANT_MAGNETIC => 1.25663706212e-6; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
691
|
|
43
|
15
|
|
|
15
|
|
81
|
use constant PERMEABL_FREE_SPACE => 1.25663706212e-6; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
1037
|
|
44
|
|
|
|
|
|
|
*A_mu0 = \1.25663706212e-6; |
45
|
15
|
|
|
15
|
|
104
|
use constant PI => 3.14159265358979324; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
860
|
|
46
|
|
|
|
|
|
|
*A_pi = \3.14159265358979324; |
47
|
15
|
|
|
15
|
|
85
|
use constant FOURPI => 12.5663706143592; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
677
|
|
48
|
15
|
|
|
15
|
|
79
|
use constant FOUR_PI => 12.5663706143592; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
1004
|
|
49
|
|
|
|
|
|
|
*A_4pi = \12.5663706143592; |
50
|
15
|
|
|
15
|
|
85
|
use constant STERADIAN => 3282.80635001174; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
826
|
|
51
|
|
|
|
|
|
|
*A_ster = \3282.80635001174; |
52
|
15
|
|
|
15
|
|
93
|
use constant EXP => 2.71828182846; |
|
15
|
|
|
|
|
42
|
|
|
15
|
|
|
|
|
802
|
|
53
|
|
|
|
|
|
|
*A_exp = \2.71828182846; |
54
|
15
|
|
|
15
|
|
79
|
use constant ATOMIC_MASS_UNIT => 1.66053906660e-27; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
818
|
|
55
|
|
|
|
|
|
|
*A_amu = \1.66053906660e-27; |
56
|
15
|
|
|
15
|
|
84
|
use constant PARSEC => 3.08567758149e16; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
796
|
|
57
|
|
|
|
|
|
|
*A_pc = \3.08567758149e16; |
58
|
15
|
|
|
15
|
|
102
|
use constant ASTRONOMICAL_UNIT => 149_597_870_700; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
921
|
|
59
|
|
|
|
|
|
|
*A_AU = \149_597_870_700; |
60
|
15
|
|
|
15
|
|
85
|
use constant LIGHT_YEAR => 9_460_730_472_580_800; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
813
|
|
61
|
|
|
|
|
|
|
*A_ly = \9_460_730_472_580_800; |
62
|
15
|
|
|
15
|
|
97
|
use constant ANGSTROM => 1e-10; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
843
|
|
63
|
|
|
|
|
|
|
*A_AA = \1e-10; |
64
|
15
|
|
|
15
|
|
88
|
use constant JANSKY => 1e-26; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
882
|
|
65
|
|
|
|
|
|
|
*A_Jy = \1e-26; |
66
|
15
|
|
|
15
|
|
92
|
use constant AVOGADRO => 6.02214076e23; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
885
|
|
67
|
|
|
|
|
|
|
*A_NA = \6.02214076e23; |
68
|
15
|
|
|
15
|
|
89
|
use constant YEAR_JULIAN => 31_557_600; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
886
|
|
69
|
15
|
|
|
15
|
|
88
|
use constant YEAR => 31_557_600; |
|
15
|
|
|
|
|
22
|
|
|
15
|
|
|
|
|
938
|
|
70
|
|
|
|
|
|
|
*A_yr = \31_557_600; |
71
|
15
|
|
|
15
|
|
97
|
use constant YEAR_TROPICAL => 31_556_925.1; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
801
|
|
72
|
15
|
|
|
15
|
|
85
|
use constant YEAR_SIDEREAL => 31_558_149.8; |
|
15
|
|
|
|
|
38
|
|
|
15
|
|
|
|
|
678
|
|
73
|
15
|
|
|
15
|
|
89
|
use constant YEAR_ANOMALISTIC => 31_558_432.6; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
644
|
|
74
|
15
|
|
|
15
|
|
78
|
use constant YEAR_ECLIPSE => 29_947_974.3; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
637
|
|
75
|
15
|
|
|
15
|
|
81
|
use constant SOLAR_MASS => 1.9884e30; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
638
|
|
76
|
15
|
|
|
15
|
|
76
|
use constant MASS_SOLAR => 1.9884e30; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
754
|
|
77
|
|
|
|
|
|
|
*A_msun = \1.9884e30; |
78
|
15
|
|
|
15
|
|
119
|
use constant SOLAR_LUMINOSITY => 3.828e26; |
|
15
|
|
|
|
|
54
|
|
|
15
|
|
|
|
|
705
|
|
79
|
15
|
|
|
15
|
|
97
|
use constant LUMINOSITY_SOLAR => 3.828e26; |
|
15
|
|
|
|
|
45
|
|
|
15
|
|
|
|
|
963
|
|
80
|
|
|
|
|
|
|
*A_Lsun = \3.828e26; |
81
|
15
|
|
|
15
|
|
110
|
use constant RHO_C => 1.87834e-26; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
729
|
|
82
|
15
|
|
|
15
|
|
84
|
use constant DENSITY_CRITICAL_RHOc => 1.87834e-26; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
1179
|
|
83
|
|
|
|
|
|
|
*A_rhoc = \1.87834e-26; |
84
|
1
|
|
|
1
|
0
|
1079
|
sub HUBBLE_TIME { warn "HUBBLE_TIME deprecated"; return 3.0853056e17; } |
|
1
|
|
|
|
|
9
|
|
85
|
15
|
|
|
15
|
|
103
|
use constant CMB_TEMPERATURE => 2.72548; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
716
|
|
86
|
15
|
|
|
15
|
|
83
|
use constant TEMPERATURE_CMB => 2.72548; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
803
|
|
87
|
|
|
|
|
|
|
*A_TCMB = \2.72548; |
88
|
15
|
|
|
15
|
|
100
|
use constant SOLAR_V_MAG => -26.74; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
694
|
|
89
|
15
|
|
|
15
|
|
80
|
use constant MAGNITUDE_SOLAR_V => -26.74; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
1198
|
|
90
|
|
|
|
|
|
|
*A_Vsun = \-26.74; |
91
|
15
|
|
|
15
|
|
99
|
use constant SOLAR_V_ABS_MAG => 4.83; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
680
|
|
92
|
15
|
|
|
15
|
|
82
|
use constant MAGNITUDE_SOLAR_V_ABSOLUTE => 4.83; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
861
|
|
93
|
|
|
|
|
|
|
*A_MVsun = \4.83; |
94
|
15
|
|
|
15
|
|
90
|
use constant SOLAR_RADIUS => 6.96e8; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
657
|
|
95
|
15
|
|
|
15
|
|
81
|
use constant RADIUS_SOLAR => 6.96e8; |
|
15
|
|
|
|
|
21
|
|
|
15
|
|
|
|
|
797
|
|
96
|
|
|
|
|
|
|
*A_rsun = \6.96e8; |
97
|
15
|
|
|
15
|
|
101
|
use constant EARTH_MASS => 5.9722e24; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
648
|
|
98
|
15
|
|
|
15
|
|
81
|
use constant MASS_EARTH => 5.9722e24; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
804
|
|
99
|
|
|
|
|
|
|
*A_mearth = \5.9722e24; |
100
|
15
|
|
|
15
|
|
83
|
use constant EARTH_RADIUS => 6.378_136_6e6; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
695
|
|
101
|
15
|
|
|
15
|
|
87
|
use constant RADIUS_EARTH => 6.378_136_6e6; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
750
|
|
102
|
|
|
|
|
|
|
*A_rearth = \6.378_136_6e6; |
103
|
15
|
|
|
15
|
|
91
|
use constant SOLAR_TEMPERATURE => 5772; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
717
|
|
104
|
15
|
|
|
15
|
|
92
|
use constant TEMPERATURE_SOLAR_SURFACE => 5772; |
|
15
|
|
|
|
|
39
|
|
|
15
|
|
|
|
|
867
|
|
105
|
|
|
|
|
|
|
*A_Tsun = \5772; |
106
|
15
|
|
|
15
|
|
119
|
use constant SOLAR_DENSITY => 1408; |
|
15
|
|
|
|
|
447
|
|
|
15
|
|
|
|
|
731
|
|
107
|
15
|
|
|
15
|
|
102
|
use constant DENSITY_SOLAR => 1408; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
740
|
|
108
|
|
|
|
|
|
|
*A_dsun = \1408; |
109
|
15
|
|
|
15
|
|
80
|
use constant EARTH_DENSITY => 5515; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
629
|
|
110
|
15
|
|
|
15
|
|
79
|
use constant DENSITY_EARTH => 5515; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
757
|
|
111
|
|
|
|
|
|
|
*A_dearth = \5515; |
112
|
15
|
|
|
15
|
|
87
|
use constant SOLAR_GRAVITY => 274.78; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
653
|
|
113
|
15
|
|
|
15
|
|
79
|
use constant GRAVITY_SOLAR => 274.78; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
797
|
|
114
|
|
|
|
|
|
|
*A_gsun = \274.78; |
115
|
15
|
|
|
15
|
|
96
|
use constant EARTH_GRAVITY => 9.80665; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
774
|
|
116
|
15
|
|
|
15
|
|
101
|
use constant GRAVITY_EARTH => 9.80665; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
773
|
|
117
|
|
|
|
|
|
|
*A_gearth = \9.80665; |
118
|
15
|
|
|
15
|
|
93
|
use constant LUNAR_RADIUS => 1.7381e6; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
649
|
|
119
|
15
|
|
|
15
|
|
121
|
use constant RADIUS_LUNAR => 1.7381e6; |
|
15
|
|
|
|
|
37
|
|
|
15
|
|
|
|
|
803
|
|
120
|
|
|
|
|
|
|
*A_rmoon = \1.7381e6; |
121
|
15
|
|
|
15
|
|
109
|
use constant LUNAR_MASS => 7.346e22; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
718
|
|
122
|
15
|
|
|
15
|
|
87
|
use constant MASS_LUNAR => 7.346e22; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
816
|
|
123
|
|
|
|
|
|
|
*A_mmoon = \7.346e22; |
124
|
15
|
|
|
15
|
|
82
|
use constant LUNAR_SM_AXIS => 3.84402e8; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
755
|
|
125
|
15
|
|
|
15
|
|
83
|
use constant AXIS_SM_LUNAR => 3.84402e8; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
860
|
|
126
|
|
|
|
|
|
|
*A_amoon = \3.84402e8; |
127
|
15
|
|
|
15
|
|
89
|
use constant LUNAR_ECCENTRICITY => 0.0549; |
|
15
|
|
|
|
|
56
|
|
|
15
|
|
|
|
|
913
|
|
128
|
15
|
|
|
15
|
|
90
|
use constant ECCENTRICITY_LUNAR => 0.0549; |
|
15
|
|
|
|
|
40
|
|
|
15
|
|
|
|
|
763
|
|
129
|
|
|
|
|
|
|
*A_emoon = \0.0549; |
130
|
15
|
|
|
15
|
|
78
|
use constant THOMSON_XSECTION => 6.6524587321e-29; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
737
|
|
131
|
15
|
|
|
15
|
|
83
|
use constant THOMSON_CROSS_SECTION => 6.6524587321e-29; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
1032
|
|
132
|
|
|
|
|
|
|
*A_sigmaT = \6.6524587321e-29; |
133
|
15
|
|
|
15
|
|
108
|
use constant ELECTRON_MASS => 9.1093837015e-31; |
|
15
|
|
|
|
|
28
|
|
|
15
|
|
|
|
|
713
|
|
134
|
15
|
|
|
15
|
|
83
|
use constant MASS_ELECTRON => 9.1093837015e-31; |
|
15
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
821
|
|
135
|
|
|
|
|
|
|
*A_me = \9.1093837015e-31; |
136
|
15
|
|
|
15
|
|
84
|
use constant PROTON_MASS => 1.67262192369e-27; |
|
15
|
|
|
|
|
25
|
|
|
15
|
|
|
|
|
645
|
|
137
|
15
|
|
|
15
|
|
89
|
use constant MASS_PROTON => 1.67262192369e-27; |
|
15
|
|
|
|
|
34
|
|
|
15
|
|
|
|
|
878
|
|
138
|
|
|
|
|
|
|
*A_mp = \1.67262192369e-27; |
139
|
15
|
|
|
15
|
|
89
|
use constant NEUTRON_MASS => 1.67492749804e-27; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
699
|
|
140
|
15
|
|
|
15
|
|
99
|
use constant MASS_NEUTRON => 1.67492749804e-27; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
893
|
|
141
|
|
|
|
|
|
|
*A_mn = \1.67492749804e-27; |
142
|
15
|
|
|
15
|
|
91
|
use constant HYDROGEN_MASS => 1.6738e-27; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
740
|
|
143
|
15
|
|
|
15
|
|
90
|
use constant MASS_HYDROGEN => 1.6738e-27; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
783
|
|
144
|
|
|
|
|
|
|
*A_mH = \1.6738e-27; |
145
|
15
|
|
|
15
|
|
76
|
use constant MASS_ALPHA => 6.6446573357e-27; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
828
|
|
146
|
|
|
|
|
|
|
*A_ma = \6.6446573357e-27; |
147
|
15
|
|
|
15
|
|
93
|
use constant ELECTRON_RADIUS => 2.8179403262e-15; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
634
|
|
148
|
15
|
|
|
15
|
|
74
|
use constant RADIUS_ELECTRON => 2.8179403262e-15; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
817
|
|
149
|
|
|
|
|
|
|
*A_re = \2.8179403262e-15; |
150
|
15
|
|
|
15
|
|
132
|
use constant BOHR_RADIUS => 5.29177210903e-11; |
|
15
|
|
|
|
|
53
|
|
|
15
|
|
|
|
|
712
|
|
151
|
15
|
|
|
15
|
|
82
|
use constant RADIUS_BOHR => 5.29177210903e-11; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
765
|
|
152
|
|
|
|
|
|
|
*A_a0 = \5.29177210903e-11; |
153
|
15
|
|
|
15
|
|
82
|
use constant RADIUS_JUPITER => 69_911_000; |
|
15
|
|
|
|
|
33
|
|
|
15
|
|
|
|
|
769
|
|
154
|
|
|
|
|
|
|
*A_rjup = \69_911_000; |
155
|
15
|
|
|
15
|
|
87
|
use constant MASS_JUPITER => 1.89819e27; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
12564
|
|
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
|
574
|
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
|
7418
|
my ($name, $type) = @_; |
230
|
|
|
|
|
|
|
warn "precision() requires a string, not the constant value" |
231
|
7
|
50
|
|
|
|
22
|
unless exists $_precision{$name}; |
232
|
|
|
|
|
|
|
|
233
|
7
|
|
|
|
|
25
|
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__ |