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 · The Sun, Moon and planets: pure parts

SatelliteScreentype

Where a satellite is on the screen now: in CSS pixels from the view's top left (which may lie outside the box), whether it can be seen, which edge it lies beyond, whether it is behind the camera, whether the Earth hides it, and how high it is.

Import it

import type { SatelliteScreen } from "@johnmorrisdotca/chikyu-earth/space";

Definition

interface SatelliteScreen {
    x: number;
    y: number;
    visible: boolean;
    heightKm: number;
    edge: ScreenEdge | null;
    behind: boolean;
    occluded: boolean;
    estimated: boolean;
}

Members

NameTypeDescription
xnumber
ynumber
visibleboolean

Inside the box, in front of the camera and not hidden by the Earth.

heightKmnumber

Height above the mean Earth radius, in kilometres, at the moment drawn.

edgeScreenEdge | null

The edge the satellite lies beyond, or null when its place is inside the box. Behind the camera, the edge is the way it lies in the camera's own axes, not the mirrored picture.

behindboolean

The satellite is behind the camera. The picture would put it on the opposite side, so edge is taken from the camera's own axes.

occludedboolean

The Earth hides the satellite: the line from the camera meets the globe before the satellite. False at the limb, in front, and when the satellite is only behind the camera.

estimatedboolean

Its place is an estimate (estimate-far): the moment shown is beyond maxAgeDays from its elements.

Examples

import type { SatelliteScreen } from "@johnmorrisdotca/chikyu-earth/space";

const seen = (place: SatelliteScreen | null): boolean => place !== null && place.visible;
console.log(typeof seen);
function

What it prints (run when this page was built)

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