TonightSkytype
The answer to "what can I see from here, now".
Import it
import type { TonightSky } from "@johnmorrisdotca/hoshi-stars/tonight";
Definition
interface TonightSky {
sunAltitude: number;
twilight: Twilight;
limitingMagnitude: number;
stars: VisibleStar[];
}
Members
| Name | Type | Description |
|---|---|---|
sunAltitude | number | The Sun's altitude in degrees, geometric. |
twilight | Twilight | The kind of darkness that gives. |
limitingMagnitude | number | The faintest apparent magnitude seen now: the site's limit lowered by twilight and the Moon. Below -5 when it is day, so nothing but Venus and the Moon would show. |
stars | VisibleStar[] | The stars, brightest first (by apparent magnitude). Only the visible ones unless |
Examples
import { visibleStars, type TonightSky } from "@johnmorrisdotca/hoshi-stars/tonight";
const sky: TonightSky = visibleStars({ observer: { latitude: 49.28, longitude: -123.12 }, when: Date.UTC(2026, 10, 8, 6) });
console.log(sky.twilight, sky.stars.length);night 1748What it prints (run when this page was built)