Reference · Satellites: orbital elements in, positions out
Satellitestype
A group of satellites, ready to give positions for any moment: what createSatellites returns, and what <chikyu-space> takes in setSatellites.
Positions are in Earth radii (6371 km) from the Earth's centre, in the space view's axes (x to the vernal equinox, y north); a satellite whose elements
are older than maxAgeDays at the moment asked about is not placed (its place stays at the centre and visible(index) is false).
Import it
import type { Satellites } from "@johnmorrisdotca/chikyu-earth/satellites";
Definition
interface Satellites {
readonly count: number;
readonly sets: readonly ElementSet[];
readonly refused: readonly RefusedElementSet[];
readonly maxAgeDays: number;
readonly propagations: number;
readonly timing: {
lastBatchMs: number;
maxBatchMs: number;
};
at(ms: number, out: Float32Array): void;
visible(index: number): boolean;
readonly placed: number;
setStep(ms: number): void;
exact(index: number, ms: number, out: Float64Array): boolean;
orbit(index: number, ms: number, points: number): Float32Array;
info(index: number, ms: number): SatelliteInfo | undefined;
}
Members
| Name | Type | Description |
|---|---|---|
count | number | Satellites that started SGP4. |
sets | readonly ElementSet[] | Their elements, in the order of their places. |
refused | readonly RefusedElementSet[] | The ones left out, with the reason. |
maxAgeDays | number | The oldest an element set may be at the moment shown, in days. |
propagations | number | SGP4 calls made so far, for a page or a test to count. |
timing | { lastBatchMs: number; maxBatchMs: number; } | Milliseconds the last batch of SGP4 took, and the longest so far. |
at | (ms: number, out: Float32Array): void | Fill |
visible | (index: number): boolean | True if satellite |
placed | number | How many of them the last |
setStep | (ms: number): void | The game time between the two moments SGP4 is run at (1000 to 60000 ms); the space view sets it from the clock's speed. |
exact | (index: number, ms: number, out: Float64Array): boolean | One satellite at exactly |
orbit | (index: number, ms: number, points: number): Float32Array | The path of satellite |
info | (index: number, ms: number): SatelliteInfo | undefined | Facts about one satellite at |
Examples
import type { Satellites } from "@johnmorrisdotca/chikyu-earth/satellites";
const first = (group: Satellites): string => group.sets[0]?.OBJECT_NAME ?? "none";
console.log(typeof first);functionWhat it prints (run when this page was built)