Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · The faint stars: about 3 million of UCAC4's, to magnitude 12, in sky tiles loaded for the part of the sky you show

FaintSkytype

The faint stars of a page: loads the tiles a patch of sky needs, and answers from the ones it has.

Import it

import type { FaintSky } from "@johnmorrisdotca/hoshi-stars/faint";

Definition

interface FaintSky {
    load(field: FaintField, limit?: number): Promise<void>;
    stars(field: FaintField, limit?: number, max?: number): {
        stars: FaintStar[];
        depth: number;
        loaded: boolean;
    };
    readonly size: number;
}

Members

NameTypeDescription
load(field: FaintField, limit?: number): Promise<void>

Fetch the tiles the patch needs for stars to limit that are not here yet. Resolves when they are all here, and rejects if one could not be fetched (the others stay).

stars(field: FaintField, limit?: number, max?: number): { stars: FaintStar[]; depth: number; loaded: boolean; }

The stars of the patch from the tiles that are here (see faintStarsIn), and loaded: whether every tile the patch needs is here, so that nothing is missing.

sizenumber

How many tiles are here.

Examples

import { faintSky } from "@johnmorrisdotca/hoshi-stars/faint";

const sky = faintSky();
const orion = { rightAscension: 83.8, declination: -5.4, radius: 1 };
await sky.load(orion, 11);
console.log(sky.stars(orion, 11, 1000).stars.length);

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.