EcefSpace

Struct EcefSpace 

Source
pub struct EcefSpace { /* private fields */ }
Expand description

A spatial context in Earth-Centered, Earth-Fixed (ECEF) coordinates.

EcefSpace represents a position in 3D Cartesian space relative to the Earth’s center of mass. It is commonly used in GNSS (e.g., GPS), satellite systems, and global geospatial models. The origin (0, 0, 0) is at the Earth’s center, with axes aligned to the WGS84 ellipsoid:

  • x: points toward the intersection of the equator and the prime meridian (0° lat/lon)
  • y: points toward 90° east longitude
  • z: points toward the north pole

§Fields

  • id: Unique identifier for the location
  • x: X-coordinate in meters
  • y: Y-coordinate in meters
  • z: Z-coordinate in meters

§Coordinate Index Mapping

When used with the Coordinate trait, the following index mapping applies:

  • 0 => x
  • 1 => y
  • 2 => z

§Trait Implementations

This type implements:

  • Identifiable
  • Coordinate<f64>
  • Metric using the Haversine approximation
  • Spatial<f64>
  • Display for human-readable output

Implementations§

Source§

impl EcefSpace

Source

pub fn x(&self) -> f64

Source

pub fn y(&self) -> f64

Source

pub fn z(&self) -> f64

Source§

impl EcefSpace

Source

pub fn new(id: u64, x: f64, y: f64, z: f64) -> Self

Trait Implementations§

Source§

impl Adjustable<f64> for EcefSpace

Source§

fn update<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<f64, W, H, D, C>, ) -> Result<(), UpdateError>

The default implementation does nothing to keep update optional. Override this method to implement a node update when needed. For a sample implementation, see src/types/context_types/node_types_adjustable
Source§

fn adjust<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<f64, W, H, D, C>, ) -> Result<(), AdjustmentError>

The default implementation does nothing to keep adjustment optional. Override this method to implement a node adjustment when needed. Depending on the type of node adjustment, select a 1, 2,3, or 4 dimensional array grid that contains the transformation data to apply to the node. For a sample implementation, see src/types/context_types/node_types_adjustable
Source§

impl Clone for EcefSpace

Source§

fn clone(&self) -> EcefSpace

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 Coordinate<f64> for EcefSpace

Source§

fn dimension(&self) -> usize

Returns the number of dimensions in the coordinate system (always 3).

Source§

fn coordinate(&self, index: usize) -> Result<&f64, IndexError>

Returns a reference to the coordinate value at the specified index.

§Index Mapping
  • 0 => x
  • 1 => y
  • 2 => z
§Errors

Returns IndexError if the index is out of bounds.

Source§

impl Debug for EcefSpace

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for EcefSpace

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Identifiable for EcefSpace

Source§

fn id(&self) -> u64

Source§

impl Metric<f64> for EcefSpace

Source§

fn distance(&self, other: &Self) -> f64

Computes a scalar distance or influence between self and other.
Source§

impl PartialEq for EcefSpace

Source§

fn eq(&self, other: &EcefSpace) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Spatial<f64> for EcefSpace

Source§

impl StructuralPartialEq for EcefSpace

Auto Trait Implementations§

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> Satisfies<NoConstraint> for T