# rangeangle

Range and angle calculation

## Syntax

## Description

The function `rangeangle`

determines the propagation path
length and path direction of a signal from a source point or set of source points to a
reference point. The function supports two propagation models – the *free
space* model and the *two-ray* model. The
*free space* model is a single line-of-sight path from a source
point to a reference point. The *two-ray* multipath model generates
two paths. The first path follows the free-space 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.

`[`

returns the propagation path length, `rng`

,`ang`

]
= rangeangle(`pos`

)`rng`

, and direction angles,
`ang`

, of a signal path from a source point or set of source
points, `pos`

, to the origin of the global coordinate system. The
direction angles are the azimuth and elevation with respect to the global coordinate
axes at the origin. Signals follow a line-of-sight path from the source point to the
origin. The line-of-sight path corresponds to the geometric straight line between
the points.

`[`

also specifies a reference point or set of reference points,
`rng`

,`ang`

]
= rangeangle(`pos`

,`refpos`

)`refpos`

. `rng`

now contains the
propagation path length from the source points to the reference points. The
direction angles are the azimuth and elevation with respect to the global coordinate
axes at the reference points. You can specify multiple points and multiple reference
points.

`[`

,
also specifies a propagation model. When `rng`

,`ang`

]
= rangeangle(___,`model`

)`model`

is set to
`"freespace"`

, the signal propagates along a line-of-sight path
from source point to reception point. When `model`

is set to
`"two-ray"`

, the signal propagates along two paths from source
point to reception point. The first path is the line-of-sight 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 and corresponding reference point.

## Examples

## Input Arguments

## Output Arguments

## More About

## Extended Capabilities

## Version History

**Introduced in R2019b**