Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · Satellites: orbital elements in, positions out

closeApproachfunction

The closest the two satellites come between from and to. The span is sampled every stepMs (60 seconds when left out), and the moment of the closest sample is then refined between its two neighbours, to a tenth of a second, because two satellites close in at several kilometres a second and the closest sample alone can be hundreds of kilometres too far. The uncertainty is the elements' own: the square root of the sum of the squares of the two satellites' rough uncertainties (1 km, and 1 km more for each day the elements have aged at that moment), not a published covariance. Two SGP4 calls a sample, and about 20 more for the refinement. It does not run again by itself.

Import it

import { closeApproach } from "@johnmorrisdotca/chikyu-earth/satellites";

Definition

function closeApproach(group: Satellites, a: number, b: number, from: number, to: number, stepMs?: number): { at: number; kilometres: number; uncertaintyKm: number; } | null

Parameters

NameTypeDescription
groupSatellites

The satellites.

anumber

The index of one satellite.

bnumber

The index of the other.

fromnumber

The start, milliseconds since the Unix epoch.

tonumber

The end.

stepMs (optional)number

The sample step, at least 1000.

Returns

{ at: number; kilometres: number; uncertaintyKm: number; } | null

The closest moment, or null when either satellite cannot be placed.

Examples

import { closeApproach, createSatellites } from "@johnmorrisdotca/chikyu-earth/satellites";

const group = createSatellites([]);
console.log(closeApproach(group, 0, 1, 0, 60_000));
null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.