phoboss 0.0.2

Phobos celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PhobosZone {
    StickneyBasin,
    LeadingHemisphere,
    TrailingHemisphere,
    GrooveRegion,
    RedUnit,
}

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

pub fn zone_from_lat_lon(latitude_deg: f64, longitude_deg: f64) -> SurfaceZone {
    if (35.0..=65.0).contains(&longitude_deg) && latitude_deg.abs() < 20.0 {
        SurfaceZone {
            zone: PhobosZone::StickneyBasin,
            mean_albedo: 0.075,
            regolith_depth_m: 20.0,
        }
    } else if longitude_deg > 180.0 {
        SurfaceZone {
            zone: PhobosZone::TrailingHemisphere,
            mean_albedo: 0.068,
            regolith_depth_m: 15.0,
        }
    } else if latitude_deg.abs() > 45.0 {
        SurfaceZone {
            zone: PhobosZone::GrooveRegion,
            mean_albedo: 0.070,
            regolith_depth_m: 8.0,
        }
    } else if (80.0..=120.0).contains(&longitude_deg) && latitude_deg.abs() < 15.0 {
        SurfaceZone {
            zone: PhobosZone::RedUnit,
            mean_albedo: 0.060,
            regolith_depth_m: 18.0,
        }
    } else {
        SurfaceZone {
            zone: PhobosZone::LeadingHemisphere,
            mean_albedo: 0.071,
            regolith_depth_m: 12.0,
        }
    }
}