moons 0.0.1

Moon celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct RegolithResource {
    pub ilmenite_fraction: f64,
    pub oxygen_yield_fraction: f64,
    pub bulk_density_kg_m3: f64,
}

impl RegolithResource {
    pub fn oxygen_mass_kg(&self, processed_mass_kg: f64) -> f64 {
        processed_mass_kg * self.oxygen_yield_fraction
    }

    pub fn titanium_feedstock_kg(&self, processed_mass_kg: f64) -> f64 {
        processed_mass_kg * self.ilmenite_fraction * 0.53
    }
}

pub fn mare_basalt_resource() -> RegolithResource {
    RegolithResource {
        ilmenite_fraction: 0.12,
        oxygen_yield_fraction: 0.38,
        bulk_density_kg_m3: 1_700.0,
    }
}