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 · Stars: names, positions, distance and colour

StarDistancetype

A star's distance with its uncertainty: what starDistance returns.

Import it

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

Definition

interface StarDistance {
    lightYears: number;
    lightYearsError: number | undefined;
    lightYearsRange: readonly [
        number,
        number
    ] | undefined;
}

Members

NameTypeDescription
lightYearsnumber

The distance in light-years: 3,261.56 divided by the parallax in milliarcseconds.

lightYearsErrornumber | undefined

The error of lightYears: the distance times the parallax's relative error (a first-order figure, good while that is small), or undefined where the parallax has no error.

lightYearsRangereadonly [number, number] | undefined

The nearest and the farthest the distance can be within one standard error of the parallax, or undefined where the parallax has no error. The farthest is Infinity where the error is as large as the parallax (the distance has no upper limit).

Examples

import { starByName, starDistance, type StarDistance } from "@johnmorrisdotca/hoshi-stars";

const distance: StarDistance | undefined = starDistance(starByName("Betelgeuse")!);
console.log(distance?.lightYearsRange);
[ 479.6417319117647, 639.5223092156862 ]

What it prints (run when this page was built)

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