azimuth matlab,Azimuth between points on sphere or ellipsoid

该博文介绍了如何计算球面和椭球体上两点之间的方位角,包括大圆航线(great circle)和罗盘航线(rhumb line)的方位角。函数`azimuth`接受不同参数,如经纬度、椭球体定义和单位,返回角度值,可用于地理导航和距离计算。示例展示了在同一纬度线和经度线上的方位角计算。
摘要由CSDN通过智能技术生成

azimuth

Azimuth between points on sphere or ellipsoid

Syntax

az = azimuth(lat1,lon1,lat2,lon2)

az = azimuth(lat1,lon1,lat2,lon2,ellipsoid)

az = azimuth(lat1,lon1,lat2,lon2,units)

az = azimuth(lat1,lon1,lat2,lon2,ellipsoid,units)

az = azimuth(track,...)

Description

az = azimuth(lat1,lon1,lat2,lon2) calculates

the great circle azimuth from point 1 to point 2, for pairs of points

on the surface of a sphere. The input latitudes and longitudes can

be scalars or arrays of matching size. If you use a combination of

scalar and array inputs, the scalar inputs will be automatically expanded

to match the size of the arrays. The function measures azimuths clockwise

from north and expresses them in degrees or radians.

az = azimuth(lat1,lon1,lat2,lon2,ellipsoid) computes

the azimuth assuming that the points lie on the ellipsoid defined by the input

ellipsoid. ellipsoid is a referenceSphere, referenceEllipsoid, or oblateSpheroid object, or a vector of the form [semimajor_axis

eccentricity]. The default ellipsoid is a unit sphere.

az = azimuth(lat1,lon1,lat2,lon2,units) uses the input

units to define the angle units of az and the

latitude-longitude coordinates. Use 'degrees' (the default value), in

the range from 0 to 360, or 'radians', in the range from 0 to

2*pi.

az = azimuth(lat1,lon1,lat2,lon2,ellipsoid,units) specifies

both the ellipsoid vector and the units of az.

az = azimuth(track,...)

uses the input track to specify either a great circle or a

rhumb line azimuth calculation. Enter 'gc' for the

track (the default value), to obtain great circle

azimuths for a sphere or geodesic azimuths for an ellipsoid. (Hint to remember name: the

letters “g” and “c” are in both great circle and geodesic.)

Enter 'rh' for the track to obtain rhumb

line azimuths for either a sphere or an ellipsoid.

Examples

Find the azimuth between two points on the same parallel, for

example, (10ºN, 10ºE) and (10ºN, 40ºE). The azimuth

between two points depends on the track value

selected.

% Try the 'gc' track value.

az = azimuth('gc',10,10,10,40)

% Compare to the result obtained from the 'rh' track value.

az = azimuth('rh',10,10,10,40)

Find the azimuth between two points on the same meridian, say

(10ºN, 10ºE) and (40ºN, 10ºE):

% Try the 'gc' track .

az = azimuth(10,10,40,10)

% Compare to the 'rh' track .

az = azimuth('rh',10,10,40,10)

Rhumb lines and great circles coincide along meridians and the

Equator. The azimuths are the same because the paths coincide.

More About

Azimuth

An azimuth is the angle at which a smooth

curve crosses a meridian, taken clockwise from north. The North Pole

has an azimuth of 0º from every other point on the globe. You

can calculate azimuths for great circles or rhumb lines.

Geodesic

A geodesic is the shortest distance between

two points on a curved surface, such as an ellipsoid.

Great Circle

A great circle is a type of geodesic that

lies on a sphere. It is the intersection of the surface of a sphere

with a plane passing through the center of the sphere. For great circles,

the azimuth is calculated at the starting point of the great circle

path, where it crosses the meridian. In general, the azimuth along

a great circle is not constant. For more information, see Great Circles.

Rhumb Line

A rhumb line is a curve that crosses each

meridian at the same angle. For rhumb lines, the azimuth is the constant angle

between true north and the entire rhumb line passing through the two

points. For more information, see Rhumb Lines.

Algorithms

Azimuths over Long Geodesics

Azimuth calculations for geodesics degrade slowly with increasing

distance and can break down for points that are nearly antipodal or

for points close to the Equator. In addition, for calculations on

an ellipsoid, there is a small but finite input space. This space

consists of pairs of locations in which both points are nearly antipodal and both

points fall close to (but not precisely on) the Equator. In such cases,

you will receive a warning and az will be set to

NaN for the “problem pairs.”

Eccentricity

Geodesic azimuths on an ellipsoid are valid only for small eccentricities

typical of the Earth (for example, 0.08 or less).

Alternatives

If you are calculating both the distance and the azimuth, you

can call just the distance function. The function

returns the azimuth as the second output argument. It is unnecessary

to call azimuth separately.

Introduced before R2006a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值