pub struct ObservatoryTable { /* private fields */ }Expand description
Lookup table from MPC observatory code to parallax coefficients.
Optionally carries an EarthOrientation kernel that rotates ground-
based observatory positions from ITRF93 into ICRF. Without one, queries
for ground observatories return Error::MissingEarthOrientation rather
than falling back to an approximation.
Implementations§
Source§impl ObservatoryTable
impl ObservatoryTable
Sourcepub fn from_json(path: &Path) -> Result<Self>
pub fn from_json(path: &Path) -> Result<Self>
Load from obscodes_extended.json.
Expected format: JSON object whose keys are MPC observatory codes. Each value is one of:
- Ground/geocentric — has all four fields:
Longitude(deg),cos(cos(geocentric_lat) × ρ/R_eq),sin(same with sin),Name. - Space-based — has only
Name; no surface coordinates.
Partial entries (e.g. Longitude without cos/sin) are rejected
rather than silently filled with NaN/zero defaults.
Sourcepub fn with_earth_orientation(self, eo: EarthOrientation) -> Self
pub fn with_earth_orientation(self, eo: EarthOrientation) -> Self
Attach an EarthOrientation so ground-observer states can be
rotated from ITRF93 into ICRF.
Sourcepub fn get(&self, code: &str) -> Option<&ObservatoryEntry>
pub fn get(&self, code: &str) -> Option<&ObservatoryEntry>
Look up an observatory by its MPC code.
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ObservatoryTable
impl Clone for ObservatoryTable
Source§fn clone(&self) -> ObservatoryTable
fn clone(&self) -> ObservatoryTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ObservatoryTable
impl RefUnwindSafe for ObservatoryTable
impl Send for ObservatoryTable
impl Sync for ObservatoryTable
impl Unpin for ObservatoryTable
impl UnsafeUnpin for ObservatoryTable
impl UnwindSafe for ObservatoryTable
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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