Reference · Satellites: orbital elements in, positions out
withinfunction
Every satellite within radius of a target, nearest first. Kilometres for by: "space", degrees for by: "sky". The same one pass as nearest.
Import it
import { within } from "@johnmorrisdotca/chikyu-earth/satellites";
Definition
function within(group: Satellites, target: NearestTarget, radius: number, options: Omit<NearestOptions, "count" | "within">): Neighbour[]
Parameters
| Name | Type | Description |
|---|---|---|
group | Satellites | The satellites. |
target | NearestTarget | A place, a direction, or a satellite. |
radius | number | The limit, in the unit |
options | Omit<NearestOptions, "count" | "within"> | As |
Returns
Neighbour[]
The neighbours inside the limit.
Examples
import { createSatellites, within } from "@johnmorrisdotca/chikyu-earth/satellites";
const group = createSatellites([]);
console.log(within(group, { place: { lon: 0, lat: 0 } }, 1000, { date: Date.UTC(2026, 10, 2) }).length);0What it prints (run when this page was built)