marss 0.0.3

Mars celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RegionType {
    Volcanic,
    Impact,
    Polar,
    Lowland,
    Highland,
    Canyon,
}

pub struct MarsRegion {
    pub name: &'static str,
    pub region_type: RegionType,
    pub center_lat_deg: f64,
    pub center_lon_deg: f64,
    pub area_km2: f64,
}

pub fn major_regions() -> Vec<MarsRegion> {
    vec![
        MarsRegion {
            name: "Tharsis",
            region_type: RegionType::Volcanic,
            center_lat_deg: 0.0,
            center_lon_deg: -110.0,
            area_km2: 30_000_000.0,
        },
        MarsRegion {
            name: "Elysium",
            region_type: RegionType::Volcanic,
            center_lat_deg: 25.0,
            center_lon_deg: 147.0,
            area_km2: 3_000_000.0,
        },
        MarsRegion {
            name: "Hellas Planitia",
            region_type: RegionType::Impact,
            center_lat_deg: -42.7,
            center_lon_deg: 70.0,
            area_km2: 7_600_000.0,
        },
        MarsRegion {
            name: "Valles Marineris",
            region_type: RegionType::Canyon,
            center_lat_deg: -14.0,
            center_lon_deg: -59.0,
            area_km2: 2_500_000.0,
        },
        MarsRegion {
            name: "Vastitas Borealis",
            region_type: RegionType::Lowland,
            center_lat_deg: 68.0,
            center_lon_deg: 30.0,
            area_km2: 37_000_000.0,
        },
        MarsRegion {
            name: "Terra Cimmeria",
            region_type: RegionType::Highland,
            center_lat_deg: -35.0,
            center_lon_deg: 145.0,
            area_km2: 5_000_000.0,
        },
        MarsRegion {
            name: "Planum Boreum",
            region_type: RegionType::Polar,
            center_lat_deg: 87.0,
            center_lon_deg: 0.0,
            area_km2: 1_000_000.0,
        },
        MarsRegion {
            name: "Planum Australe",
            region_type: RegionType::Polar,
            center_lat_deg: -87.0,
            center_lon_deg: 0.0,
            area_km2: 350_000.0,
        },
    ]
}

pub fn total_surface_area_km2() -> f64 {
    crate::MARS_SURFACE_AREA / 1e6
}

pub fn northern_lowlands_fraction() -> f64 {
    0.42
}

pub fn southern_highlands_fraction() -> f64 {
    0.58
}