#[derive(Debug, Clone, Copy, PartialEq)]
pub struct CryoFeature {
pub name: &'static str,
pub deposit_albedo: f64,
pub age_gyr: f64,
}
impl CryoFeature {
pub fn relative_youth_index(&self) -> f64 {
(4.5 - self.age_gyr).max(0.0) / 4.5
}
}
pub fn floor_deposit() -> CryoFeature {
CryoFeature {
name: "Floor deposit",
deposit_albedo: 0.30,
age_gyr: 3.0,
}
}
pub fn cryovolcanic_resurfacing_rate_mm_yr(heat_flux_mw_m2: f64) -> f64 {
heat_flux_mw_m2.max(0.0) * 0.001
}