MATLAB: How is the Antenna Toolbox “los” function calculated

Antenna Toolbox

How is the function los(tx,rx) calculated between the two sites "tx" and "rx"?

Best Answer

The "los" function performs an optical line-of-sight calculation and does not correct for the "radio horizon" or include refraction effects through the atmosphere. The primary intention of the function is to perform the calculation including the intervening terrain, and for most problems, the calculation is done using these steps:
1. Calculate the elevation angle from the observer to the target
2. Calculate the elevation angles from the observer to the terrain profile, which is a regular sampling of terrain points along the great circle path from observer to target
3. If any elevation angles in 2 are greater than the elevation angle in 1, then the line-of-sight is obstructed
For some cases where it appears that curvature of Earth is the dominant factor, the "los" function instead short-cuts to using a simple trig-based distance-to-horizon calculation:
maxVisibilityDistance = sqrt(2*earthRadius*h1+h1^2) + sqrt(2*earthRadius*h2+h2^2)