pub trait CoordinateSystem<AngularMeasure>{
// 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§
Sourcefn xyz_to_lle(c: &Xyz) -> Lle<Self, AngularMeasure>
fn xyz_to_lle(c: &Xyz) -> Lle<Self, AngularMeasure>
Convert Xyz to Lle in our CoordinateSystem.
Sourcefn xyz_to_enu(refr: &Lle<Self, AngularMeasure>, c: &Xyz) -> Enu
fn xyz_to_enu(refr: &Lle<Self, AngularMeasure>, c: &Xyz) -> Enu
Convert Xyz to Enu, referenced to refr (Lle) in our
CoordinateSystem.
Sourcefn enu_to_xyz(refr: &Lle<Self, AngularMeasure>, c: &Enu) -> Xyz
fn enu_to_xyz(refr: &Lle<Self, AngularMeasure>, c: &Enu) -> Xyz
Convert Enu to Xyz, referenced to refr (Lle) in our
CoordinateSystem.
Sourcefn lle_to_xyz(geo: &Lle<Self, AngularMeasure>) -> Xyz
fn lle_to_xyz(geo: &Lle<Self, AngularMeasure>) -> Xyz
Convert Lle to Xyz in our CoordinateSystem.
Provided Methods§
Sourcefn enu_to_lle(
refr: &Lle<Self, AngularMeasure>,
c: &Enu,
) -> Lle<Self, AngularMeasure>
fn enu_to_lle( refr: &Lle<Self, AngularMeasure>, c: &Enu, ) -> Lle<Self, AngularMeasure>
Convert Enu to Lle, referenced to refr (Lle) in our
CoordinateSystem.
Sourcefn lle_to_enu(
r: &Lle<Self, AngularMeasure>,
geo: &Lle<Self, AngularMeasure>,
) -> Enu
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.