Reference · Passes: when a satellite crosses the sky over a place
satelliteAtfunction
Where one satellite is in the sky over a place at one moment, and what the light is like: its direction and height, its distance, whether the Sun lights it, how high the Sun is, and how bright it looks.
Import it
import { satelliteAt } from "@johnmorrisdotca/chikyu-earth/passes";
Definition
function satelliteAt(set: ElementSet, observer: Observer, ms: number, options?: Pick<PassOptions, "magnitudes">): (PassPoint & { sunlit: boolean; sunAltitude: number; magnitude: number | undefined; }) | undefined
Parameters
| Name | Type | Description |
|---|---|---|
set | ElementSet | The satellite's elements. |
observer | Observer | Where the watcher stands. |
ms | number | The moment, milliseconds since the Unix epoch. |
options (optional) | Pick<PassOptions, "magnitudes"> |
|
Returns
(PassPoint & { sunlit: boolean; sunAltitude: number; magnitude: number | undefined; }) | undefined
Its place in the sky (altitude below 0 means below the horizon), sunlit, the Sun's altitude and the magnitude (undefined when it is in shadow or its standard magnitude is not known); undefined where SGP4 gives no place.
Examples
import { satelliteAt } from "@johnmorrisdotca/chikyu-earth/passes";
const iss = {
OBJECT_NAME: "ISS (ZARYA)",
EPOCH: "2026-11-02T10:25:21.580320",
MEAN_MOTION: 15.49150046,
ECCENTRICITY: 0.0007139,
INCLINATION: 51.6332,
RA_OF_ASC_NODE: 335.9757,
ARG_OF_PERICENTER: 339.3739,
MEAN_ANOMALY: 20.6961,
NORAD_CAT_ID: 25544,
BSTAR: 0.00012,
MEAN_MOTION_DOT: 0.0001,
MEAN_MOTION_DDOT: 0,
};
const where = satelliteAt(iss, { latitude: 51.5, longitude: -0.13 }, Date.UTC(2026, 10, 3, 12));
console.log(where?.compass, where?.altitude.toFixed(0));WSW -38What it prints (run when this page was built)