pub trait HaversineDestination<T: CoordFloat> {
fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>;
}
Expand description
Returns a new Point using the distance to the existing Point and a bearing for the direction
Note: this implementation uses a mean earth radius of 6371.088 km, based on the recommendation of the IUGG
Required Methods
fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>
fn haversine_destination(&self, bearing: T, distance: T) -> Point<T>
Returns a new Point using distance to the existing Point and a bearing for the direction
Units
bearing
: degreesdistance
: meters
Examples
use geo::HaversineDestination;
use geo::Point;
let p_1 = Point::new(9.177789688110352, 48.776781529534965);
let p_2 = p_1.haversine_destination(45., 10000.);
assert_eq!(p_2, Point::new(9.274409949623548, 48.84033274015048))