@observerly/astrometry
Version:
observerly's lightweight, zero-dependency, type safe astrometry library written in Typescript for calculating the position of celestial objects in the sky.
61 lines (60 loc) • 3.3 kB
TypeScript
/*****************************************************************************************************************/
/*****************************************************************************************************************/
import type { FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
import type { EquatorialCoordinate } from './common';
/*****************************************************************************************************************/
export type ConstellationName = 'Andromeda' | 'Antila' | 'Apus' | 'Aquarius' | 'Aquila' | 'Ara' | 'Aries' | 'Auriga' | 'Boötes' | 'Caelum' | 'Camelopardalis' | 'Cancer' | 'Canes Venatici' | 'Canis Major' | 'Canis Minor' | 'Capricornus' | 'Carina' | 'Cassiopeia' | 'Centaurus' | 'Cepheus' | 'Cetus' | 'Chamaeleon' | 'Circinus' | 'Columba' | 'Coma Berenices' | 'Corona Australis' | 'Corona Borealis' | 'Corvus' | 'Crater' | 'Crux' | 'Cygnus' | 'Delphinus' | 'Dorado' | 'Draco' | 'Equuleus' | 'Eridanus' | 'Fornax' | 'Gemini' | 'Grus' | 'Hercules' | 'Horologium' | 'Hydra' | 'Hydrus' | 'Indus' | 'Lacerta' | 'Leo' | 'Leo Minor' | 'Lepus' | 'Libra' | 'Lupus' | 'Lynx' | 'Lyra' | 'Mensa' | 'Microscopium' | 'Monoceros' | 'Musca' | 'Norma' | 'Octans' | 'Ophiuchus' | 'Orion' | 'Pavo' | 'Pegasus' | 'Perseus' | 'Phoenix' | 'Pictor' | 'Pisces' | 'Piscis Austrinus' | 'Puppis' | 'Pyxis' | 'Reticulum' | 'Sagitta' | 'Sagittarius' | 'Scorpius' | 'Sculptor' | 'Scutum' | 'Serpens' | 'Serpens Caput' | 'Serpens Cauda' | 'Sextans' | 'Taurus' | 'Telescopium' | 'Triangulum' | 'Triangulum Australe' | 'Tucana' | 'Ursa Major' | 'Ursa Minor' | 'Vela' | 'Virgo' | 'Volans' | 'Vulpecula';
/*****************************************************************************************************************/
/**
*
* Constellation
*
* Represents one of the 88 official IAU constellations
* @see https://www.iau.org/public/themes/constellations/
*
*/
export interface Constellation {
/**
*
*
* The IAU designation of the constellation.
*
*/
name: ConstellationName;
/**
*
*
* The meaning of the constellation's name.
*
*/
meaning: string;
/**
*
*
* The abbreviation of the constellation's name.
*
*/
abbreviation: string;
/**
*
* The feature of the constellation, represenmted as a GeoJSON FeatureCollection.
*
*/
feature: FeatureCollection<Geometry, GeoJsonProperties>;
}
/*****************************************************************************************************************/
export declare const constellations: Map<ConstellationName, Constellation>;
/*****************************************************************************************************************/
/**
*
* getConstellation()
*
* Performs a lookup of the Nancy Roman lookup table to find the constellation
* that the target equatorial coordinate is in.
*
* @param target - The target equatorial coordinate.
* @returns The constellation that the target equatorial coordinate is in, or undefined
*
*/
export declare const getConstellation: (target: EquatorialCoordinate) => Constellation | undefined;
/*****************************************************************************************************************/