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

sunAltitudefunction

The Sun's altitude over a place at a moment, in degrees (above 0 the Sun is up). It uses the package's own low-precision Sun, good to about 0.02 degree, and does not add refraction.

Import it

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

Definition

function sunAltitude(ms: number, observer: Observer): number

Parameters

NameTypeDescription
msnumber

A moment, in milliseconds since the Unix epoch.

observerObserver

Where the watcher stands.

Returns

number

The altitude of the Sun's centre, in degrees.

Examples

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

// Tokyo at 9 in the evening local time (12:00 UTC) on 9 November 2026
console.log(sunAltitude(Date.UTC(2026, 10, 9, 12), { latitude: 35.68, longitude: 139.69 }).toFixed(0));
-53

What it prints (run when this page was built)

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