Trait CoordinateSystem

Source
pub trait CoordinateSystem<AngularMeasure>
where Radians: From<AngularMeasure> + Copy, AngularMeasure: From<Radians> + Copy, Self: Sized,
{ // Required methods fn xyz_to_lle(c: &Xyz) -> Lle<Self, AngularMeasure>; fn xyz_to_enu(refr: &Lle<Self, AngularMeasure>, c: &Xyz) -> Enu; fn enu_to_xyz(refr: &Lle<Self, AngularMeasure>, c: &Enu) -> Xyz; fn lle_to_xyz(geo: &Lle<Self, AngularMeasure>) -> Xyz; // Provided methods fn enu_to_lle( refr: &Lle<Self, AngularMeasure>, c: &Enu, ) -> Lle<Self, AngularMeasure> { ... } fn lle_to_enu( r: &Lle<Self, AngularMeasure>, geo: &Lle<Self, AngularMeasure>, ) -> Enu { ... } }
Expand description

CoordinateSystem is a trait to enable converstion between locations (usually Latitude and Longitude, in the form of Lle objects) to absolute points in space and vice versa.

Different systems have different measurements of Earth’s surface, and a Latitude / Longitude must be understood within its CoordinateSystem, or significant errors can be introduced.

Required Methods§

Source

fn xyz_to_lle(c: &Xyz) -> Lle<Self, AngularMeasure>

Convert Xyz to Lle in our CoordinateSystem.

Source

fn xyz_to_enu(refr: &Lle<Self, AngularMeasure>, c: &Xyz) -> Enu

Convert Xyz to Enu, referenced to refr (Lle) in our CoordinateSystem.

Source

fn enu_to_xyz(refr: &Lle<Self, AngularMeasure>, c: &Enu) -> Xyz

Convert Enu to Xyz, referenced to refr (Lle) in our CoordinateSystem.

Source

fn lle_to_xyz(geo: &Lle<Self, AngularMeasure>) -> Xyz

Convert Lle to Xyz in our CoordinateSystem.

Provided Methods§

Source

fn enu_to_lle( refr: &Lle<Self, AngularMeasure>, c: &Enu, ) -> Lle<Self, AngularMeasure>

Convert Enu to Lle, referenced to refr (Lle) in our CoordinateSystem.

Source

fn lle_to_enu( r: &Lle<Self, AngularMeasure>, geo: &Lle<Self, AngularMeasure>, ) -> Enu

Convert Lle to Enu, referenced to refr (Lle) in our CoordinateSystem.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, AngularMeasure> CoordinateSystem<AngularMeasure> for T
where AngularMeasure: From<Radians> + Copy, Radians: From<AngularMeasure> + Copy, T: Wgs,