本文へ移動

Chikyu Earth地球

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

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

目次

リファレンス · 人工衛星: 軌道要素から位置を計算

Satellites型

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

A group of satellites, ready to give positions for any moment: what createSatellites returns, and what <chikyu-space> takes in setSatellites. Positions are in Earth radii (6371 km) from the Earth's centre, in the space view's axes (x to the vernal equinox, y north); a satellite whose elements are older than maxAgeDays at the moment asked about is not placed (its place stays at the centre and visible(index) is false).

インポート

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

定義

interface Satellites {
    readonly count: number;
    readonly sets: readonly ElementSet[];
    readonly refused: readonly RefusedElementSet[];
    readonly maxAgeDays: number;
    readonly propagations: number;
    readonly timing: {
        lastBatchMs: number;
        maxBatchMs: number;
    };
    at(ms: number, out: Float32Array): void;
    visible(index: number): boolean;
    readonly placed: number;
    setStep(ms: number): void;
    exact(index: number, ms: number, out: Float64Array): boolean;
    orbit(index: number, ms: number, points: number): Float32Array;
    info(index: number, ms: number): SatelliteInfo | undefined;
}

メンバー

名前型説明
countnumber

Satellites that started SGP4.

setsreadonly ElementSet[]

Their elements, in the order of their places.

refusedreadonly RefusedElementSet[]

The ones left out, with the reason.

maxAgeDaysnumber

The oldest an element set may be at the moment shown, in days.

propagationsnumber

SGP4 calls made so far, for a page or a test to count.

timing{ lastBatchMs: number; maxBatchMs: number; }

Milliseconds the last batch of SGP4 took, and the longest so far.

at(ms: number, out: Float32Array): void

Fill out (3 numbers a satellite) with the positions at ms: SGP4 is run for the whole group at two moments step apart and the positions between are interpolated, so a steady clock costs one batch a step and every call in between is arithmetic.

visible(index: number): boolean

True if satellite index was placed by the last at (its elements are not too old at that moment).

placednumber

How many of them the last at placed.

setStep(ms: number): void

The game time between the two moments SGP4 is run at (1000 to 60000 ms); the space view sets it from the clock's speed.

exact(index: number, ms: number, out: Float64Array): boolean

One satellite at exactly ms (no interpolation): position in Earth radii and velocity in km/s into out (6 numbers). False if its elements are too old or SGP4 gave up.

orbit(index: number, ms: number, points: number): Float32Array

The path of satellite index for one revolution from ms, points + 1 points in order along it (the last on the first), into a new array of Earth radii.

info(index: number, ms: number): SatelliteInfo | undefined

Facts about one satellite at ms; undefined if it cannot be placed then.

例

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

const first = (group: Satellites): string => group.sets[0]?.OBJECT_NAME ?? "none";
console.log(typeof first);
function

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

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

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