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

starDistancefunction

A star's distance with its uncertainty, from the parallax and its error. Sirius is 8.5 light-years, to within 0.05; Betelgeuse's distance is a published paper's (168 parsecs, 548 light-years), so it is anywhere from 480 to 640 light-years. Rigel is rougher: from 590 to 1,480 light-years.

Import it

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

Definition

function starDistance(star: Pick<Star, "parallaxMas" | "parallaxErrorMas">): StarDistance | undefined

Parameters

NameTypeDescription
starPick<Star, "parallaxMas" | "parallaxErrorMas">

A star, or anything with a parallax in milliarcseconds and its error (a nearby star from /nearby).

Returns

StarDistance | undefined

The distance, its error and its range in light-years, or undefined where there is no parallax (or a non-positive one).

Examples

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

const sirius = starDistance(starByName("Sirius")!)!;
console.log(sirius.lightYears.toFixed(2), sirius.lightYearsError?.toFixed(2), sirius.lightYearsRange?.map((ly) => ly.toFixed(2)));
8.55 0.05 [ '8.50', '8.60' ]

What it prints (run when this page was built)

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