Skip to main content

GroundLocation

Struct GroundLocation 

Source
pub struct GroundLocation<B: TrySpheroid> { /* private fields */ }
Expand description

A location on the surface of a celestial body.

Implementations§

Source§

impl<B: Spheroid> GroundLocation<B>

Infallible constructor — requires compile-time Spheroid guarantee.

Source

pub fn new(coordinates: LonLatAlt, body: B) -> Self

Creates a new ground location on a body that is guaranteed to be a spheroid.

Source§

impl<B: TrySpheroid> GroundLocation<B>

Fallible constructor — for DynOrigin and other TrySpheroid types.

Source

pub fn try_new(coordinates: LonLatAlt, body: B) -> Result<Self, &'static str>

Creates a new ground location, returning an error if the body has no spheroid.

Source§

impl<B: TrySpheroid + Into<DynOrigin>> GroundLocation<B>

Source

pub fn into_dyn(self) -> DynGroundLocation

Converts the ground location into a dynamic representation.

Source§

impl<B: TrySpheroid> GroundLocation<B>

Source

pub fn origin(&self) -> B
where B: Clone,

Returns the central body.

Source

pub fn coordinates(&self) -> LonLatAlt

Returns the geodetic coordinates.

Source

pub fn longitude(&self) -> f64

Returns the longitude in radians.

Source

pub fn latitude(&self) -> f64

Returns the latitude in radians.

Source

pub fn altitude(&self) -> f64

Returns altitude in km (for backward compatibility).

Source

pub fn body_fixed_position(&self) -> DVec3

Returns the body-fixed Cartesian position in meters.

Source

pub fn rotation_to_topocentric(&self) -> DMat3

Returns the rotation matrix from body-fixed to topocentric (SEZ) frame.

Source

pub fn compute_observables( &self, state_position: DVec3, state_velocity: DVec3, ) -> Observables

Computes topocentric observables from raw body-fixed position and velocity vectors.

Source

pub fn observables<T: TimeScale + Copy>( &self, state: CartesianOrbit<T, B, Iau<B>>, ) -> Observables

Computes topocentric observables from a Cartesian orbit in the body-fixed frame.

Source

pub fn observables_dyn(&self, state: DynCartesianOrbit) -> Observables

Computes topocentric observables from a dynamic Cartesian orbit.

Trait Implementations§

Source§

impl<B: Clone + TrySpheroid> Clone for GroundLocation<B>

Source§

fn clone(&self) -> GroundLocation<B>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B: Debug + TrySpheroid> Debug for GroundLocation<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<B> Freeze for GroundLocation<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for GroundLocation<B>
where B: RefUnwindSafe,

§

impl<B> Send for GroundLocation<B>
where B: Send,

§

impl<B> Sync for GroundLocation<B>
where B: Sync,

§

impl<B> Unpin for GroundLocation<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for GroundLocation<B>
where B: UnsafeUnpin,

§

impl<B> UnwindSafe for GroundLocation<B>
where B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.