Reference · Constellation boundaries and which constellation a point is in
constellationAtfunction
The constellation a point on the sky is in. The position is precessed to the equator and equinox of B1875.0, where the IAU's boundaries (Delporte 1930) are defined, and looked up in
N. G. Roman's table of them (1987, PASP 99, 695). Coordinates are J2000, the frame of this package's stars, unless when says the position is of date. The constellations tile the
sky, so every point is in exactly one; Serpens is one constellation (Ser) although it is in two pieces.
A point within a few arc-seconds of a boundary can fall either side of it: Roman's table has the boundaries to a hundredth of a second of time and the precession here is IAU 1976, not the Newcomb-based one of 1930.
Import it
import { constellationAt } from "@johnmorrisdotca/hoshi-stars/boundaries";
Definition
function constellationAt(position: { rightAscension: number; declination: number; }, when?: When): Constellation
Parameters
| Name | Type | Description |
|---|---|---|
position | { rightAscension: number; declination: number; } |
|
when (optional) | When | undefined | The equinox the coordinates are on: a |
Returns
Constellation
The shared, frozen constellation.
Examples
import { starByName } from "@johnmorrisdotca/hoshi-stars";
import { constellationAt } from "@johnmorrisdotca/hoshi-stars/boundaries";
console.log(constellationAt(starByName("Betelgeuse")!).name); // Orion
console.log(constellationAt({ rightAscension: 0, declination: 90 }).abbreviation); // UMi
console.log(constellationAt({ rightAscension: 83.8, declination: -5.4 }, Date.UTC(2026, 10, 8)).english);Orion
UMi
HunterWhat it prints (run when this page was built)