| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Mapping Toolbox |
| Contents | Index |
| Learn more about Mapping Toolbox |
[elevationangle,slantrange,azimuthangle]
= ...
elevation(lat1,lon1,alt1,lat2,lon2,alt2)
[...] = elevation(lat1,lon1,alt1,lat2,lon2,alt2,...
angleunits)
[...] = elevation(lat1,lon1,alt1,lat2,lon2,alt2,...
angleunits,distanceunits)
[...] = elevation(lat1,lon1,alt1,lat2,lon2,alt2,...
angleunits,ellipsoid)
[elevationangle,slantrange,azimuthangle]
= ...
elevation(lat1,lon1,alt1,lat2,lon2,alt2) computes
the elevation angle, slant range, and azimuth angle of point 2 (with
geodetic coordinates lat2, lon2,
and alt2) as viewed from point 1 (with geodetic
coordinates lat1, lon1, and alt1).
The coordinates alt1 and alt2 are
ellipsoidal heights. The elevation angle is the angle of the line
of sight above the local horizontal at point 1. The slant range is
the three-dimensional Cartesian distance between point 1 and point
2. The azimuth is the angle from north to the projection of the line
of sight on the local horizontal. Angles are in units of degrees;
altitudes and distances are in meters. The figure of the earth is
the default ellipsoid (GRS 80) as defined by almanac.
Inputs can be vectors of points, or arrays of any shape, but must match in size, with the following exception: Elevation, range, and azimuth from a single point to a set of points can be computed very efficiently by providing scalar coordinate inputs for point 1 and vectors or arrays for point 2.
[...] = elevation(lat1,lon1,alt1,lat2,lon2,alt2,...
angleunits) uses
the string angleunits to specify the units
of the input and output angles. If the string angleunits is
omitted, 'degrees' is assumed.
[...] = elevation(lat1,lon1,alt1,lat2,lon2,alt2,...
angleunits,distanceunits) uses
the string distanceunits to specify the
altitude and slant-range units. If the string distanceunits is
omitted, 'meters' is assumed. Any units string
recognized by unitsratio may be
used.
[...] = elevation(lat1,lon1,alt1,lat2,lon2,alt2,...
angleunits,ellipsoid) uses
the vector ellipsoid, with form [semimajor
axis,eccentricity], to specify the ellipsoid. If ellipsoid is
supplied, the altitudes must be in the same units as the semimajor
axis, and the slant range will be returned in these units. If ellipsoid is
omitted, the default earth ellipsoid defined by azimuth is
used, and distances are in meters unless otherwise specified.
Note The line-of-sight azimuth angles returned by elevation will generally differ slightly from the corresponding outputs of azimuth and distance, except for great circle azimuths on a spherical earth. |
Find the elevation angle of a point 90 degrees from an observer assuming that the observer and the target are both 1000 km above the Earth.
lat1 = 0; lon1 = 0; alt1 = 1000*1000; lat2 = 0; lon2 = 90; alt2 = 1000*1000; elevang = elevation(lat1,lon1,alt1,lat2,lon2,alt2) elevang = -45
Visually check the result using the los2 line of sight function. Construct a data grid of zeros to represent the Earth's surface. The los2 function with no output arguments creates a figure displaying the geometry.
Z = zeros(180,360); refvec = [1 90 -180]; los2(Z,refvec,lat1,lon1,lat2,lon2,alt1,alt1);

![]() | egm96geoid | ellipse1 | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |