Range and angle calculation
[rng,ang]
= rangeangle(pos)
[rng,ang]
= rangeangle(pos,refpos)
[rng,ang]
= rangeangle(pos,refpos,refaxes)
[rng,ang]
= rangeangle(___,model)
The function rangeangle
determines the
propagation path length and path direction of a signal from any point
to a reference point. The function supports two propagation models
— the free space model and the tworay model.
The free space model is a single lineofsight
path from a point to a reference point. The tworay multipath
model generates two paths. The first path follows the freespace path.
The second path is a reflected path off a boundary plane at z
= 0. Path directions are defined with respect to either
the global coordinate system at the reference point or a local coordinate
system at the reference point. Distances and angles at the reference
point do not depend upon which direction the signal is travelling
along the path. Path lengths are independent of the coordinate system.
[
returns the propagation
path length, rng
,ang
]
= rangeangle(pos
)rng
, and direction, ang
,
of a signal path from one point or set of points, pos
,
to the reference point. In this syntax, the reference point coincides
with the global coordinate system origin. Directions are specified
by azimuth and elevation angles with respect to the global coordinate
system. Signals follow a lineofsight path from the source to the
origin. The lineofsight path corresponds to the geometric straight
line between the points.
[
,
in addition, specifies a propagation model. When rng
,ang
]
= rangeangle(___,model
)model
is
set to 'freespace'
, the signal propagates along
a lineofsight path from source point to reception point. When model
is
set to 'tworay'
, the signal propagates along two
paths from source point to reception point. The first path is the
lineofsight path. The second path is the reflecting path. In this
case, the function returns the distances and angles for two paths
for each source point.

Point position, specified as a 3byN realvalued
matrix of rectangular coordinates where each column takes the form 

Reference position, specified as a realvalued 3by1 vector
of rectangular coordinates in the form Default: 

Local coordinate system axes, specified as a realvalued 3by3
matrix whose columns define the axes of the local coordinate system
with origin at Default: 

Propagation model, taking the value Default: 

Propagation distance, returned as a 1byM vector
of ranges from the source to the positions defined by the corresponding
columns in 

Azimuth and elevation angles, returned as a 2byM matrix
whose columns are angles in the form 
azel2phitheta
 azel2uv
 global2localcoord
 local2globalcoord