#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TitaniaZone {
CrateredPlains,
ChascataFloor,
SmoothPlains,
PolarFrost,
FaultValley,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct SurfaceZone {
pub zone: TitaniaZone,
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() > 60.0 {
SurfaceZone {
zone: TitaniaZone::PolarFrost,
mean_albedo: 0.35,
regolith_depth_m: 5.0,
}
} else if (-40.0..=-20.0).contains(&latitude_deg) && (310.0..=350.0).contains(&longitude_deg) {
SurfaceZone {
zone: TitaniaZone::ChascataFloor,
mean_albedo: 0.28,
regolith_depth_m: 8.0,
}
} else if (0.0..=20.0).contains(&latitude_deg) && (100.0..=150.0).contains(&longitude_deg) {
SurfaceZone {
zone: TitaniaZone::FaultValley,
mean_albedo: 0.26,
regolith_depth_m: 6.0,
}
} else if longitude_deg > 180.0 {
SurfaceZone {
zone: TitaniaZone::SmoothPlains,
mean_albedo: 0.27,
regolith_depth_m: 10.0,
}
} else {
SurfaceZone {
zone: TitaniaZone::CrateredPlains,
mean_albedo: 0.27,
regolith_depth_m: 12.0,
}
}
}