Struct Geodesic

Source
pub struct Geodesic {
    pub a: f64,
    pub f: f64,
    pub _f1: f64,
    pub _e2: f64,
    pub _ep2: f64,
    pub _b: f64,
    pub _c2: f64,
    pub GEODESIC_ORDER: usize,
    pub tiny_: f64,
    /* private fields */
}

Fields§

§a: f64§f: f64§_f1: f64§_e2: f64§_ep2: f64§_b: f64§_c2: f64§GEODESIC_ORDER: usize§tiny_: f64

Implementations§

Source§

impl Geodesic

Source

pub fn wgs84() -> Self

Source

pub fn equatorial_radius(&self) -> f64

Source

pub fn flattening(&self) -> f64

Source§

impl Geodesic

Source

pub fn new(a: f64, f: f64) -> Self

Source

pub fn _A3f(&self, eps: f64) -> f64

Source

pub fn _C3f(&self, eps: f64, c: &mut [f64])

Source

pub fn _C4f(&self, eps: f64, c: &mut [f64])

Source

pub fn _Lengths( &self, eps: f64, sig12: f64, ssig1: f64, csig1: f64, dn1: f64, ssig2: f64, csig2: f64, dn2: f64, cbet1: f64, cbet2: f64, outmask: u64, C1a: &mut [f64], C2a: &mut [f64], ) -> (f64, f64, f64, f64, f64)

Source

pub fn _InverseStart( &self, sbet1: f64, cbet1: f64, dn1: f64, sbet2: f64, cbet2: f64, dn2: f64, lam12: f64, slam12: f64, clam12: f64, C1a: &mut [f64], C2a: &mut [f64], ) -> (f64, f64, f64, f64, f64, f64)

Source

pub fn _Lambda12( &self, sbet1: f64, cbet1: f64, dn1: f64, sbet2: f64, cbet2: f64, dn2: f64, salp1: f64, calp1: f64, slam120: f64, clam120: f64, diffp: bool, C1a: &mut [f64], C2a: &mut [f64], C3a: &mut [f64], ) -> (f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64)

Source

pub fn _gen_inverse_azi( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, outmask: u64, ) -> (f64, f64, f64, f64, f64, f64, f64, f64)

Source

pub fn _gen_inverse( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, outmask: u64, ) -> (f64, f64, f64, f64, f64, f64, f64, f64, f64, f64)

Source

pub fn _gen_direct( &self, lat1: f64, lon1: f64, azi1: f64, arcmode: bool, s12_a12: f64, outmask: u64, ) -> (f64, f64, f64, f64, f64, f64, f64, f64, f64)

returns (a12, lat2, lon2, azi2, s12, m12, M12, M21, S12)

Source

pub fn area(&self) -> f64

Get the area of the geodesic in square meters

Trait Implementations§

Source§

impl Clone for Geodesic

Source§

fn clone(&self) -> Geodesic

Returns a copy 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 Debug for Geodesic

Source§

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

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

impl DirectGeodesic<(f64, f64)> for Geodesic

Source§

fn direct(&self, lat1: f64, lon1: f64, azi1: f64, s12: f64) -> (f64, f64)

See the documentation for the DirectGeodesic trait.

§Returns
  • lat2 latitude of point 2 (degrees).
  • lon2 longitude of point 2 (degrees).
Source§

impl DirectGeodesic<(f64, f64, f64)> for Geodesic

Source§

fn direct(&self, lat1: f64, lon1: f64, azi1: f64, s12: f64) -> (f64, f64, f64)

See the documentation for the DirectGeodesic trait.

§Returns
  • lat2 latitude of point 2 (degrees).
  • lon2 longitude of point 2 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
Source§

impl DirectGeodesic<(f64, f64, f64, f64)> for Geodesic

Source§

fn direct( &self, lat1: f64, lon1: f64, azi1: f64, s12: f64, ) -> (f64, f64, f64, f64)

See the documentation for the DirectGeodesic trait.

§Returns
  • lat2 latitude of point 2 (degrees).
  • lon2 longitude of point 2 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • m12 reduced length of geodesic (meters).
Source§

impl DirectGeodesic<(f64, f64, f64, f64, f64)> for Geodesic

Source§

fn direct( &self, lat1: f64, lon1: f64, azi1: f64, s12: f64, ) -> (f64, f64, f64, f64, f64)

