Geodesic calculations More...
#include <GeographicLib/Geodesic.hpp>
Public Types | |
enum | mask { NONE, LATITUDE, LONGITUDE, AZIMUTH, DISTANCE, DISTANCE_IN, REDUCEDLENGTH, GEODESICSCALE, AREA, ALL } |
Public Member Functions | |
Constructor | |
Geodesic (real a, real r) | |
Direct geodesic problem specified in terms of distance. | |
Math::real | Direct (real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21, real &S12) const throw () |
Math::real | Direct (real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2) const throw () |
Math::real | Direct (real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2) const throw () |
Math::real | Direct (real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12) const throw () |
Math::real | Direct (real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &M12, real &M21) const throw () |
Math::real | Direct (real lat1, real lon1, real azi1, real s12, real &lat2, real &lon2, real &azi2, real &m12, real &M12, real &M21) const throw () |
Direct geodesic problem specified in terms of arc length. | |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const throw () |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2) const throw () |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2) const throw () |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12) const throw () |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12) const throw () |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &M12, real &M21) const throw () |
void | ArcDirect (real lat1, real lon1, real azi1, real a12, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21) const throw () |
General version of the direct geodesic solution. | |
Math::real | GenDirect (real lat1, real lon1, real azi1, bool arcmode, real s12_a12, unsigned outmask, real &lat2, real &lon2, real &azi2, real &s12, real &m12, real &M12, real &M21, real &S12) const throw () |
Inverse geodesic problem. | |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21, real &S12) const throw () |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &s12) const throw () |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &azi1, real &azi2) const throw () |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2) const throw () |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12) const throw () |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &M12, real &M21) const throw () |
Math::real | Inverse (real lat1, real lon1, real lat2, real lon2, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21) const throw () |
General version of inverse geodesic solution. | |
Math::real | GenInverse (real lat1, real lon1, real lat2, real lon2, unsigned outmask, real &s12, real &azi1, real &azi2, real &m12, real &M12, real &M21, real &S12) const throw () |
Interface to GeodesicLine. | |
GeodesicLine | Line (real lat1, real lon1, real azi1, unsigned caps=ALL) const throw () |
Inspector functions. | |
Math::real | MajorRadius () const throw () |
Math::real | InverseFlattening () const throw () |
Math::real | EllipsoidArea () const throw () |
Deprecated function. | |
Math::real | Direct (real lat1, real lon1, real azi1, real s12_a12, real &lat2, real &lon2, real &azi2, real &m12, bool arcmode) const throw () |
Static Public Attributes | |
static const Geodesic | WGS84 |
Friends | |
class | GeodesicLine |
Geodesic calculations
The shortest path between two points on a ellipsoid at (lat1, lon1) and (lat2, lon2) is called the geodesic. Its length is s12 and the geodesic from point 1 to point 2 has azimuths azi1 and azi2 at the two end points. (The azimuth is the heading measured clockwise from north. azi2 is the "forward" azimuth, i.e., the heading that takes you beyond point 2 not back to point 1.)
Given lat1, lon1, azi1, and s12, we can determine lat2, lon2, and azi2. This is the direct geodesic problem and its solution is given by the function Geodesic::Direct. (If s12 is sufficiently large that the geodesic wraps more than halfway around the earth, there will be another geodesic between the points with a smaller s12.)
Given lat1, lon1, lat2, and lon2, we can determine azi1, azi2, and s12. This is the inverse geodesic problem, whose solution is given by Geodesic::Inverse. Usually, the solution to the inverse problem is unique. In cases where there are muliple solutions (all with the same s12, of course), all the solutions can be easily generated once a particular solution is provided.
The standard way of specifying the direct problem is the specify the distance s12 to the second point. However it is sometimes useful instead to specify the the arc length a12 (in degrees) on the auxiliary sphere. This is a mathematical construct used in solving the geodesic problems. The solution of the direct problem in this form is provide by Geodesic::ArcDirect. An arc length in excess of 180o indicates that the geodesic is not a shortest path. In addition, the arc length between an equatorial crossing and the next extremum of latitude for a geodesic is 90o.
This class can also calculate several other quantities related to geodesics. These are:
Overloaded versions of Geodesic::Direct, Geodesic::ArcDirect, and Geodesic::Inverse allow these quantities to be returned. In addition there are general functions Geodesic::GenDirect, and Geodesic::GenInverse which allow an arbitrary set of results to be computed.
Additional functionality if provided by the GeodesicLine class, which allows a sequence of points along a geodesic to be computed.
The calculations are accurate to better than 15 nm. See Sec. 9 of arXiv:1102.1215 for details.
The algorithms are described in
For more information on geodesics see Geodesics on the Ellipsoid.
Definition at line 107 of file Geodesic.hpp.
Bit masks for what calculations to do. These masks do double duty. They signify to the GeodesicLine::GeodesicLine constructor and to Geodesic::Line what capabilities should be included in the GeodesicLine object. They also specify which results to return in the general routines Geodesic::GenDirect and Geodesic::GenInverse routines. GeodesicLine::mask is a duplication of this enum.
NONE |
No capabilities, no output. |
LATITUDE |
Calculate latitude lat2. (It's not necessary to include this as a capability to GeodesicLine because this is included by default.) |
LONGITUDE |
Calculate longitude lon2. |
AZIMUTH |
Calculate azimuths azi1 and azi2. (It's not necessary to include this as a capability to GeodesicLine because this is included by default.) |
DISTANCE |
Calculate distance s12. |
DISTANCE_IN |
Allow distance s12 to be used as input in the direct geodesic problem. |
REDUCEDLENGTH |
Calculate reduced length m12. |
GEODESICSCALE |
Calculate geodesic scales M12 and M21. |
AREA |
Calculate area S12. |
ALL |
All capabilities. Calculate everything. |
Definition at line 200 of file Geodesic.hpp.
GeographicLib::Geodesic::Geodesic | ( | real | a, | |
real | r | |||
) |
Constructor for a ellipsoid with
[in] | a | equatorial radius (meters) |
[in] | r | reciprocal flattening. Setting r = 0 implies r = inf or flattening = 0 (i.e., a sphere). Negative r indicates a prolate ellipsoid. |
An exception is thrown if either of the axes of the ellipsoid is non-positive.
Definition at line 50 of file Geodesic.cpp.
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21, | |||
real & | S12 | |||
) | const throw () [inline] |
Perform the direct geodesic calculation where the length of the geodesic is specify in terms of distance.
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | azi1 | azimuth at point 1 (degrees). |
[in] | s12 | distance between point 1 and point 2 (meters); it can be signed. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees). |
[out] | azi2 | (forward) azimuth at point 2 (degrees). |
[out] | m12 | reduced length of geodesic (meters). |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless). |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless). |
[out] | S12 | area under the geodesic (meters2). |
If either point is at a pole, the azimuth is defined by keeping the longitude fixed and writing lat = 90 - eps or -90 + eps and taking the limit eps -> 0 from above. An arc length greater that 180 degrees 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 degrees.)
The following functions are overloaded versions of Geodesic::Direct which omit some of the output parameters. Note, however, that the arc length is always computed and returned as the function value.
Definition at line 308 of file Geodesic.hpp.
References AREA, AZIMUTH, GenDirect(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.
Referenced by Direct().
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12, | |||
real & | lat2, | |||
real & | lon2 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Direct.
Definition at line 322 of file Geodesic.hpp.
References GenDirect(), LATITUDE, and LONGITUDE.
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Direct.
Definition at line 334 of file Geodesic.hpp.
References AZIMUTH, GenDirect(), LATITUDE, and LONGITUDE.
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | m12 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Direct.
Definition at line 346 of file Geodesic.hpp.
References AZIMUTH, GenDirect(), LATITUDE, LONGITUDE, and REDUCEDLENGTH.
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | M12, | |||
real & | M21 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Direct.
Definition at line 358 of file Geodesic.hpp.
References AZIMUTH, GenDirect(), GEODESICSCALE, LATITUDE, and LONGITUDE.
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Direct.
Definition at line 371 of file Geodesic.hpp.
References AZIMUTH, GenDirect(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | s12, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21, | |||
real & | S12 | |||
) | const throw () [inline] |
Perform the direct geodesic calculation where the length of the geodesic is specify in terms of arc length.
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | azi1 | azimuth at point 1 (degrees). |
[in] | a12 | arc length between point 1 and point 2 (degrees); it can be signed. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees). |
[out] | azi2 | (forward) azimuth at point 2 (degrees). |
[out] | s12 | distance between point 1 and point 2 (meters). |
[out] | m12 | reduced length of geodesic (meters). |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless). |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless). |
[out] | S12 | area under the geodesic (meters2). |
If either point is at a pole, the azimuth is defined by keeping the longitude fixed and writing lat = 90 - eps or -90 + eps and taking the limit eps -> 0 from above. An arc length greater that 180 degrees 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 degrees.)
The following functions are overloaded versions of Geodesic::Direct which omit some of the output parameters.
Definition at line 416 of file Geodesic.hpp.
References AREA, AZIMUTH, DISTANCE, GenDirect(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.
Referenced by Direct().
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2 | |||
) | const throw () [inline] |
See the documentation for Geodesic::ArcDirect.
Definition at line 429 of file Geodesic.hpp.
References GenDirect(), LATITUDE, and LONGITUDE.
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2 | |||
) | const throw () [inline] |
See the documentation for Geodesic::ArcDirect.
Definition at line 440 of file Geodesic.hpp.
References AZIMUTH, GenDirect(), LATITUDE, and LONGITUDE.
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | s12 | |||
) | const throw () [inline] |
See the documentation for Geodesic::ArcDirect.
Definition at line 451 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenDirect(), LATITUDE, and LONGITUDE.
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | s12, | |||
real & | m12 | |||
) | const throw () [inline] |
See the documentation for Geodesic::ArcDirect.
Definition at line 463 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenDirect(), LATITUDE, LONGITUDE, and REDUCEDLENGTH.
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | s12, | |||
real & | M12, | |||
real & | M21 | |||
) | const throw () [inline] |
See the documentation for Geodesic::ArcDirect.
Definition at line 476 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenDirect(), GEODESICSCALE, LATITUDE, and LONGITUDE.
void GeographicLib::Geodesic::ArcDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | s12, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21 | |||
) | const throw () [inline] |
See the documentation for Geodesic::ArcDirect.
Definition at line 489 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenDirect(), GEODESICSCALE, LATITUDE, LONGITUDE, and REDUCEDLENGTH.
Math::real GeographicLib::Geodesic::GenDirect | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
bool | arcmode, | |||
real | s12_a12, | |||
unsigned | outmask, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | s12, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21, | |||
real & | S12 | |||
) | const throw () |
The general direct geodesic calculation. Geodesic::Direct and Geodesic::ArcDirect are defined in terms of this function.
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | azi1 | azimuth at point 1 (degrees). |
[in] | arcmode | boolean flag determining the meaning of the second parameter. |
[in] | s12_a12 | if arcmode is false, this is the distance between point 1 and point 2 (meters); otherwise it is the arc length between point 1 and point 2 (degrees); it can be signed. |
[in] | outmask | a bitor'ed combination of Geodesic::mask values specifying which of the following parameters should be set. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees). |
[out] | azi2 | (forward) azimuth at point 2 (degrees). |
[out] | s12 | distance between point 1 and point 2 (meters). |
[out] | m12 | reduced length of geodesic (meters). |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless). |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless). |
[out] | S12 | area under the geodesic (meters2). |
The Geodesic::mask values possible for outmask are
The function value a12 is always computed and returned and this equals s12_a12 is arcmode is true. If outmask includes Geodesic::DISTANCE and arcmode is false, then s12 = s12_a12. It is not necessary to include Geodesic::DISTANCE_IN in outmask; this is automatically included is arcmode is false.
Definition at line 106 of file Geodesic.cpp.
Referenced by ArcDirect(), and Direct().
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | s12, | |||
real & | azi1, | |||
real & | azi2, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21, | |||
real & | S12 | |||
) | const throw () [inline] |
Perform the inverse geodesic calculation.
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | lat2 | latitude of point 2 (degrees). |
[in] | lon2 | longitude of point 2 (degrees). |
[out] | s12 | distance between point 1 and point 2 (meters). |
[out] | azi1 | azimuth at point 1 (degrees). |
[out] | azi2 | (forward) azimuth at point 1 (degrees). |
[out] | m12 | reduced length of geodesic (meters). |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless). |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless). |
[out] | S12 | area under the geodesic (meters2). |
If either point is at a pole, the azimuth is defined by keeping the longitude fixed and writing lat = 90 - eps or -90 + eps and taking the limit eps -> 0 from above. If the routine fails to converge, then all the requested outputs are set to Math::NaN(). This is not expected to happen with ellipsoidal models of the earth; please report all cases where this occurs.
The following functions are overloaded versions of Geodesic::Inverse which omit some of the output parameters. Note, however, that the arc length is always computed and returned as the function value.
Definition at line 586 of file Geodesic.hpp.
References AREA, AZIMUTH, DISTANCE, GenInverse(), GEODESICSCALE, and REDUCEDLENGTH.
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | s12 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Inverse.
Definition at line 598 of file Geodesic.hpp.
References DISTANCE, and GenInverse().
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | azi1, | |||
real & | azi2 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Inverse.
Definition at line 609 of file Geodesic.hpp.
References AZIMUTH, and GenInverse().
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | s12, | |||
real & | azi1, | |||
real & | azi2 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Inverse.
Definition at line 620 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, and GenInverse().
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | s12, | |||
real & | azi1, | |||
real & | azi2, | |||
real & | m12 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Inverse.
Definition at line 632 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenInverse(), and REDUCEDLENGTH.
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | s12, | |||
real & | azi1, | |||
real & | azi2, | |||
real & | M12, | |||
real & | M21 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Inverse.
Definition at line 644 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenInverse(), and GEODESICSCALE.
Math::real GeographicLib::Geodesic::Inverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
real & | s12, | |||
real & | azi1, | |||
real & | azi2, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21 | |||
) | const throw () [inline] |
See the documentation for Geodesic::Inverse.
Definition at line 656 of file Geodesic.hpp.
References AZIMUTH, DISTANCE, GenInverse(), GEODESICSCALE, and REDUCEDLENGTH.
Math::real GeographicLib::Geodesic::GenInverse | ( | real | lat1, | |
real | lon1, | |||
real | lat2, | |||
real | lon2, | |||
unsigned | outmask, | |||
real & | s12, | |||
real & | azi1, | |||
real & | azi2, | |||
real & | m12, | |||
real & | M12, | |||
real & | M21, | |||
real & | S12 | |||
) | const throw () |
The general inverse geodesic calculation. Geodesic::Inverse is defined in terms of this function.
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | lat2 | latitude of point 2 (degrees). |
[in] | lon2 | longitude of point 2 (degrees). |
[in] | outmask | a bitor'ed combination of Geodesic::mask values specifying which of the following parameters should be set. |
[out] | s12 | distance between point 1 and point 2 (meters). |
[out] | azi1 | azimuth at point 1 (degrees). |
[out] | azi2 | (forward) azimuth at point 1 (degrees). |
[out] | m12 | reduced length of geodesic (meters). |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless). |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless). |
[out] | S12 | area under the geodesic (meters2). |
The Geodesic::mask values possible for outmask are
The arc length is always computed and returned as the function value.
Definition at line 120 of file Geodesic.cpp.
References GeographicLib::Math::hypot(), and GeographicLib::Math::NaN().
Referenced by Inverse().
GeodesicLine GeographicLib::Geodesic::Line | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
unsigned | caps = ALL | |||
) | const throw () |
Set up to do a series of ranges.
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | azi1 | azimuth at point 1 (degrees). |
[in] | caps | bitor'ed combination of Geodesic::mask values specifying the capabilities the GeodesicLine object should possess, i.e., which quantities can be returned in calls to GeodesicLib::Position. |
The Geodesic::mask values are
The default value of caps is Geodesic::ALL which turns on all the capabilities.
If the point is at a pole, the azimuth is defined by keeping the lon1 fixed and writing lat1 = 90 - eps or -90 + eps and taking the limit eps -> 0 from above.
Definition at line 101 of file Geodesic.cpp.
Math::real GeographicLib::Geodesic::MajorRadius | ( | ) | const throw () [inline] |
Definition at line 759 of file Geodesic.hpp.
Referenced by GeographicLib::Gnomonic::MajorRadius(), GeographicLib::CassiniSoldner::MajorRadius(), and GeographicLib::AzimuthalEquidistant::MajorRadius().
Math::real GeographicLib::Geodesic::InverseFlattening | ( | ) | const throw () [inline] |
Definition at line 766 of file Geodesic.hpp.
Referenced by GeographicLib::Gnomonic::InverseFlattening(), GeographicLib::CassiniSoldner::InverseFlattening(), and GeographicLib::AzimuthalEquidistant::InverseFlattening().
Math::real GeographicLib::Geodesic::EllipsoidArea | ( | ) | const throw () [inline] |
Definition at line 774 of file Geodesic.hpp.
Math::real GeographicLib::Geodesic::Direct | ( | real | lat1, | |
real | lon1, | |||
real | azi1, | |||
real | s12_a12, | |||
real & | lat2, | |||
real & | lon2, | |||
real & | azi2, | |||
real & | m12, | |||
bool | arcmode | |||
) | const throw () [inline] |
DEPRECATED Perform the direct geodesic calculation. Given a latitude, lat1, longitude, lon1, and azimuth azi1 (degrees) for point 1 and a range, s12 (meters) from point 1 to point 2, return the latitude, lat2, longitude, lon2, and forward azimuth, azi2 (degrees) for point 2 and the reduced length m12 (meters). If either point is at a pole, the azimuth is defined by keeping the longitude fixed and writing lat = 90 - eps or -90 + eps and taking the limit eps -> 0 from above. If arcmode (default false) is set to true, s12 is interpreted as the arc length a12 (degrees) on the auxiliary sphere. An arc length greater that 180 degrees results in 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 degrees. Returned value is the arc length a12 (degrees) if arcmode is false, otherwise it is the distance s12 (meters).
Definition at line 805 of file Geodesic.hpp.
References ArcDirect(), and Direct().
friend class GeodesicLine [friend] |
Definition at line 110 of file Geodesic.hpp.
const Geodesic GeographicLib::Geodesic::WGS84 [static] |
A global instantiation of Geodesic with the parameters for the WGS84 ellipsoid.
Definition at line 782 of file Geodesic.hpp.