[−][src]Trait geographiclib_rs::DirectGeodesic
Solve the direct geodesic problem where the length of the geodesic is specified in terms of distance.
Arguments
- lat1 - Latitude of 1st point [degrees] [-90.,90.]
- lon1 - Longitude of 1st point [degrees] [-180., 180.]
- azi1 - Azimuth at 1st point [degrees] [-180., 180.]
- s12 - Distance from 1st to 2nd point [meters] Value may be negative
Returns
There are a variety of outputs associated with this calculation. We save computation by only calculating the outputs you need. See the following impls which return different subsets of the following outputs:
- 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).
If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = ±(90° − ε), and taking the limit ε → 0+. An arc length greater that 180° signifies a geodesic which is not a shortest path. (For a prolate ellipsoid, an additional condition is necessary for a shortest path: the longitudinal extent must not exceed of 180°.)
// Example, determine the point 10000 km NE of JFK: use geographiclib_rs::{Geodesic, DirectGeodesic}; let g = Geodesic::wgs84(); let (lat, lon, az) = g.direct(40.64, -73.78, 45.0, 10e6); use assert_approx_eq::assert_approx_eq; assert_approx_eq!(lat, 32.621100463725796); assert_approx_eq!(lon, 49.05248709295982); assert_approx_eq!(az, 140.4059858768007);
Required methods
Loading content...Implementors
impl DirectGeodesic<(f64, f64)> for Geodesic
[src]
fn direct(&self, lat1: f64, lon1: f64, azi1: f64, s12: f64) -> (f64, f64)
[src]
See the documentation for the DirectGeodesic trait.
Returns
- lat2 latitude of point 2 (degrees).
- lon2 longitude of point 2 (degrees).
impl DirectGeodesic<(f64, f64, f64)> for Geodesic
[src]
fn direct(&self, lat1: f64, lon1: f64, azi1: f64, s12: f64) -> (f64, f64, f64)
[src]
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).
impl DirectGeodesic<(f64, f64, f64, f64)> for Geodesic
[src]
fn direct(
&self,
lat1: f64,
lon1: f64,
azi1: f64,
s12: f64
) -> (f64, f64, f64, f64)
[src]
&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).
impl DirectGeodesic<(f64, f64, f64, f64, f64)> for Geodesic
[src]
fn direct(
&self,
lat1: f64,
lon1: f64,
azi1: f64,
s12: f64
) -> (f64, f64, f64, f64, f64)
[src]
&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).
impl DirectGeodesic<(f64, f64, f64, f64, f64, f64)> for Geodesic
[src]
fn direct(
&self,
lat1: f64,
lon1: f64,
azi1: f64,
s12: f64
) -> (f64, f64, f64, f64, f64, f64)
[src]
&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).
impl DirectGeodesic<(f64, f64, f64, f64, f64, f64, f64, f64)> for Geodesic
[src]
fn direct(
&self,
lat1: f64,
lon1: f64,
azi1: f64,
s12: f64
) -> (f64, f64, f64, f64, f64, f64, f64, f64)
[src]
&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).