@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.
127 lines (126 loc) • 5.79 kB
TypeScript
/*****************************************************************************************************************/
/*****************************************************************************************************************/
import type { EquatorialCoordinate, GeographicCoordinate, SphericalCoordinate } from './common';
/*****************************************************************************************************************/
/**
*
* getAngularSeparation()
*
* The angular separation between two objects is the angle in degrees between the two objects as seen by an observer on Earth.
*
* @param A - The equatorial coordinate of the observed object.
* @param B - The equatorial coordinate of the observed object.
* @returns The angular separation between the two objects in degrees.
*
*/
export declare const getAngularSeparation: (A: SphericalCoordinate, B: SphericalCoordinate) => number;
/*****************************************************************************************************************/
/**
*
* getAntipodeCoordinate()
*
* The antipode of an object is the point on the celestial sphere that is diametrically opposite to the observed object.
*
* @param A - The coordinate of the observed object, in Spherical coordinates (accepts Equatorial, Horizontal, and Ecliptic coordinates).
* @returns The antipode of the observed object, in Spherical coordinates.
*/
export declare const getAntipodeCoordinate: (A: SphericalCoordinate) => SphericalCoordinate;
/*****************************************************************************************************************/
/**
*
* getNormalisedSphericalCoordinate()
*
* Normalises a Spherical coordinate to a value between 0 and 360 degrees in the
* longitude and -90 to 90 degrees in the latitude.
*
* @param A - The Spherical coordinate to normalise.
* @returns The normalised Spherical coordinate.
*
*/
export declare const getNormalisedSphericalCoordinate: (A: SphericalCoordinate) => SphericalCoordinate;
/*****************************************************************************************************************/
/**
*
* getGreenwhichSiderealTime()
*
* The Greenwich Sidereal Time (GST) is the hour angle of the vernal
* equinox, the ascending node of the ecliptic on the celestial equator.
*
* @param date - The date for which to calculate the Greenwich Sidereal Time (GST).
* @returns Greenwich Sidereal Time as number - the Greenwich Sidereal Time (GST) of the given date normalised to UTC.
*
*/
export declare const getGreenwhichSiderealTime: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* @alias getGreenwhichSiderealTime()
*
*/
export declare const GST: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLocalSiderealTime()
*
* The Local Sidereal Time (LST) is the hour angle of the vernal
* equinox, the ascending node of the ecliptic on the celestial equator.
*
* @param date - The date for which to calculate the Local Sidereal Time (LST).
* @param longitude - The longitude of the observer in degrees.
* @returs Local Sidereal Time as number - the Local Sidereal Time (LST) of the given date normalised to UTC.
*
*/
export declare const getLocalSiderealTime: (datetime: Date, longitude: number) => number;
/*****************************************************************************************************************/
/**
*
* @alias getLocalSiderealTime()
*
*/
export declare const LST: (datetime: Date, longitude: number) => number;
/*****************************************************************************************************************/
/**
*
* getHourAngle()
*
* The Hour Angle (HA) is the angular distance along the celestial equator
* from the observer's meridian to the hour circle of a celestial body.
*
* @param date - The date for which to calculate the hour angle.
* @param ra - Right Ascension of the target in degrees.
* @param longitude - The longitude of the observer in degrees.
* @returns The Hour Angle (HA) of the given date.
*
*/
export declare const getHourAngle: (datetime: Date, longitude: number, ra: number) => number;
/*****************************************************************************************************************/
/**
*
* getObliquityOfTheEcliptic()
*
* The obliquity of the ecliptic is the angle between the ecliptic and the celestial
* equator, and is used to convert between ecliptic and equatorial coordinates.
*
* @param date - The date for which to calculate the obliquity of the ecliptic for.
* @returns The obliquity of the ecliptic in degrees.
*
*/
export declare const getObliquityOfTheEcliptic: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getParallacticAngle()
*
* The parallactic angle is the angle between the great circle that passes through
* the celestial object and the zenith, and the great circle that passes through
* the celestial object and the celestial pole.
*
* @param date - The date for which to calculate the parallactic angle for.
* @param observer - The geographic coordinate of the observer.
* @param target - The equatorial coordinate of the observed object.
* @return The parallactic angle of the observed object in degrees.
*
*/
export declare const getParallacticAngle: (datetime: Date, observer: GeographicCoordinate, target: EquatorialCoordinate) => number;
/*****************************************************************************************************************/