starInputfunction
A bright star of the Yale catalogue as a thing with a distance, from its parallax and its error. A star with no parallax has no distance.
Import it
import { starInput } from "@johnmorrisdotca/hoshi-stars/distance";
Definition
function starInput(star: Pick<Star, "hr" | "name" | "rightAscension" | "declination" | "magnitude" | "parallaxMas" | "parallaxErrorMas">): DistanceInput
Parameters
| Name | Type | Description |
|---|---|---|
star | Pick<Star, "hr" | "magnitude" | "name" | "rightAscension" | "declination" | "parallaxMas" | "parallaxErrorMas"> | A star from |
Returns
DistanceInput
The input for layersByDistance.
Examples
import { starByName } from "@johnmorrisdotca/hoshi-stars";
import { starInput } from "@johnmorrisdotca/hoshi-stars/distance";
const sirius = starInput(starByName("Sirius")!);
console.log(sirius.id, sirius.lightYears?.toFixed(1), sirius.certainty);hr-2491 8.5 goodWhat it prints (run when this page was built)