moons 0.0.1

Moon celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct LinkBudget {
    pub distance_km: f64,
    pub tx_power_w: f64,
    pub antenna_gain_db: f64,
    pub path_loss_db: f64,
}

impl LinkBudget {
    pub fn received_margin_db(&self, required_margin_db: f64) -> f64 {
        self.tx_power_w.max(1e-6).log10() * 10.0 + self.antenna_gain_db
            - self.path_loss_db
            - required_margin_db
    }
}

pub fn earth_direct_to_home() -> LinkBudget {
    LinkBudget {
        distance_km: 384_400.0,
        tx_power_w: 40.0,
        antenna_gain_db: 28.0,
        path_loss_db: 212.0,
    }
}