missionPosition関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where a craft was at a moment, from the element set nearest in time (SGP4, the same as createSatellites). Elements more than two days from the moment give nothing, and so does a moment outside a flight when you pass its
mission (the orbiter is on the ground before liftoff and after landing). The sets of one craft are read once and kept for the next call.
インポート
import { missionPosition } from "@johnmorrisdotca/chikyu-earth/satellites";
定義
function missionPosition(sets: readonly ElementSet[], ms: number, mission?: Mission): MissionPosition | undefined
引数
| 名前 | 型 | 説明 |
|---|---|---|
sets | readonly ElementSet[] | The craft's element sets (from |
ms | number | The moment, in milliseconds since the Unix epoch. |
mission (省略可) | Mission | undefined | The flight, to hold the moment between its liftoff and landing when the sets are the flight's own craft (its |
戻り値
MissionPosition | undefined
The place, or undefined when there is none at that moment.
例
import { missionPosition } from "@johnmorrisdotca/chikyu-earth/satellites";
const sets = [
{
OBJECT_NAME: "STS 1 (OFT-1)",
EPOCH: "1981-04-12T11:53:25.728288",
MEAN_MOTION: 16.10930225,
ECCENTRICITY: 0.0008761,
INCLINATION: 40.3505,
RA_OF_ASC_NODE: 262.129,
ARG_OF_PERICENTER: 212.5283,
MEAN_ANOMALY: 147.5016,
NORAD_CAT_ID: 12399,
BSTAR: 0.002351,
MEAN_MOTION_DOT: 0.02496602,
MEAN_MOTION_DDOT: 0.0000043266,
},
];
const place = missionPosition(sets, Date.UTC(1981, 3, 12, 14));
console.log(place?.latitude.toFixed(1), place?.longitude.toFixed(1), place?.altitudeKm.toFixed(0));18.7 7.6 240出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。