Struct nyx_space::md::prelude::MetaAlmanac
pub struct MetaAlmanac {
pub files: Vec<MetaFile>,
}
Expand description
A structure to set up an Almanac, with automatic downloading, local storage, checksum checking, and more.
§Behavior
If the URI is a local path, relative or absolute, nothing will be fetched from a remote. Relative paths are relative to the execution folder (i.e. the current working directory). If the URI is a remote path, the MetaAlmanac will first check if the file exists locally. If it exists, it will check that the CRC32 checksum of this file matches that of the specs. If it does not match, the file will be downloaded again. If no CRC32 is provided but the file exists, then the MetaAlmanac will fetch the remote file and overwrite the existing file. The downloaded path will be stored in the “AppData” folder.
Fields§
§files: Vec<MetaFile>
Implementations§
§impl MetaAlmanac
impl MetaAlmanac
pub fn new(path: String) -> Result<MetaAlmanac, MetaAlmanacError>
pub fn new(path: String) -> Result<MetaAlmanac, MetaAlmanacError>
Loads the provided path as a Dhall configuration file and processes each file.
pub fn process(&mut self) -> Result<Almanac, AlmanacError>
pub fn process(&mut self) -> Result<Almanac, AlmanacError>
Fetch all of the URIs and return a loaded Almanac
pub fn latest() -> Result<Almanac, AlmanacError>
pub fn latest() -> Result<Almanac, AlmanacError>
Returns an Almanac loaded from the latest NAIF data via the default
MetaAlmanac.
The MetaAlmanac will download the DE440s.bsp file, the PCK0008.PCA, the full Moon Principal Axis BPC (moon_pa_de440_200625) and the latest high precision Earth kernel from JPL.
§File list
- http://public-data.nyxspace.com/anise/de440s.bsp
- http://public-data.nyxspace.com/anise/v0.4/pck11.pca
- http://public-data.nyxspace.com/anise/moon_pa_de440_200625.bpc
- https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/earth_latest_high_prec.bpc
§Reproducibility
Note that the earth_latest_high_prec.bpc
file is regularly updated daily (or so). As such,
if queried at some future time, the Earth rotation parameters may have changed between two queries.
§impl MetaAlmanac
impl MetaAlmanac
Trait Implementations§
§impl Clone for MetaAlmanac
impl Clone for MetaAlmanac
§fn clone(&self) -> MetaAlmanac
fn clone(&self) -> MetaAlmanac
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for MetaAlmanac
impl Debug for MetaAlmanac
§impl Default for MetaAlmanac
impl Default for MetaAlmanac
By default, the MetaAlmanac will download the DE440s.bsp file, the PCK0008.PCA, the full Moon Principal Axis BPC (moon_pa_de440_200625) and the latest high precision Earth kernel from JPL.
§File list
- http://public-data.nyxspace.com/anise/de440s.bsp
- http://public-data.nyxspace.com/anise/v0.4/pck11.pca
- http://public-data.nyxspace.com/anise/v0.4/moon_fk.epa
- http://public-data.nyxspace.com/anise/moon_pa_de440_200625.bpc
- https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/earth_latest_high_prec.bpc
§Reproducibility
Note that the earth_latest_high_prec.bpc
file is regularly updated daily (or so). As such,
if queried at some future time, the Earth rotation parameters may have changed between two queries.
§fn default() -> MetaAlmanac
fn default() -> MetaAlmanac
§impl<'de> Deserialize<'de> for MetaAlmanac
impl<'de> Deserialize<'de> for MetaAlmanac
§fn deserialize<__D>(
__deserializer: __D
) -> Result<MetaAlmanac, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MetaAlmanac, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl FromStr for MetaAlmanac
impl FromStr for MetaAlmanac
§impl PartialEq for MetaAlmanac
impl PartialEq for MetaAlmanac
§fn eq(&self, other: &MetaAlmanac) -> bool
fn eq(&self, other: &MetaAlmanac) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for MetaAlmanac
impl Serialize for MetaAlmanac
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for MetaAlmanac
Auto Trait Implementations§
impl Freeze for MetaAlmanac
impl RefUnwindSafe for MetaAlmanac
impl Send for MetaAlmanac
impl Sync for MetaAlmanac
impl Unpin for MetaAlmanac
impl UnwindSafe for MetaAlmanac
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.