tritons 0.0.3

Triton celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[test]
fn height_profile_min_max() {
    let hp = tritons::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0]);
    let (min, max) = hp.min_max();
    assert!((min - 5.0).abs() < 1e-10);
    assert!((max - 20.0).abs() < 1e-10);
}

#[test]
fn roughness_index() {
    let hp = tritons::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0, 25.0]);
    assert!(hp.roughness_index() > 0.0);
}

#[test]
fn great_circle_distance() {
    let a = tritons::surface::mapping::TritonCoord::new(0.0, 0.0, 0.0);
    let b = tritons::surface::mapping::TritonCoord::new(10.0, 10.0, 0.0);
    assert!(tritons::surface::mapping::great_circle_distance_km(a, b) > 0.0);
}

#[test]
fn antipode() {
    let a = tritons::surface::mapping::TritonCoord::new(15.0, 30.0, 100.0);
    let b = tritons::surface::mapping::antipode(a);
    assert!((b.latitude_deg + 15.0).abs() < 1e-10);
}

#[test]
fn zone_classification() {
    let z = tritons::surface::zones::zone_from_lat_lon(0.0, 0.0);
    assert_eq!(z.zone, tritons::surface::zones::TritonZone::SmoothPlains);
    assert!((z.mean_albedo - 0.60).abs() < 1e-10);
    assert!((z.regolith_depth_m - 8.0).abs() < 1e-10);
}