PackedCataloguetype
A packed file, read: the columns as typed arrays (nothing is copied into objects until you ask) and the names.
Import it
import type { PackedCatalogue } from "@johnmorrisdotca/chikyu-earth/catalogue";
Definition
interface PackedCatalogue {
meta: Readonly<Record<string, string>>;
count: number;
norad: Uint32Array;
meanMotion: Float64Array;
eccentricity: Float32Array;
inclination: Float32Array;
raan: Float32Array;
argPerigee: Float32Array;
meanAnomaly: Float32Array;
kind: Uint8Array;
epochMs(i: number): number;
kindAt(i: number): ObjectKind;
nameAt(i: number): string;
setAt(i: number): ElementSet;
recordAt(i: number): CatalogueRecord;
sets(): ElementSet[];
records(): CatalogueRecord[];
}
Members
| Name | Type | Description |
|---|---|---|
meta | Readonly<Record<string, string>> | The words kept with the file. |
count | number | |
norad | Uint32Array<ArrayBufferLike> | The catalogue numbers, 32-bit. |
meanMotion | Float64Array<ArrayBufferLike> | Mean motion, revolutions a day. |
eccentricity | Float32Array<ArrayBufferLike> | |
inclination | Float32Array<ArrayBufferLike> | Degrees. |
raan | Float32Array<ArrayBufferLike> | Degrees. |
argPerigee | Float32Array<ArrayBufferLike> | Degrees. |
meanAnomaly | Float32Array<ArrayBufferLike> | Degrees. |
kind | Uint8Array<ArrayBufferLike> | Index into |
epochMs | (i: number): number | The epoch of record |
kindAt | (i: number): ObjectKind | The kind of record |
nameAt | (i: number): string | The name of record |
setAt | (i: number): ElementSet | Record |
recordAt | (i: number): CatalogueRecord | Record |
sets | (): ElementSet[] | Every record as an element set. |
records | (): CatalogueRecord[] | Every record. |
Examples
import { packCatalogue, unpackCatalogue, type PackedCatalogue } from "@johnmorrisdotca/chikyu-earth/catalogue";
const empty: PackedCatalogue = unpackCatalogue(packCatalogue([], { group: "none" }));
console.log(empty.count, empty.sets().length);0 0What it prints (run when this page was built)