Documentation / @interstellar-tools/tracking / lookAngles
Function: lookAngles()
ts
function lookAngles(
elements: MeanElementsInterface,
observer: GeodeticCoordinatesInterface,
date: Date
): LookAnglesInterface;Defined in: satellites/look-angles.ts:157
The look angles to a satellite from a ground observer at a moment: where to point an antenna or a camera (azimuth and elevation), how far away the satellite is (range), and how fast that changes (range rate, for the Doppler shift).
Propagates the elements with SGP4 (propagate), turns the result with Earth (temeToEarthFixed) and finds the direction in the observer's local frame (lookAnglesFromEarthFixed).
Notes
- The satellite is above the horizon while
elevationis above 0; in practice trees, buildings and refraction set the limit a few degrees higher. - As accurate as the elements: about 1 km at the epoch, a few hundredths of a degree for a satellite 1 000 km away, growing by a few kilometres a day.
Parameters
| Parameter | Type | Description |
|---|---|---|
elements | MeanElementsInterface | The mean elements, from parseTle or parseOmm. |
observer | GeodeticCoordinatesInterface | The observer's geodetic latitude phi and longitude lambda in radians, and height h above the WGS 84 ellipsoid in m. |
date | Date | The moment, as a Date. |
Returns
The azimuth, elevation, range and range rate: see LookAnglesInterface.
Throws
- If
dateis not a validDate, or a value ofelementsorobserveris not a finite number. - If the observer's
phiis outside [-π/2, π/2], or SGP4 fails at that time, as in propagate.
Example
ts
const oslo = { phi: toRad(59.91), lambda: toRad(10.75), h: 20 };
const { azimuth, elevation } = lookAngles(iss, oslo, new Date());
elevation > 0; // the ISS is above Oslo's horizon