Compute the azimuth (in degrees), elevation
angle (in degrees), and line of sight distance from Zermatt, Switzerland
to the summit of the Matterhorn (Monte Cervino). All distances and
lengths are in meters.

Origin (reference point): Zermatt.

fmt = get(0,'Format');
format short g
lat0 = dm2degrees([46 1]) % convert degree-minutes to degrees
lon0 = dm2degrees([ 7 45])
hOrthometric0 = 1620;
hGeoid = 53;
h0 = hOrthometric0 + hGeoid

lat0 =
46.017
lon0 =
7.75
h0 =
1673

Point of Interest: Summit of Matterhorn.

lat = dms2degrees([45 58 35])
lon = dms2degrees([ 7 39 30])
hOrthometric = 4478;
hGeoid = 53;
h = hOrthometric + hGeoid

lat =
45.976
lon =
7.6583
h =
4531

Azimuth, elevation angle, and slant range (line of sight
distance) from Zermatt to Matterhorn summit.

[az,elev,slantRange] = geodetic2aer( ...
lat,lon,h,lat0,lon0,h0,wgs84Ellipsoid)
format(fmt)

az =
237.8
elev =
18.755
slantRange =
8871.7