See the documentation for the DirectGeodesic trait.

§Returns
  • lat2 latitude of point 2 (degrees).
  • lon2 longitude of point 2 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • M12 geodesic scale of point 2 relative to point 1 (dimensionless).
  • M21 geodesic scale of point 1 relative to point 2 (dimensionless).
Source§

impl DirectGeodesic<(f64, f64, f64, f64, f64, f64)> for Geodesic

Source§

fn direct( &self, lat1: f64, lon1: f64, azi1: f64, s12: f64, ) -> (f64, f64, f64, f64, f64, f64)

See the documentation for the DirectGeodesic trait.

§Returns
  • lat2 latitude of point 2 (degrees).
  • lon2 longitude of point 2 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • m12 reduced length of geodesic (meters).
  • M12 geodesic scale of point 2 relative to point 1 (dimensionless).
  • M21 geodesic scale of point 1 relative to point 2 (dimensionless).
Source§

impl DirectGeodesic<(f64, f64, f64, f64, f64, f64, f64, f64)> for Geodesic

Source§

fn direct( &self, lat1: f64, lon1: f64, azi1: f64, s12: f64, ) -> (f64, f64, f64, f64, f64, f64, f64, f64)

See the documentation for the DirectGeodesic trait.

§Returns
  • lat2 latitude of point 2 (degrees).
  • lon2 longitude of point 2 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • m12 reduced length of geodesic (meters).
  • M12 geodesic scale of point 2 relative to point 1 (dimensionless).
  • M21 geodesic scale of point 1 relative to point 2 (dimensionless).
  • S12 area under the geodesic (meters2).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64)> for Geodesic

Source§

fn inverse(&self, lat1: f64, lon1: f64, lat2: f64, lon2: f64) -> (f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64, f64)> for Geodesic

Source§

fn inverse(&self, lat1: f64, lon1: f64, lat2: f64, lon2: f64) -> (f64, f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • azi1 azimuth at point 1 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64, f64, f64)> for Geodesic

Source§

fn inverse( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, ) -> (f64, f64, f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
  • azi1 azimuth at point 1 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64, f64, f64, f64)> for Geodesic

Source§

fn inverse( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, ) -> (f64, f64, f64, f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
  • azi1 azimuth at point 1 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • m12 reduced length of geodesic (meters).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64, f64, f64, f64, f64)> for Geodesic

Source§

fn inverse( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, ) -> (f64, f64, f64, f64, f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
  • azi1 azimuth at point 1 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • M12 geodesic scale of point 2 relative to point 1 (dimensionless).
  • M21 geodesic scale of point 1 relative to point 2 (dimensionless).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64, f64, f64, f64, f64, f64)> for Geodesic

Source§

fn inverse( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, ) -> (f64, f64, f64, f64, f64, f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
  • azi1 azimuth at point 1 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • m12 reduced length of geodesic (meters).
  • M12 geodesic scale of point 2 relative to point 1 (dimensionless).
  • M21 geodesic scale of point 1 relative to point 2 (dimensionless).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<(f64, f64, f64, f64, f64, f64, f64, f64)> for Geodesic

Source§

fn inverse( &self, lat1: f64, lon1: f64, lat2: f64, lon2: f64, ) -> (f64, f64, f64, f64, f64, f64, f64, f64)

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
  • azi1 azimuth at point 1 (degrees).
  • azi2 (forward) azimuth at point 2 (degrees).
  • m12 reduced length of geodesic (meters).
  • M12 geodesic scale of point 2 relative to point 1 (dimensionless).
  • M21 geodesic scale of point 1 relative to point 2 (dimensionless).
  • S12 area under the geodesic (meters2).
  • a12 arc length of between point 1 and point 2 (degrees).
Source§

impl InverseGeodesic<f64> for Geodesic

Source§

fn inverse(&self, lat1: f64, lon1: f64, lat2: f64, lon2: f64) -> f64

See the documentation for the InverseGeodesic trait.

§Returns
  • s12 distance between point 1 and point 2 (meters).
Source§

impl PartialEq for Geodesic

Source§

fn eq(&self, other: &Geodesic) -> 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 PartialOrd for Geodesic

Source§

fn partial_cmp(&self, other: &Geodesic) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for Geodesic

Source§

impl StructuralPartialEq for Geodesic

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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, 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.