ganymedes 0.0.3

Ganymede celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum GanymedeZone {
    GalileoRegio,
    BrightTerrain,
    SulcusGrooves,
    DarkTerrain,
    PolarFrost,
}

#[derive(Debug, Clone, Copy, PartialEq)]
pub struct SurfaceZone {
    pub zone: GanymedeZone,
    pub mean_albedo: f64,
    pub regolith_depth_m: f64,
}

pub fn zone_from_lat_lon(latitude_deg: f64, longitude_deg: f64) -> SurfaceZone {
    if (-10.0..=20.0).contains(&latitude_deg) && (120.0..=180.0).contains(&longitude_deg) {
        SurfaceZone {
            zone: GanymedeZone::GalileoRegio,
            mean_albedo: 0.20,
            regolith_depth_m: 12.0,
        }
    } else if (30.0..=60.0).contains(&latitude_deg) && (-60.0..=0.0).contains(&longitude_deg) {
        SurfaceZone {
            zone: GanymedeZone::SulcusGrooves,
            mean_albedo: 0.45,
            regolith_depth_m: 5.0,
        }
    } else if longitude_deg.abs() > 90.0 {
        SurfaceZone {
            zone: GanymedeZone::DarkTerrain,
            mean_albedo: 0.19,
            regolith_depth_m: 15.0,
        }
    } else if latitude_deg.abs() > 60.0 {
        SurfaceZone {
            zone: GanymedeZone::PolarFrost,
            mean_albedo: 0.50,
            regolith_depth_m: 4.0,
        }
    } else {
        SurfaceZone {
            zone: GanymedeZone::BrightTerrain,
            mean_albedo: 0.43,
            regolith_depth_m: 8.0,
        }
    }
}