#[derive(Debug, Clone, Copy, PartialEq)]
pub struct DustScattering {
pub reference_opacity: f64,
pub scale_height_m: f64,
}
impl DustScattering {
pub fn volcanic_plume() -> Self {
Self {
reference_opacity: 0.40,
scale_height_m: 200_000.0,
}
}
pub fn opacity_at_height(&self, height_m: f64) -> f64 {
self.reference_opacity * (-height_m / self.scale_height_m).exp()
}
}