-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.R
More file actions
27 lines (22 loc) · 906 Bytes
/
constants.R
File metadata and controls
27 lines (22 loc) · 906 Bytes
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
# Physical Constants for Astronomical Simulations
# All values in SI units unless otherwise specified
# Universal constants
G <- 6.6743015e-11 # Gravitational constant (m³/kg·s²)
# Masses (kg)
M_SUN <- 1.9885e30 # Mass of Sun
M_EARTH <- 5.972168e24 # Mass of Earth
M_MOON <- 7.342e22 # Mass of Moon
M_MARS <- 6.39e23 # Mass of Mars
M_JUPITER <- 1.898e27 # Mass of Jupiter
# Distances (m)
AU <- 1.495978707e11 # Astronomical Unit (Earth-Sun distance)
R_EARTH <- 6.371e6 # Earth radius
R_MOON <- 1.737e6 # Moon radius
R_SUN <- 6.96e8 # Sun radius
# Time periods (seconds)
DAY <- 86400 # 1 day
YEAR <- 365.25 * DAY # 1 year (including leap years)
LUNAR_MONTH <- 27.3 * DAY # Sidereal month
# Velocities (m/s)
V_EARTH_ORBITAL <- 29780 # Earth's orbital velocity around Sun
V_MOON_ORBITAL <- 1022 # Moon's orbital velocity around Earth