API Reference / horizonAltAt · function

Function: horizonAltAt()

function horizonAltAt(profile, azDeg): number;

Skyline altitude at an azimuth from an observer obstruction profile: piecewise-linear interpolation on the circle. The profile need not be sorted; azimuths are normalized to [0, 360) and the interpolation wraps across 360/0. An empty profile is the astronomical horizon (0 deg).

Parameters

ParameterType
profilereadonly HorizonPoint[]
azDegnumber

Returns

number

Start building

Quickstart →