Calculating the distance between geographical coordinates is based on some level of abstraction; it does not provide an exact distance, which is unattainable if one attempted to account for every irregularity in the surface of the earth.[1] Common abstractions for the surface between two geographic points are:
All abstractions above ignore changes in elevation. Calculation of distances which account for changes in elevation relative to the idealized surface are not discussed in this article.
Distance, is calculated between two points, and . The geographical coordinates of the two points, as (latitude, longitude) pairs, are and respectively. Which of the two points is designated as is not important for the calculation of distance.
Latitude and longitude coordinates on maps are usually expressed in degrees. In the given forms of the formulae below, one or more values must be expressed in the specified units to obtain the correct result. Where geographic coordinates are used as the argument of a trigonometric function, the values may be expressed in any angular units compatible with the method used to determine the value of the trigonometric function. Many electronic calculators allow calculations of trigonometric functions in either degrees or radians. The calculator mode must be compatible with the units used for geometric coordinates.
Differences in latitude and longitude are labeled and calculated as follows:
It is not important whether the result is positive or negative when used in the formulae below.
"Mean latitude" is labeled and calculated as follows:
Colatitude is labeled and calculated as follows:
Unless specified otherwise, the radius of the earth for the calculations below is:
= Distance between the two points, as measured along the surface of the earth and in the same units as the value used for radius unless specified otherwise.
Longitude has singularities at the Poles (longitude is undefined) and a discontinuity at the ±180° meridian. Also, planar projections of the circles of constant latitude are highly curved near the Poles. Hence, the above equations for delta latitude/longitude (, ) and mean latitude () may not give the expected answer for positions near the Poles or the ±180° meridian. Consider e.g. the value of (“east displacement”) when and are on either side of the ±180° meridian, or the value of (“mean latitude”) for the two positions (=89°, =45°) and (=89°, =−135°).
If a calculation based on latitude/longitude should be valid for all Earth positions, it should be verified that the discontinuity and the Poles are handled correctly. Another solution is to use n-vector instead of latitude/longitude, since this representation does not have discontinuities or singularities.
A planar approximation for the surface of the earth may be useful over small distances. The accuracy of distance calculations using this approximation become increasingly inaccurate as:
The shortest distance between two points in plane is a straight line. The Pythagorean theorem is used to calculate the distance between points in a plane.
Even over short distances, the accuracy of geographic distance calculations which assume a flat Earth depend on the method by which the latitude and longitude coordinates have been projected onto the plane. The projection of latitude and longitude coordinates onto a plane is the realm of cartography.
The formulae presented in this section provide varying degrees of accuracy.
This formula takes into account the variation in distance between meridians with latitude:
The FCC prescribes essentially the following formulae in 47 CFR 73.208 for distances not exceeding 475 km /295 miles:[2]
If we are willing to accept a possible error of 0.5%, we can use formulas of spherical trigonometry on the sphere that best approximates the surface of the earth.
The shortest distance along the surface of a sphere between two points on the surface is along the great-circle which contains the two points.
The great-circle distance article gives the formula for calculating the distance along a great-circle on a sphere about the size of the Earth. That article includes an example of the calculation.
A tunnel between points on Earth is defined by a line through three-dimensional space between the points of interest. The great circle chord length may be calculated as follows for the corresponding unit sphere:
The tunnel distance between points on the surface of a spherical Earth is . For short distances (), this underestimates the great circle distance by .
An ellipsoid approximates the surface of the earth much better than a sphere or a flat surface does. The shortest distance along the surface of an ellipsoid between two points on the surface is along the geodesic. Geodesics follow more complicated paths than great circles and in particular, they usually don‘t return to their starting positions after one circuit of the earth. This is illustrated in the figure on the right where f is taken to be 1/50 to accentuate the effect. Finding the geodesic between two points on the earth, the so-called inverse geodetic problem, was the focus of many mathematicians and geodesists over the course of the 18th and 19th centuries with major contributions by Clairaut,[3] Legendre,[4] Bessel,[5] and Helmert.[6] Rapp[7] provides a good summary of this work.
Methods for computing the geodesic distance are widely available in geographical information systems, software libraries, standalone utilities, and online tools. The most widely used algorithm is by Vincenty,[8] who uses a series which is accurate to third order in the flattening of the ellipsoid, i.e., about 0.5 mm; however, the algorithm fails to converge for points that are nearly anti-podal. (For details, see Vincenty‘s formulae.) This defect is cured in the algorithm given by Karney,[9] who employs series which are accurate to sixth order in the flattening. This results in an algorithm which is accurate to full double precision and which converges for arbitrary pairs of points on the earth. This algorithm is implemented in GeographicLib.[10]
The exact methods above are feasible when carrying out calculations on a computer. They are intended to give millimeter accuracy on lines of any length; we can use simpler formulas if we don‘t need millimeter accuracy, or if we do need millimeter accuracy but the line is short. Rapp,[11] Chap. 6, describes the Puissant method, the Gauss mid-latitude method, and the Bowring method.[12]
Lambert‘s formulae[13] give accuracy on the order of 10 meters over thousands of kilometers. First convert the latitudes , of the two points to reduced latitudes ,
where is the flattening. Then calculate the central angle in radians between two points and on a sphere in the usual way (law of cosines or haversine formula), with longitudes and being the same on the sphere as on the spheroid.
where is the equatorial radius of the chosen spheroid.
On the GRS 80 spheroid Lambert‘s formula is off by
Bowring maps the points to a sphere of radius R′, with latitude and longitude represented as φ′ and λ′. Define
where the second eccentricity squared is
The spherical radius is
(The Gaussian curvature of the ellipsoid at φ1 is 1/R′2.) The spherical coordinates are given by
where , , , . The resulting problem on the sphere may be solved using the techniques for great-circle navigation to give approximations for the spheroidal distance and bearing. Detailed formulas are given by Rapp,[11] §6.5 and Bowring.[12]
原文:http://www.cnblogs.com/zhoug2020/p/5414023.html