ioss 0.0.3

Io celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::physics::orbit::IoOrbit;

pub fn libration_factor(true_anomaly_rad: f64) -> f64 {
    1.0 + 0.08 * true_anomaly_rad.sin()
}

pub fn orbital_energy_j_per_kg(orbit: IoOrbit, distance_m: f64) -> f64 {
    let speed = orbit.orbital_speed_m_s(distance_m);
    0.5 * speed.powi(2) - 1.266_86e17 / distance_m
}

pub fn resonance_offset_deg(orbit: IoOrbit, spin_period_s: f64) -> f64 {
    let orbital_period = orbit.orbital_period_s();
    360.0 * (spin_period_s - orbital_period) / orbital_period
}