Skip to main content

DestinationStrategy

Trait DestinationStrategy 

Source
pub trait DestinationStrategy<P: Point> {
    type Output: Point;

    // Required method
    fn destination(
        &self,
        origin: &P,
        bearing: f64,
        distance: f64,
    ) -> Self::Output;
}
Expand description

Strategy computing the endpoint reached from a point, bearing, and distance.

Required Associated Types§

Source

type Output: Point

Destination point type.

Required Methods§

Source

fn destination(&self, origin: &P, bearing: f64, distance: f64) -> Self::Output

Compute the destination. bearing is measured clockwise from north in radians; distance uses the strategy’s radius or spheroid units.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P> DestinationStrategy<P> for Haversine
where P: Point<Scalar = f64>, P::Cs: HasAngularUnits, <P::Cs as CoordinateSystem>::Family: SameAs<SphericalFamily>,

Available on crate feature std only.
Source§

type Output = Point<f64, 2, <P as Point>::Cs>

Source§

impl<P> DestinationStrategy<P> for KarneyDirect
where P: Point<Scalar = f64>, P::Cs: HasAngularUnits, <P::Cs as CoordinateSystem>::Family: SameAs<GeographicFamily>,

Available on crate feature std only.
Source§

type Output = Point<f64, 2, <P as Point>::Cs>

Source§

impl<P> DestinationStrategy<P> for Rhumb
where P: Point<Scalar = f64>, P::Cs: HasAngularUnits + CoordinateSystem, <P::Cs as CoordinateSystem>::Family: RhumbFamily,

Source§

type Output = Point<f64, 2, <P as Point>::Cs>

Source§

impl<P> DestinationStrategy<P> for ThomasDirect
where P: Point<Scalar = f64>, P::Cs: HasAngularUnits, <P::Cs as CoordinateSystem>::Family: SameAs<GeographicFamily>,

Available on crate feature std only.
Source§

type Output = Point<f64, 2, <P as Point>::Cs>

Source§

impl<P> DestinationStrategy<P> for VincentyDirect
where P: Point<Scalar = f64>, P::Cs: HasAngularUnits, <P::Cs as CoordinateSystem>::Family: SameAs<GeographicFamily>,

Available on crate feature std only.
Source§

type Output = Point<f64, 2, <P as Point>::Cs>