本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · 通過: 衛星が場所の空を通る時刻

skySvg関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 { skySvg } from "@johnmorrisdotca/chikyu-earth/passes";

定義

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

引数

名前型説明
passSatellitePass

A pass from findPasses.

pathreadonly PathPoint[]

Its track from passPath.

options (省略可)SkyOptions

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

戻り値

string

One <svg> element as text.

例

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.51.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。