TOC  |              |              | 


xyz2llh - Converts geocentric X, Y, Z to or from geodetic latitude, longitude, and height.

xyz2llh {-dhrw} coordinates
where:
-d = print deg min sec rather than decimal degrees,
-h = print help message,
-r = input lat, lon, and hgt, output will be X, Y, Z,
-w = output longitude is west rather than east longitude.


DESCRIPTION

xyz2llh is a command-line driven program suitable for manual use or as a command in a script. The conversion functions are those distributed by the U.S. Naval Observatory but were converted from Fortran to C. These functions have the desirable characteristic that they are non-iterative.

NOTES: The GRS80 semi-major axis and flattening for the are are used.

EXAMPLES

Values returned by the program will be shown in fixed width font.
Convert from X, Y, Z to latitude, east longitude and height:
xyz2llh 961334.7587 -5674074.1176 2740536.1299
  25.61378756  279.61606921 -15.23416785

Convert from X, Y, Z to latitude, west longitude and height:
xyz2llh -w 961334.7587 -5674074.1176 2740536.1299
  25.61378756   80.38393079 -15.23416785

Convert from X, Y, Z to latitude and east longitude as degrees, minutes and seconds, and height:
xyz2llh -d 961334.7587 -5674074.1176 2740536.1299
  25 36 49.63523 279 36 57.84917 -15.23416785

Convert from latitude, west longitude and height to X, Y, Z:
xyz2llh -r 25.61378756 279.61606921 -15.23416785
  961334.7585 -5674074.1178 2740536.1296



 TOC  |              |              | 


xyz2llh.html
January 14, 2000