#[derive(Debug, Clone, Copy, PartialEq)]
pub struct CryoEruption {
pub name: &'static str,
pub vent_temperature_k: f64,
pub active: bool,
}
impl CryoEruption {
pub fn activity_index(&self) -> f64 {
if self.active {
self.vent_temperature_k / 125.0
} else {
0.0
}
}
}
pub fn chaos_terrain_eruption() -> CryoEruption {
CryoEruption {
name: "Conamara Chaos Eruption",
vent_temperature_k: 125.0,
active: true,
}
}
pub fn thera_macula_eruption() -> CryoEruption {
CryoEruption {
name: "Thera Macula Eruption",
vent_temperature_k: 110.0,
active: true,
}
}
pub fn estimated_plume_height_km(vent_temp_k: f64) -> f64 {
(vent_temp_k - 50.0).max(0.0) * 2.5
}