Reference
What you can see tonight: the stars above the horizon of a place and a moment that the Sun's light, the sky's darkness and the air still let through, with the twilight, each star's altitude and azimuth and how easy it is to see
import { … } from "@johnmorrisdotca/hoshi-stars/tonight";
128.8 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
airmass | function | The airmass of the line of sight at an altitude, by Kasten and Young (1989): 1 at the zenith, 2 at 30 degrees, about 38 at the horizon. |
Ease | type | How easy a star is to see: "easy" (at least a magnitude brighter than the sky's limit), "needs dark adaptation" (within a magnitude of the limit: give the eyes twenty minutes without a light) or "not tonight" (above the horizon but fainter than the limit, or in the day). |
SKY_LIMITS | constant | The naked-eye limiting magnitude of each preset, at the zenith with the Sun well down: round figures of our own, each near the naked-eye limits of the Bortle classes it stands for: a city centre (classes 8 to 9), a suburb (6 to 7), a country site (4 to 5) and a dark site (2 to 3). |
SkyLimit | type | The darkness of the site, as a preset or a limiting magnitude: the faintest star seen at the zenith in the dark. |
sunAltitude | function | The Sun's altitude over a place at a moment, in degrees (geometric: the centre of the disc, no refraction). |
sunPosition | function | The Sun's right ascension and declination of date, in degrees, from the Almanac's low-precision formula (0.01 degree from 1950 to 2050). |
TonightOptions | type | What the sky is like: all of it optional. |
TonightSky | type | The answer to "what can I see from here, now". |
Twilight | type | How dark the sky is by the Sun's altitude: "day" (the Sun's upper edge up, -0.833 degrees or higher), "civil" twilight (down to -6), "nautical" (down to -12), "astronomical" (down to -18) and "night". |
twilightOf | function | The kind of twilight for a Sun altitude: "day" above -0.833 degrees (the upper edge on the horizon, with refraction), "civil" to -6, "nautical" to -12, "astronomical" to -18, then "night". |
VisibleStar | type | A star above the horizon and how it looks from there. |
visibleStars | function | The stars you can see from a place at a moment: above the horizon (or minAltitude), with the Sun low enough, and brighter than the sky's limit once the air has dimmed them (airmass, 0.2 magnitude an airmass above the zenith's one). |