リファレンス · 地球周回軌道のカタログ: 軌道の分類、物体の種類、色、衛星群、パック形式のファイル(データは含みません)
packCatalogue関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Pack catalogue records into one file: a small header (the format, how many records, and meta, a few words of text such as where the data is from and when it was retrieved), a column for each number and, last, the names.
The epoch is kept to the microsecond and the mean motion in full; the angles, the eccentricity and the drag terms are kept as 32-bit floats (an angle to about 0.00003 degrees, well inside what the elements are good to).
A record whose numbers are not finite, or whose catalogue number is not a whole number from 0 up to 4,294,967,295, is refused with a PackError.
インポート
import { packCatalogue } from "@johnmorrisdotca/chikyu-earth/catalogue";
定義
function packCatalogue(records: readonly CatalogueRecord[], meta?: Readonly<Record<string, string>>): Uint8Array
引数
| 名前 | 型 | 説明 |
|---|---|---|
records | readonly CatalogueRecord[] | The records, in the order the file keeps them (at most |
meta (省略可) | Readonly<Record<string, string>> | Words to keep with the file (read back as |
戻り値
Uint8Array<ArrayBufferLike>
The bytes. Gzip them with gzipBytes for a file a site hosts.
例
import { packCatalogue, unpackCatalogue, type CatalogueRecord } from "@johnmorrisdotca/chikyu-earth/catalogue";
const record: CatalogueRecord = {
set: { OBJECT_NAME: "MADE-UP 1", OBJECT_ID: "2026-001A", EPOCH: "2026-11-08T04:12:35.430048", MEAN_MOTION: 15.2, ECCENTRICITY: 0.0002, INCLINATION: 53, RA_OF_ASC_NODE: 10, ARG_OF_PERICENTER: 90, MEAN_ANOMALY: 20, NORAD_CAT_ID: 1_000_001, BSTAR: 0.0001, MEAN_MOTION_DOT: 0.00001, MEAN_MOTION_DDOT: 0 },
kind: "DEB",
};
const bytes = packCatalogue([record], { group: "debris" });
const back = unpackCatalogue(bytes);
console.log(bytes.length, back.count, back.setAt(0).NORAD_CAT_ID, back.meta["group"]);165 1 1000001 debris出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。