#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum JplDatasetId {
De440,
De441,
}
impl JplDatasetId {
pub const fn as_str(self) -> &'static str {
match self {
Self::De440 => "de440",
Self::De441 => "de441",
}
}
pub const fn meta(self) -> &'static JplDatasetMeta {
match self {
Self::De440 => &DE440,
Self::De441 => &DE441,
}
}
}
impl std::fmt::Display for JplDatasetId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(self.as_str())
}
}
#[derive(Debug, Clone)]
pub struct JplDatasetMeta {
pub name: &'static str,
pub url: &'static str,
pub filename: &'static str,
pub sha256: &'static str,
pub min_size: u64,
pub size_hint: &'static str,
}
pub static DE440: JplDatasetMeta = JplDatasetMeta {
name: "JPL DE440",
url: "https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440.bsp",
filename: "de440.bsp",
sha256: "a4ce9bf9b3282becc9f4b2ac3cebe03a2ae7599981aabd7265fd8482fff7c4b5",
min_size: 100_000_000,
size_hint: "~120 MB",
};
pub static DE441: JplDatasetMeta = JplDatasetMeta {
name: "JPL DE441 (part 2)",
url: "https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de441_part-2.bsp",
filename: "de441_part-2.bsp",
sha256: "3abb17dae2d78dd34880377544aacb54892104a0d4462b322cb9f4454d4887f6",
min_size: 1_500_000_000,
size_hint: "~1.65 GB",
};
pub const ALL_DATASETS: &[JplDatasetId] = &[JplDatasetId::De440, JplDatasetId::De441];