1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! Useful Physical and Astronomical constants


/// Speed of light in a vaccuum `c`: 3.00 * 10^(8) (m*s^(-1))
#[allow(dead_code)]
pub const LIGHT_SPEED: f64 = 3.00e8_f64;

/// Gravitational constant `G`: 6.67 * 10^(-11) N*(m^(2)*k^(-2))
#[allow(dead_code)]
pub const G: f64 = 6.67e-11_f64;

/// Acceleration of gravity at Earth's surface `g`: 9.8 m * s(-2)
#[allow(dead_code)]
pub const LITTLE_G: f64 = 9.8;

/// Electron mass: 9.11 * 10^(-31) kg
#[allow(dead_code)]
pub const ELECTRON_MASS: f64 = 9.11e-31_f64;

/// Proton mass: 1.67 * 10^(-27) kg
#[allow(dead_code)]
pub const PROTON_MASS: f64 = 1.67e-27_f64;

/// Electron charge: 1.60218 * 10^(-19) C
#[allow(dead_code)]
pub const ELECTRON_CHARGE: f64 = 1.60218e-19_f64;

/// Planck's constant: 6.63 * 10^(-34) J*s
#[allow(dead_code)]
pub const PLANCKS_CONST: f64 = 6.63e-34_f64;

/// Mass of the Earth: 5.98 * 10^(24) kg
#[allow(dead_code)]
pub const EARTH_MASS: f64 = 5.98e24_f64;

/// Mean radius of the Earth: 6.37 * 10^(6) m
#[allow(dead_code)]
pub const EARTH_RADIUS: f64 = 6.37e6_f64;

/// Radius of Earth's orbit: 1.49 * 10^(11) m
#[allow(dead_code)]
pub const EARTH_RADIUS_ORBIT: f64 = 1.49e11_f64;

/// Period of Earth's rotation: 8.64 * 10^(4) s
#[allow(dead_code)]
pub const EARTH_PERIOD_ROT: f64 = 8.64e4_f64;

/// Period of Earth's revolution: 3.16 * 10^(7) s
#[allow(dead_code)]
pub const EARTH_PERIOD_REV: f64 = 3.16e7_f64;

/// Mass of Earth's Moon: 7.34 * 10^(22) kg
#[allow(dead_code)]
pub const MOON_MASS: f64 = 7.34e22_f64;

/// Radius of Earth's Moon: 1.74 * 10^(6) m
#[allow(dead_code)]
pub const MOON_RAD: f64 = 1.74e6_f64;

/// Radius of Earth's Moon's orbit: 3.84 * 10^(8) m
#[allow(dead_code)]
pub const MOON_ORBIT_RAD: f64 = 3.84e8_f64;

/// Mass of Earth's Sun: 1.99 * 10^(30) kg
#[allow(dead_code)]
pub const SUN_MASS: f64 = 1.99e30_f64;

/// 1 Angstrom in meters: 10^(-10) m
#[allow(dead_code)]
pub const ANGSTROM: f64 = 10e-10_f64;


/// Atomic Mass Unit (amu) in kg: 1.66 * 10^(-27) kg
#[allow(dead_code)]
pub const AMU_KG: f64 = 1.66e-27_f64;

/// Atomic Mass Unit (amu) in MeV: 931 MeV
#[allow(dead_code)]
pub const AMU_MEV: f64 = 931_f64;