/** * What kind of orbit a satellite or a group is in: `leo` (low, below 2,000 km), `meo` (medium, up to about 35,000 km: the navigation satellites), `geo` (about 35,786 km up, where a satellite goes round once * a day; over the equator it sits still over one place), `heo` (a long oval that swings far out) or `mixed` (a group with more than one kind). * * @example * ```ts * import type { OrbitKind } from "@johnmorrisdotca/chikyu-earth/satellites"; * * const sitsStill = (orbit: OrbitKind): boolean => orbit === "geo"; * console.log(sitsStill("geo")); * ``` */ export type OrbitKind = "leo" | "meo" | "geo" | "heo" | "mixed"; /** * A group of satellites the demo offers as one button: what it is, in English and Japanese, and where its elements come from (a CelesTrak list name, or single catalogue numbers). * * @example * ```ts * import { SATELLITE_GROUPS } from "@johnmorrisdotca/chikyu-earth/satellites"; * * const gps = SATELLITE_GROUPS.find((group) => group.id === "gps"); * console.log(gps?.celestrak, gps?.orbit); * ``` */ export interface SatelliteGroupInfo { /** A short name for an address or a button, lower case with hyphens. */ id: string; label: string; labelJa: string; /** A line on what the group is. */ about: string; aboutJa: string; orbit: OrbitKind; /** True when the satellites of this group sit still over one place (geostationary), so a reader is not surprised that they do not move. */ still: boolean; /** The name of the CelesTrak list (`GROUP=` in its address) that holds the group, when there is one. */ celestrak?: string; /** Single NORAD catalogue numbers to ask for one by one, when the group has no list of its own. */ catnr?: readonly number[]; } /** * One satellite worth naming: its NORAD catalogue number (the number every source uses), its usual name, the group it is shown in, its orbit and a line on what it is. * * @example * ```ts * import { CATALOGUE } from "@johnmorrisdotca/chikyu-earth/satellites"; * * const oldest = CATALOGUE.find((entry) => entry.noradId === 5); * console.log(oldest?.name, oldest?.about); * ``` */ export interface CatalogueEntry { noradId: number; name: string; group: string; orbit: OrbitKind; about: string; aboutJa: string; } /** * The groups, in the order the demo shows them. Each one is a CelesTrak list or a few single numbers; the elements are fetched by the page (or the demo's scheduled build), never by the package. * * @example * ```ts * import { SATELLITE_GROUPS } from "@johnmorrisdotca/chikyu-earth/satellites"; * * console.log(SATELLITE_GROUPS.map((group) => group.label).join(", ")); * ``` */ export declare const SATELLITE_GROUPS: readonly SatelliteGroupInfo[]; /** * The satellites worth naming, with the NORAD number every source uses for them: the stations, the famous ones, and a few of each group. * JWST is not here on purpose: it is not in Earth orbit (it circles the Sun about 1.5 million km out, at the second Lagrange point). * * @example * ```ts * import { CATALOGUE } from "@johnmorrisdotca/chikyu-earth/satellites"; * * console.log(CATALOGUE.filter((entry) => entry.group === "stations").map((entry) => entry.name)); * ``` */ export declare const CATALOGUE: readonly CatalogueEntry[]; /** * One plain row a page can index, for its own search box. No DOM: a group or a satellite, with both languages on every row. * * @example * ```ts * import type { CatalogueRow } from "@johnmorrisdotca/chikyu-earth/satellites"; * * const row: CatalogueRow = { kind: "group", id: "weather", names: { en: "Weather", ja: "気象衛星" }, orbit: "mixed" }; * console.log(row.names.ja); * ``` */ export interface CatalogueRow { /** `group` for a button's group, `satellite` for one named satellite. */ kind: "satellite" | "group"; /** The group's id, or the satellite's NORAD number as a string. */ id: string; /** The NORAD catalogue number. Only a satellite has one. */ noradId?: number; /** * Names in both languages. `ja` is the short Japanese name where {@link SHORT_NAMES} has one, and otherwise the English name: * a name such as Sentinel-2A is written the same way in Japanese. `reading` is hiragana for a Japanese name that is not already kana. */ names: { en: string; ja: string; reading?: string; }; /** The group's id. Only a satellite has one. */ group?: string; orbit: OrbitKind; /** Other names already written in the catalogue, such as HST for Hubble. Absent when there are none. */ aka?: readonly string[]; } /** * Plain rows for every group and every catalogue satellite, for a page to index. Both languages are on every row: `lang` says which language the page is showing and does not drop the other, so one index serves either. * A satellite's Japanese name comes from {@link SHORT_NAMES} where that has one, and is otherwise the English name. * * @param lang - `en` or `ja`, the language the page is showing. Omit it for the same rows. * @returns The groups in their own order, then the satellites in catalogue order. * @example * ```ts * import { catalogueRows } from "@johnmorrisdotca/chikyu-earth/satellites"; * * const hubble = catalogueRows("ja").find((row) => row.noradId === 20580); * console.log(hubble?.names.ja, hubble?.aka?.join(", ")); * ``` */ export declare function catalogueRows(lang?: "en" | "ja"): CatalogueRow[]; /** * Find catalogue entries by name, group name, NORAD number, Japanese name or a group's Japanese label: "hubble", "hst", "25544", "weather" or "ハッブル". * An English or numeric query ignores case, spaces and punctuation, as before. Japanese is folded on both sides: letter case, character width (NFKC) and kana (`foldKana`: hiragana to katakana, small kana to full-size, the long-vowel mark left alone), so `はっぶる` finds `ハッブル`; kanji are matched as typed. The width fold is applied before the English comparison too. * A name that starts with the text comes before one that only has it inside. * * @param text - What the reader typed. * @param limit - The most entries to give back (8 by default). * @returns The matching entries, best first; none for empty text. * @example * ```ts * import { findInCatalogue } from "@johnmorrisdotca/chikyu-earth/satellites"; * * console.log(findInCatalogue("sentinel 2").map((entry) => entry.name)); * console.log(findInCatalogue("ハッブル").map((entry) => entry.name)); * ``` */ export declare function findInCatalogue(text: string, limit?: number): CatalogueEntry[]; /** * The catalogue entry for a NORAD number, if there is one. * * @param noradId - The NORAD catalogue number. * @returns The entry, or undefined when the catalogue does not name that satellite. * @example * ```ts * import { catalogueEntry } from "@johnmorrisdotca/chikyu-earth/satellites"; * * console.log(catalogueEntry(25544)?.about); * ``` */ export declare function catalogueEntry(noradId: number): CatalogueEntry | undefined;