elevation

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

Local vertical elevation angle, range, and azimuth

Syntax

[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). 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 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 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.

Example

What is the elevation angle of a point 90 degrees distant when both the observer and target are 1000 km altitude 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);

See Also

almanac, azimuth, distance

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here