moons 0.0.2

Moon celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn main() {
    let earth_context = moons::interactions::earths::ensure_earths_binary_or_simulate();

    let orbit = moons::physics::orbit::LunarOrbit::new();
    let rotation = moons::physics::rotation::MoonRotation::new();

    println!(
        "mode={:?} earth_r_km={:.1} earth_theta_deg={:.2} earth_spin_deg={:.2} mean_motion={:.8} periapsis_m={:.0} eq_speed_m_s={:.4}",
        earth_context.mode,
        earth_context.orbital_radius_km,
        earth_context.orbital_angle_deg,
        earth_context.rotation_angle_deg,
        orbit.mean_motion_rad_s(),
        orbit.periapsis_m(),
        rotation.equatorial_speed_m_s(),
    );
}