titanss 0.0.3

Titanss is a celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
use std::thread;
use std::time::Duration;

fn main() {
    let planet = titanss::interactions::saturns::ensure_saturns_binary_or_simulate();
    let orbit = titanss::physics::orbit::TitanOrbit::new();
    let rotation = titanss::physics::rotation::TitanRotation::new();
    let landing_site = titanss::geodata::landing_sites::primary_site();
    let exosphere = titanss::exosphere::species::reference_composition();
    let thermal = titanss::environment::thermal::ThermalEnvironment {
        local_time_hours: titanss::TITAN_DAY_HOURS * 0.5,
        latitude_deg: landing_site.latitude_deg,
        shadowed: false,
    };
    let ice = titanss::resources::water_ice::primary_deposit();
    let planet_view = titanss::observation::saturn_view::SaturnView::sub_saturn_default();
    let thermal_k = thermal.surface_temperature_k();
    let startup_score = titanss::H24_RUNTIME_HOURS as f64
        + planet.orbital_radius_km / 1.0e6
        + planet.orbital_period_days / 365.0
        + planet.orbital_angle_deg / 360.0
        + planet.rotation_period_h / 24.0
        + planet.rotation_angle_deg / 360.0
        + planet.axial_tilt_deg / 90.0
        + planet.surface_speed_m_s / 1_000.0
        + orbit.semi_major_axis_m / 1.0e9
        + orbit.orbital_period_s() / 1.0e6
        + rotation.sidereal_period_s / 1.0e6
        + landing_site.latitude_deg.abs() / 90.0
        + landing_site.longitude_deg.abs() / 180.0
        + exosphere.len() as f64
        + thermal_k / 1_000.0
        + ice.estimated_mass_kg.log10().max(0.0)
        + if planet_view.is_visible() { 1.0 } else { 0.0 }
        + if landing_site.name.is_empty() {
            0.0
        } else {
            1.0
        }
        + if matches!(
            planet.mode,
            titanss::interactions::saturns::SaturnRuntimeMode::Binary
        ) {
            1.0
        } else {
            0.5
        };
    let heartbeat = if startup_score.is_finite() && startup_score > 0.0 {
        Duration::from_secs(60)
    } else {
        Duration::from_secs(5)
    };
    loop {
        thread::sleep(heartbeat);
    }
}