callistos 0.0.3

Callisto celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[test]
fn dust_impact_ejecta_lofting() {
    let d = callistos::environment::dust::DustEnvironment::impact_ejecta();
    assert!(d.lofting_probability > 0.0);
    assert!(d.adhesion_risk(100.0) > 0.0);
}

#[test]
fn dust_settled_lower_risk() {
    let e = callistos::environment::dust::DustEnvironment::impact_ejecta();
    let s = callistos::environment::dust::DustEnvironment::settled_regolith();
    assert!(s.adhesion_risk(0.0) < e.adhesion_risk(0.0));
}

#[test]
fn radiation_nominal_surface_dose() {
    let r = callistos::environment::radiation::RadiationEnvironment::nominal_surface();
    assert!(r.effective_daily_dose_msv() > 0.0);
}

#[test]
fn radiation_sheltered_less_dose() {
    let nom = callistos::environment::radiation::RadiationEnvironment::nominal_surface();
    let shel = callistos::environment::radiation::RadiationEnvironment::sheltered(2.0);
    assert!(shel.effective_daily_dose_msv() < nom.effective_daily_dose_msv());
}

#[test]
fn annual_crew_dose_high() {
    let r = callistos::environment::radiation::RadiationEnvironment::nominal_surface();
    let annual = callistos::environment::radiation::annual_crew_dose_msv(r);
    assert!(annual > 100.0);
}

#[test]
fn thermal_surface_temp_in_range() {
    let t = callistos::environment::thermal::ThermalEnvironment {
        local_time_hours: 200.0,
        latitude_deg: 0.0,
        shadowed: false,
    };
    let temp = t.surface_temperature_k();
    assert!((80.0..=165.0).contains(&temp));
}

#[test]
fn shadow_reduces_temperature() {
    let lit = callistos::environment::thermal::ThermalEnvironment {
        local_time_hours: 200.0,
        latitude_deg: 0.0,
        shadowed: false,
    };
    let dark = callistos::environment::thermal::ThermalEnvironment {
        local_time_hours: 200.0,
        latitude_deg: 0.0,
        shadowed: true,
    };
    assert!(dark.surface_temperature_k() <= lit.surface_temperature_k());
}

#[test]
fn thermal_cycle_span_positive() {
    let span = callistos::environment::thermal::thermal_cycle_span_k(0.0);
    assert!(span > 0.0);
}