Find the AER coordinates of the Matterhorn with respect to Zermatt, Switzerland, using the geodetic coordinates of Zermatt and the Matterhorn.
First, specify the reference spheroid as WGS 84. For more information about WGS 84, see Reference Spheroids. The units for ellipsoidal height and slant range must match the units specified by the LengthUnit property of the reference spheroid. The default length unit for the reference spheroid created by wgs84Ellipsoid is 'meter'.
wgs84 = wgs84Ellipsoid;
Specify the geodetic coordinates of the local origin. In this example, the local origin is Zermatt. Specify h0 as ellipsoidal height in meters.
lat0 = 46.017;
lon0 = 7.750;
h0 = 1673;
Specify the geodetic coordinates of the point of interest. In this example, the point of interest is the Matterhorn. Specify h as ellipsoidal height in meters.
lat = 45.977;
lon = 7.658;
h = 4531;
Then, calculate the AER coordinates of the Matterhorn with respect to Zermatt. To view the results in standard notation, specify the display format as shortG.
format shortG
[az,elev,slantRange] = geodetic2aer(lat,lon,h,lat0,lon0,h0,wgs84)
az =
238.08
elev =
18.744
slantRange =
8876.8
Reverse the transformation using the aer2geodetic function.
[lat,lon,h] = aer2geodetic(az,elev,slantRange,lat0,lon0,h0,wgs84)
lat =
45.977
lon =
7.658
h =
4531