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 · Passes: when a satellite crosses the sky over a place

skySvgfunction

A pass drawn on the sky as an SVG string: the horizon as a circle, the zenith (straight overhead) in the middle with rings at 30 and 60 degrees, north up and east on the left (the way a star chart is held over your head), and the satellite's track as a line that is solid and warm where the satellite is in sunlight and dashed where it is in the Earth's shadow, with its start, highest point and end marked. The dome is a dark sky whatever the page's colours; the four directions are written in the page's text colour. It is pure: the same arguments give the same markup.

Import it

import { skySvg } from "@johnmorrisdotca/chikyu-earth/passes";

Definition

function skySvg(pass: SatellitePass, path: readonly PathPoint[], options?: SkyOptions): string

Parameters

NameTypeDescription
passSatellitePass

A pass from findPasses.

pathreadonly PathPoint[]

Its track from passPath.

options (optional)SkyOptions

The size, the words and the times to write beside the marks.

Returns

string

One <svg> element as text.

Examples

import { findPasses, passPath, skySvg } 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 place = { latitude: 51.5, longitude: -0.13 };
const day = Date.UTC(2026, 10, 3);
const [first] = findPasses(iss, place, { from: day, to: day + 3 * 86_400_000 }, { all: true });
if (first) console.log(skySvg(first, passPath(iss, place, first), { size: 240 }).startsWith("<svg"));
true

What it prints (run when this page was built)

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