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

decodeFaintTilefunction

Decode a tile file: n stars as six planes of n bytes (the step in declination, low and high byte; right ascension, low and high; magnitude; colour), the stars sorted by declination; n is the length over six.

Import it

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

Definition

function decodeFaintTile(tile: FaintTileId, bytes: Uint8Array): FaintTile

Parameters

NameTypeDescription
tileFaintTileId

The tile the bytes are of.

bytesUint8Array<ArrayBufferLike>

The file's bytes.

Returns

FaintTile

The stars as parallel arrays.

Examples

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

const response = await fetch("https://johnmorrisdotca.github.io/hoshi-stars/faint-tiles/L2/17-12.bin");
const tile = decodeFaintTile({ level: 2, band: 17, column: 12 }, new Uint8Array(await response.arrayBuffer()));
console.log(tile.count, tile.magnitude[0]);

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