callistos 0.0.1

Callisto celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct DustScattering {
    pub reference_opacity: f64,
    pub scale_height_m: f64,
}

impl DustScattering {
    pub fn impact_plume() -> Self {
        Self {
            reference_opacity: 0.04,
            scale_height_m: 8_000.0,
        }
    }

    pub fn opacity_at_height(&self, height_m: f64) -> f64 {
        self.reference_opacity * (-height_m / self.scale_height_m).exp()
    }
}