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 · What is near a star, an object or a point, in the sky and in space; neighbouring constellations

NearestInSpacetype

One answer of a query by distance in space.

Import it

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

Definition

interface NearestInSpace<T extends Star | NearbyStar = Star> {
    thing: T;
    distance: number;
    parsecs: number;
    error: number | undefined;
}

Members

NameTypeDescription
thingT

The star.

distancenumber

The distance from the target in light-years, from the two parallaxes and the angle between them.

parsecsnumber

The same distance in parsecs.

errornumber | undefined

The uncertainty of distance in light-years, or undefined: the bright Yale stars give each parallax to a whole milliarcsecond and no error, so none can be worked out for them. It is worked out when the star and the target are nearby stars (or the target is a point), from their parallax errors.

Examples

import { nearest, type NearestInSpace } from "@johnmorrisdotca/hoshi-stars/nearest";

const first: NearestInSpace = nearest("Sirius", { by: "space", count: 1 })[0]!;
console.log(first.thing.name, first.distance.toFixed(1), "light-years");
Procyon 5.1 light-years

What it prints (run when this page was built)

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