#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum DeimosZone {
    SmoothTerrain,
    CraterFloor,
    RidgeZone,
    EquatorialBulge,
    SubMarsPoint,
}

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

pub fn zone_from_lat_lon(latitude_deg: f64, longitude_deg: f64) -> SurfaceZone {
    if latitude_deg.abs() < 10.0 && longitude_deg.abs() < 30.0 {
        SurfaceZone {
            zone: DeimosZone::EquatorialBulge,
            mean_albedo: 0.07,
            regolith_depth_m: 120.0,
        }
    } else if (20.0..=30.0).contains(&latitude_deg) && (150.0..=170.0).contains(&longitude_deg) {
        SurfaceZone {
            zone: DeimosZone::CraterFloor,
            mean_albedo: 0.065,
            regolith_depth_m: 80.0,
        }
    } else if latitude_deg.abs() > 60.0 {
        SurfaceZone {
            zone: DeimosZone::RidgeZone,
            mean_albedo: 0.072,
            regolith_depth_m: 60.0,
        }
    } else if latitude_deg.abs() < 5.0 && (170.0..=190.0).contains(&longitude_deg) {
        SurfaceZone {
            zone: DeimosZone::SubMarsPoint,
            mean_albedo: 0.074,
            regolith_depth_m: 90.0,
        }
    } else {
        SurfaceZone {
            zone: DeimosZone::SmoothTerrain,
            mean_albedo: 0.068,
            regolith_depth_m: 100.0,
        }
    }
}
