|
NAMEGeodSolve -- perform geodesic calculationsSYNOPSISGeodSolve [ -i | -L lat1 lon1 azi1 | -D lat1 lon1 azi1 s13 | -I lat1 lon1 lat3 lon3 ] [ -a ] [ -e a f ] [ -u ] [ -F ] [ -d | -: ] [ -w ] [ -b ] [ -f ] [ -p prec ] [ -E ] [ --comment-delimiter commentdelim ] [ --version | -h | --help ] [ --input-file infile | --input-string instring ] [ --line-separator linesep ] [ --output-file outfile ]DESCRIPTIONThe shortest path between two points on the 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 forward azimuths azi1 and azi2 at the two end points.GeodSolve operates in one of three modes:
OPTIONS
INPUTGeodSolve measures all angles in degrees and all lengths (s12) in meters, and all areas (S12) in meters^2. On input angles (latitude, longitude, azimuth, arc length) can be as decimal degrees or degrees, minutes, seconds. For example, "40d30", "40d30'", "40:30", "40.5d", and 40.5 are all equivalent. By default, latitude precedes longitude for each point (the -w flag switches this convention); however on input either may be given first by appending (or prepending) N or S to the latitude and E or W to the longitude. Azimuths are measured clockwise from north; however this may be overridden with E or W.For details on the allowed formats for angles, see the "GEOGRAPHIC COORDINATES" section of GeoConvert(1). AUXILIARY SPHEREGeodesics on the ellipsoid can be transferred to the auxiliary sphere on which the distance is measured in terms of the arc length a12 (measured in degrees) instead of s12. In terms of a12, 180 degrees is the distance from one equator crossing to the next or from the minimum latitude to the maximum latitude. Geodesics with a12 > 180 degrees do not correspond to shortest paths. With the -a flag, s12 (on both input and output) is replaced by a12. The -a flag does not affect the full output given by the -f flag (which always includes both s12 and a12).ADDITIONAL QUANTITIESThe -f flag reports four additional quantities.The reduced length of the geodesic, m12, is defined such that if the initial azimuth is perturbed by dazi1 (radians) then the second point is displaced by m12 dazi1 in the direction perpendicular to the geodesic. m12 is given in meters. On a curved surface the reduced length obeys a symmetry relation, m12 + m21 = 0. On a flat surface, we have m12 = s12. M12 and M21 are geodesic scales. If two geodesics are parallel at point 1 and separated by a small distance dt, then they are separated by a distance M12 dt at point 2. M21 is defined similarly (with the geodesics being parallel to one another at point 2). M12 and M21 are dimensionless quantities. On a flat surface, we have M12 = M21 = 1. If points 1, 2, and 3 lie on a single geodesic, then the following addition rules hold: s13 = s12 + s23, a13 = a12 + a23, S13 = S12 + S23, m13 = m12 M23 + m23 M21, M13 = M12 M23 - (1 - M12 M21) m23 / m12, M31 = M32 M21 - (1 - M23 M32) m12 / m23. Finally, S12 is the area between the geodesic from point 1 to point 2 and the equator; i.e., it is the area, measured counter-clockwise, of the geodesic quadrilateral with corners (lat1,lon1), (0,lon1), (0,lon2), and (lat2,lon2). It is given in meters^2. PRECISIONprec gives precision of the output with prec = 0 giving 1 m precision, prec = 3 giving 1 mm precision, etc. prec is the number of digits after the decimal point for lengths. For decimal degrees, the number of digits after the decimal point is prec + 5. For DMS (degree, minute, seconds) output, the number of digits after the decimal point in the seconds component is prec + 1. The minimum value of prec is 0 and the maximum is 10.ERRORSAn illegal line of input will print an error message to standard output beginning with "ERROR:" and causes GeodSolve to return an exit code of 1. However, an error does not cause GeodSolve to terminate; following lines will be converted.ACCURACYUsing the (default) series solution, GeodSolve is accurate to about 15 nm (15 nanometers) for the WGS84 ellipsoid. The approximate maximum error (expressed as a distance) for an ellipsoid with the same equatorial radius as the WGS84 ellipsoid and different values of the flattening is|f| error 0.01 25 nm 0.02 30 nm 0.05 10 um 0.1 1.5 mm 0.2 300 mm If -E is specified, GeodSolve is accurate to about 40 nm (40 nanometers) for the WGS84 ellipsoid. The approximate maximum error (expressed as a distance) for an ellipsoid with a quarter meridian of 10000 km and different values of the a/b = 1 - f is 1-f error (nm) 1/128 387 1/64 345 1/32 269 1/16 210 1/8 115 1/4 69 1/2 36 1 15 2 25 4 96 8 318 16 985 32 2352 64 6008 128 19024 MULTIPLE SOLUTIONSThe shortest distance returned for 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:
EXAMPLESRoute from JFK Airport to Singapore Changi Airport:echo 40:38:23N 073:46:44W 01:21:33N 103:59:22E | GeodSolve -i -: -p 0 003:18:29.9 177:29:09.2 15347628 Equally spaced waypoints on the route: for ((i = 0; i <= 10; ++i)); do echo $i/10; done | GeodSolve -I 40:38:23N 073:46:44W 01:21:33N 103:59:22E -F -: -p 0 40:38:23.0N 073:46:44.0W 003:18:29.9 54:24:51.3N 072:25:39.6W 004:18:44.1 68:07:37.7N 069:40:42.9W 006:44:25.4 81:38:00.4N 058:37:53.9W 017:28:52.7 83:43:26.0N 080:37:16.9E 156:26:00.4 70:20:29.2N 097:01:29.4E 172:31:56.4 56:38:36.0N 100:14:47.6E 175:26:10.5 42:52:37.1N 101:43:37.2E 176:34:28.6 29:03:57.0N 102:39:34.8E 177:07:35.2 15:13:18.6N 103:22:08.0E 177:23:44.7 01:21:33.0N 103:59:22.0E 177:29:09.2 SEE ALSOGeoConvert(1).An online version of this utility is availbable at <https://geographiclib.sourceforge.io/cgi-bin/GeodSolve>. The algorithms are described in C. F. F. Karney, Algorithms for geodesics, J. Geodesy 87, 43-55 (2013); DOI: <https://doi.org/10.1007/s00190-012-0578-z>; addenda: <https://geographiclib.sourceforge.io/geod-addenda.html>. The Wikipedia page, Geodesics on an ellipsoid, <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>. AUTHORGeodSolve was written by Charles Karney.HISTORYGeodSolve was added to GeographicLib, <https://geographiclib.sourceforge.io>, in 2009-03. Prior to version 1.30, it was called Geod. (The name was changed to avoid a conflict with the geod utility in proj.4.)
Visit the GSP FreeBSD Man Page Interface. |