Base data
http://hyperphysics.phy-astr.gsu.edu/hbase/Solar/soldata2.html
python
import numpy as np
solar_system = {
"mercury": {
"name": "Mercury",
"diameter_km": 4_879,
"distance_from_sun_km": 57_900_000,
"mass_kg": 3.3e23,
},
"venus": {
"name": "Venus",
"diameter_km": 12_104,
"distance_from_sun_km": 108_200_000,
"mass_kg": 4.87e24,
},
"earth": {
"name": "Earth",
"diameter_km": 12_756,
"distance_from_sun_km": 149_600_000,
"mass_kg": 5.976e24,
},
"mars": {
"name": "Mars",
"diameter_km": 6_792,
"distance_from_sun_km": 227_900_000,
"mass_kg": 6.42e23,
},
"jupiter": {
"name": "Jupiter",
"diameter_km": 142_984,
"distance_from_sun_km": 778_600_000,
"mass_kg": 1.90e27,
},
"saturn": {
"name": "Saturn",
"diameter_km": 120_536,
"distance_from_sun_km": 1_427_000_000,
"mass_kg": 5.68e26,
},
"uranus": {
"name": "Uranus",
"diameter_km": 51_118,
"distance_from_sun_km": 2_870_000_000,
"mass_kg": 8.69e25,
},
"neptune": {
"name": "Neptune",
"diameter_km": 49_528,
"distance_from_sun_km": 4_497_000_000,
"mass_kg": 1.02e26,
},
}
au_scale = solar_system["earth"]["distance_from_sun_km"]
distances_km = np.array([p["distance_from_sun_km"] for p in solar_system.values()])
distances_au = distances_km / au_scale
for p, au in zip(solar_system.values(), distances_au):
p["distance_from_sun_au"] = au
earth_mass_kg = solar_system["earth"]["mass_kg"]
for p in solar_system.values():
p["mass_earth"] = p["mass_kg"] / earth_mass_kg
print(f"Reference: 1 AU = {au_scale:,} km")
print(f"Reference: 1 Earth Mass = {earth_mass_kg:.3e} kg\n")
from IPython.display import display, Markdown
print("Distances from the Sun:")
for p in solar_system.values():
print(f"{p['name']:<10}: {p['distance_from_sun_au']:>5.2f} AU")
display(Markdown("Planetary Masses: \n" + " \n".join(
rf"{p['name']:<10}: {p['mass_earth']:>8.2f} $M_{{\oplus}}$" for p in solar_system.values()
)))Reference: 1 AU = 149,600,000 km
Reference: 1 Earth Mass = 5.976e+24 kg
Distances from the Sun:
Mercury : 0.39 AU
Venus : 0.72 AU
Earth : 1.00 AU
Mars : 1.52 AU
Jupiter : 5.20 AU
Saturn : 9.54 AU
Uranus : 19.18 AU
Neptune : 30.06 AU
Planetary Masses:
Mercury : 0.06
Venus : 0.81
Earth : 1.00
Mars : 0.11
Jupiter : 317.94
Saturn : 95.05
Uranus : 14.54
Neptune : 17.07
Kepler's Laws of Planetary Motion
- The orbit of a planet is an ellipse with the Sun at one of the two foci.
- A line segment joining a planet and the Sun sweeps out equal areas during equal intervals of time.
- The square of a planet's orbital period is proportional to the cube of the length of the semi-major axis of its orbit.