DistanceInputtype
Something with a place on the sky and perhaps a distance, as layersByDistance takes it. Make one with starInput, nearbyInput or deepSkyInput, or write one for your own data.
Import it
import type { DistanceInput } from "@johnmorrisdotca/hoshi-stars/distance";
Definition
interface DistanceInput {
id: string;
kind: LayerKind;
name: string | undefined;
rightAscension: number;
declination: number;
magnitude: number | undefined;
lightYears: number | undefined;
low: number | undefined;
high: number | undefined;
certainty: Certainty | undefined;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | A key that stays the same: |
kind | LayerKind | |
name | string | undefined | |
rightAscension | number | J2000 right ascension and declination in degrees. |
declination | number | |
magnitude | number | undefined | Visual magnitude, or |
lightYears | number | undefined | The best distance in light-years, or |
low | number | undefined | The nearest and farthest the distance can be within one standard error, in light-years; |
high | number | undefined | |
certainty | Certainty | undefined |
Examples
import type { DistanceInput } from "@johnmorrisdotca/hoshi-stars/distance";
const proxima: DistanceInput = { id: "proxima", kind: "nearby", name: "Proxima Centauri", rightAscension: 217.43, declination: -62.68, magnitude: 11.1, lightYears: 4.24, low: 4.24, high: 4.24, certainty: "good" };
console.log(proxima.name);Proxima CentauriWhat it prints (run when this page was built)