Reference · Satellites: orbital elements in, positions out
nearestfunction
The satellites nearest a place, a direction in the sky, or another satellite, at one moment. One SGP4 call (exact) for each satellite that can be placed.
It does not run again by itself. by: "space" answers with kilometres; by: "sky" with the angle in degrees. Nearest first.
Import it
import { nearest } from "@johnmorrisdotca/chikyu-earth/satellites";
Definition
function nearest(group: Satellites, target: NearestTarget, options: NearestOptions): Neighbour[]
Parameters
| Name | Type | Description |
|---|---|---|
group | Satellites | The satellites, from |
target | NearestTarget | A place, a direction ( |
options | NearestOptions |
|
Returns
Neighbour[]
The neighbours, nearest first.
Examples
import { createSatellites, nearest } from "@johnmorrisdotca/chikyu-earth/satellites";
const group = createSatellites([]);
console.log(nearest(group, { place: { lon: 0, lat: 0 } }, { date: Date.UTC(2026, 10, 2) }).length);0What it prints (run when this page was built)