NETGeographicLib
1.38
|
.NET wrapper for GeographicLib::Geodesic. More...
#include <NETGeographicLib/Geodesic.h>
Public Member Functions | |
~Geodesic () | |
the destructor calls the finalizer. More... | |
Constructor | |
Geodesic (double a, double f) | |
Geodesic () | |
Direct geodesic problem specified in terms of distance. | |
double | Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
double | Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2) |
double | Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2) |
double | Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12) |
double | Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
double | Direct (double lat1, double lon1, double azi1, double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
Direct geodesic problem specified in terms of arc length. | |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2) |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2) |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12) |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12) |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
void | ArcDirect (double lat1, double lon1, double azi1, double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
General version of the direct geodesic solution. | |
double | GenDirect (double lat1, double lon1, double azi1, bool arcmode, double s12_a12, NETGeographicLib::Mask outmask, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
Inverse geodesic problem. | |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12) |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2) |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2) |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12) |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
double | Inverse (double lat1, double lon1, double lat2, double lon2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
General version of inverse geodesic solution. | |
double | GenInverse (double lat1, double lon1, double lat2, double lon2, NETGeographicLib::Mask outmask, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% azi1, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
Interface to GeodesicLine. | |
GeodesicLine^ | Line (double lat1, double lon1, double azi1, NETGeographicLib::Mask caps) |
Inspector functions. | |
double | MajorRadius [get] |
double | Flattening [get] |
double | EllipsoidArea [get] |
System::IntPtr^ | GetUnmanaged () |
.NET wrapper for GeographicLib::Geodesic.
This class allows .NET applications to access GeographicLib::Geodesic.
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 multiple 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 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 provided by Geodesic::ArcDirect. An arc length in excess of 180° 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 90°.
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. The quantities m12, M12, M21 which all specify the behavior of nearby geodesics obey addition rules. If points 1, 2, and 3 all lie on a single geodesic, then the following rules hold:
Additional functionality is provided by the GeodesicLine class, which allows a sequence of points along a geodesic to be computed.
The shortest distance returned by the solution of the inverse problem is (obviously) uniquely defined. However, in a few special cases there are multiple azimuths which yield the same shortest distance. Here is a catalog of those cases:
The calculations are accurate to better than 15 nm (15 nanometers) for the WGS84 ellipsoid. See Sec. 9 of arXiv:1102.1215v1 for details. The algorithms used by this class are based on series expansions using the flattening f as a small parameter. These are only accurate for |f| < 0.02; however reasonably accurate results will be obtained for |f| < 0.2. Here is a table of the approximate maximum error (expressed as a distance) for an ellipsoid with the same major radius as the WGS84 ellipsoid and different values of the flattening.
|f| error 0.01 25 nm 0.02 30 nm 0.05 10 um 0.1 1.5 mm 0.2 300 mm
For very eccentric ellipsoids, use GeodesicExact instead.
The algorithms are described in
For more information on geodesics see Geodesics on an ellipsoid of revolution.
C# Example:
Managed C++ Example:
Visual Basic Example:
INTERFACE DIFFERENCES:
A default constructor has been provided that assumes WGS84 parameters.
The MajorRadius, Flattening, and EllipsoidArea functions are implemented as properties.
The GenDirect, GenInverse, and Line functions accept the "capabilities mask" as a NETGeographicLib::Mask rather than an unsigned.
Definition at line 167 of file Geodesic.h.
NETGeographicLib::Geodesic::Geodesic | ( | double | a, |
double | f | ||
) |
Constructor for a ellipsoid with
[in] | a | equatorial radius (meters). |
[in] | f | flattening of ellipsoid. Setting f = 0 gives a sphere. Negative f gives a prolate ellipsoid. If f > 1, set flattening to 1/f. |
GeographicErr | if a or (1 − f ) a is not positive. |
NETGeographicLib::Geodesic::Geodesic | ( | ) |
Constructor for the WGS84 ellipsoid.
Referenced by ~Geodesic().
|
inline |
the destructor calls the finalizer.
Definition at line 200 of file Geodesic.h.
References Geodesic().
double NETGeographicLib::Geodesic::Direct | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | s12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
Solve the direct geodesic problem where the length of the geodesic is specified 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 negative. |
[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). |
lat1 should be in the range [−90°, 90°]; lon1 and azi1 should be in the range [−540°, 540°). The values of lon2 and azi2 returned are in the range [−180°, 180°).
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°.)
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.
double NETGeographicLib::Geodesic::Direct | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | s12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2 | ||
) |
See the documentation for Geodesic::Direct.
double NETGeographicLib::Geodesic::Direct | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | s12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2 | ||
) |
See the documentation for Geodesic::Direct.
double NETGeographicLib::Geodesic::Direct | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | s12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12 | ||
) |
See the documentation for Geodesic::Direct.
double NETGeographicLib::Geodesic::Direct | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | s12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for Geodesic::Direct.
double NETGeographicLib::Geodesic::Direct | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | s12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for Geodesic::Direct.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
Solve the direct geodesic problem where the length of the geodesic is specified 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 negative. |
[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). |
lat1 should be in the range [−90°, 90°]; lon1 and azi1 should be in the range [−540°, 540°). The values of lon2 and azi2 returned are in the range [−180°, 180°).
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°.)
The following functions are overloaded versions of Geodesic::Direct which omit some of the output parameters.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2 | ||
) |
See the documentation for Geodesic::ArcDirect.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2 | ||
) |
See the documentation for Geodesic::ArcDirect.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12 | ||
) |
See the documentation for Geodesic::ArcDirect.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12 | ||
) |
See the documentation for Geodesic::ArcDirect.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for Geodesic::ArcDirect.
void NETGeographicLib::Geodesic::ArcDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
double | a12, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for Geodesic::ArcDirect.
double NETGeographicLib::Geodesic::GenDirect | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
bool | arcmode, | ||
double | s12_a12, | ||
NETGeographicLib::Mask | outmask, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
The general direct geodesic problem. 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 s12_a12. |
[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 negative. |
[in] | outmask | a bitor'ed combination of NETGeographicLib::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 NETGeographicLib::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 NETGeographicLib::Mask::DISTANCE and arcmode is false, then s12 = s12_a12. It is not necessary to include NETGeographicLib::Mask::DISTANCE_IN in outmask; this is automatically included is arcmode is false.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
Solve the inverse geodesic problem.
[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 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). |
lat1 and lat2 should be in the range [−90°, 90°]; lon1 and lon2 should be in the range [−540°, 540°). The values of azi1 and azi2 returned are in the range [−180°, 180°).
If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = ±(90° − ε), and taking the limit ε → 0+.
The solution to the inverse problem is found using Newton's method. If this fails to converge (this is very unlikely in geodetic applications but does occur for very eccentric ellipsoids), then the bisection method is used to refine the solution.
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.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | s12 | ||
) |
See the documentation for Geodesic::Inverse.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2 | ||
) |
See the documentation for Geodesic::Inverse.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2 | ||
) |
See the documentation for Geodesic::Inverse.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12 | ||
) |
See the documentation for Geodesic::Inverse.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for Geodesic::Inverse.
double NETGeographicLib::Geodesic::Inverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for Geodesic::Inverse.
double NETGeographicLib::Geodesic::GenInverse | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2, | ||
NETGeographicLib::Mask | outmask, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | azi1, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
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 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). |
The Geodesic::mask values possible for outmask are
The arc length is always computed and returned as the function value.
GeodesicLine ^ NETGeographicLib::Geodesic::Line | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
NETGeographicLib::Mask | caps | ||
) |
Set up to compute several points on a single geodesic.
[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 NETGeographicLib::Mask values specifying the capabilities the GeodesicLine object should possess, i.e., which quantities can be returned in calls to GeodesicLine::Position. |
lat1 should be in the range [−90°, 90°]; lon1 and azi1 should be in the range [−540°, 540°).
The NETGeographicLib::Mask values are
If the point is at a pole, the azimuth is defined by keeping lon1 fixed, writing lat1 = ±(90 − ε), and taking the limit ε → 0+.
System::IntPtr ^ NETGeographicLib::Geodesic::GetUnmanaged | ( | ) |
return The unmanaged pointer to the GeographicLib::Geodesic.
This function is for internal use only.
|
get |
Definition at line 664 of file Geodesic.h.
|
get |
Definition at line 670 of file Geodesic.h.
|
get |
Definition at line 678 of file Geodesic.h.