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 sky out to a distance, in layers: the stars and galaxies nearer than 10, 50, 100, 500 or 1,000 light-years, each distance band its own colour, the ones with an uncertain distance kept apart, and none placed at a guess

DistanceLayerstype

What layersByDistance gives back.

Import it

import type { DistanceLayers } from "@johnmorrisdotca/hoshi-stars/distance";

Definition

interface DistanceLayers {
    limit: number;
    things: LayeredThing[];
    counts: number[];
    uncertain: number;
    unknown: number;
}

Members

NameTypeDescription
limitnumber

The limit the layers were made for, in light-years; Infinity for all.

thingsLayeredThing[]

The things within the limit, nearest first: the certain ones by their best distance, the uncertain ones by the nearest their error allows.

countsnumber[]

How many certain things are in each of the six bands.

uncertainnumber

How many things are in the uncertain band: those whose distance is rough and whose range reaches inside the limit.

unknownnumber

How many things were given with no distance at all. They are never drawn once a limit is set.

Examples

import type { DistanceLayers } from "@johnmorrisdotca/hoshi-stars/distance";

const total = (layers: DistanceLayers): number => layers.counts.reduce((sum, n) => sum + n, 0) + layers.uncertain;
console.log(typeof total);
function

What it prints (run when this page was built)

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