constellation

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package constellation identifies which of the 88 IAU constellations contains a given sky position.

The lookup uses a pre-computed grid from the IAU constellation boundary data (Roman 1987, CDS catalog VI/42). Binary search on RA and declination gives O(log n) lookup time with no linear scanning.

Positions should be given in epoch B1875 equatorial coordinates, which is the standard epoch for constellation boundaries. For most practical purposes, J2000 coordinates work fine — the precession difference is ~1.4° over 125 years, which only matters for positions very close to a constellation boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abbreviation

func Abbreviation(name string) string

Abbreviation returns the 3-letter IAU abbreviation for a constellation name. Returns empty string if the name is not recognized.

func At

func At(raHours, decDeg float64) string

At returns the IAU 3-letter abbreviation of the constellation containing the given position. raHours is right ascension in hours [0, 24) and decDeg is declination in degrees [-90, 90].

The boundaries use epoch B1875 coordinates (the standard for IAU constellation boundaries). J2000 coordinates are acceptable for most purposes.

func Name

func Name(abbr string) string

Name returns the full name for a constellation abbreviation. Returns empty string if the abbreviation is not recognized.

func Names

func Names() [][2]string

Names returns a copy of all 88 constellation abbreviation-name pairs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL