marss 0.0.3

Mars celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
pub struct AncientChannel {
    pub name: &'static str,
    pub length_km: f64,
    pub width_km: f64,
    pub estimated_discharge_m3_s: f64,
    pub epoch: &'static str,
}

impl AncientChannel {
    pub fn depth_from_width(&self) -> f64 {
        0.1 * self.width_km.powf(0.4) * 1000.0
    }

    pub fn estimated_flow_velocity_m_s(&self) -> f64 {
        if self.width_km < 1e-10 {
            return 0.0;
        }
        let depth = self.depth_from_width();
        let area = self.width_km * 1000.0 * depth;
        self.estimated_discharge_m3_s / area
    }
}

pub fn kasei_valles() -> AncientChannel {
    AncientChannel {
        name: "Kasei Valles",
        length_km: 3000.0,
        width_km: 300.0,
        estimated_discharge_m3_s: 1e9,
        epoch: "Late Hesperian",
    }
}

pub fn ares_vallis() -> AncientChannel {
    AncientChannel {
        name: "Ares Vallis",
        length_km: 1700.0,
        width_km: 25.0,
        estimated_discharge_m3_s: 1e8,
        epoch: "Late Hesperian",
    }
}

pub fn ma_adim_vallis() -> AncientChannel {
    AncientChannel {
        name: "Ma'adim Vallis",
        length_km: 700.0,
        width_km: 20.0,
        estimated_discharge_m3_s: 5e6,
        epoch: "Noachian",
    }
}

pub fn valley_network_density() -> f64 {
    0.01
}

pub fn total_valley_network_length_km() -> f64 {
    89_000.0
}

pub fn major_channels() -> Vec<AncientChannel> {
    vec![kasei_valles(), ares_vallis(), ma_adim_vallis()]
}