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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method 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

This method 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

This method 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> 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,

§

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>,

§

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>,

§

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.