jupiters 0.0.3

Jupiter celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone)]
pub struct Region {
    pub name: String,
    pub regiontype: RegionType,
    pub boundary: Vec<[f64; 2]>,
    pub areakm2: f64,
}

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum RegionType {
    AtmosphericBand,
    VortexRegion,
    PolarCap,
    StormSystem,
    CloudFeature,
}

pub struct RegionDatabase {
    pub regions: Vec<Region>,
}

impl RegionDatabase {
    pub fn atmosphericbands() -> Self {
        Self {
            regions: vec![
                Region {
                    name: "North Polar Region".into(),
                    regiontype: RegionType::PolarCap,
                    boundary: vec![[60.0, -180.0], [60.0, 180.0], [90.0, 180.0], [90.0, -180.0]],
                    areakm2: 3.2e9,
                },
                Region {
                    name: "North Temperate Belt".into(),
                    regiontype: RegionType::AtmosphericBand,
                    boundary: vec![[30.0, -180.0], [30.0, 180.0], [60.0, 180.0], [60.0, -180.0]],
                    areakm2: 8.0e9,
                },
                Region {
                    name: "North Equatorial Belt".into(),
                    regiontype: RegionType::AtmosphericBand,
                    boundary: vec![[7.0, -180.0], [7.0, 180.0], [30.0, 180.0], [30.0, -180.0]],
                    areakm2: 7.5e9,
                },
                Region {
                    name: "Equatorial Zone".into(),
                    regiontype: RegionType::AtmosphericBand,
                    boundary: vec![[-7.0, -180.0], [-7.0, 180.0], [7.0, 180.0], [7.0, -180.0]],
                    areakm2: 4.5e9,
                },
                Region {
                    name: "South Equatorial Belt".into(),
                    regiontype: RegionType::AtmosphericBand,
                    boundary: vec![
                        [-30.0, -180.0],
                        [-30.0, 180.0],
                        [-7.0, 180.0],
                        [-7.0, -180.0],
                    ],
                    areakm2: 7.5e9,
                },
                Region {
                    name: "South Temperate Belt".into(),
                    regiontype: RegionType::AtmosphericBand,
                    boundary: vec![
                        [-60.0, -180.0],
                        [-60.0, 180.0],
                        [-30.0, 180.0],
                        [-30.0, -180.0],
                    ],
                    areakm2: 8.0e9,
                },
                Region {
                    name: "South Polar Region".into(),
                    regiontype: RegionType::PolarCap,
                    boundary: vec![
                        [-90.0, -180.0],
                        [-90.0, 180.0],
                        [-60.0, 180.0],
                        [-60.0, -180.0],
                    ],
                    areakm2: 3.2e9,
                },
                Region {
                    name: "Great Red Spot".into(),
                    regiontype: RegionType::StormSystem,
                    boundary: vec![
                        [-28.0, 280.0],
                        [-28.0, 310.0],
                        [-16.0, 310.0],
                        [-16.0, 280.0],
                    ],
                    areakm2: 4.0e7,
                },
                Region {
                    name: "Oval BA".into(),
                    regiontype: RegionType::StormSystem,
                    boundary: vec![
                        [-36.0, 100.0],
                        [-36.0, 115.0],
                        [-30.0, 115.0],
                        [-30.0, 100.0],
                    ],
                    areakm2: 1.0e7,
                },
            ],
        }
    }
}