UNPKG

@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.

65 lines (64 loc) 2.79 kB
/*****************************************************************************************************************/ import type { Planet } from './planets'; /*****************************************************************************************************************/ export declare const earth: Planet; /*****************************************************************************************************************/ export declare const L: { A: number; B: number; C: number; }[][]; export declare const B: { A: number; B: number; C: number; }[][]; export declare const R: { A: number; B: number; C: number; }[][]; /*****************************************************************************************************************/ /** * * getEccentricityOfOrbit() * * The eccentricity of the Earth's orbit is a measure of how elliptical the Earth's * orbit is. The eccentricity of the Earth's orbit is not constant, but varies over * time. This function returns the eccentricity of the Earth's orbit for a given date. * * @param date - The date to get the eccentricity of the Earth's orbit for * @returns The eccentricity of the Earth's orbit in degrees * */ export declare const getEccentricityOfOrbit: (datetime: Date) => number; /*****************************************************************************************************************/ /** * * getObliquityOfEcliptic() * * @see EQ22.2 p.147 of Meeus, Jean. 1991. Astronomical algorithms. Richmond, Va: Willmann-Bell. * * @note This is adopted by the International Astronomical Union (IAU), however the accuracy * is NOT satisfactory over a long period of time, the error in ε0 reaches 1" over a period * of 2000 years and about 10" over a period of 4000 years. * * @param datetime - The date to get the obliquity of the ecliptic for * @returns The obliquity of the ecliptic in degrees * */ export declare const getObliquityOfEcliptic: (datetime: Date) => number; /*****************************************************************************************************************/ /** * * getCoefficientOfEccentricity() * * The coefficient of eccentricity of the Earth's orbit is a measure of how elliptical the Earth's * orbit is. The coefficient of eccentricity of the Earth's orbit is not constant, but varies over * time. This function returns the coefficient of eccentricity of the Earth's orbit for a given date. * * @param datetime - The date to get the coefficient of eccentricity for * @returns The coefficient of eccentricity of the Earth's orbit */ export declare const getCoefficientOfEccentricity: (datetime: Date) => number; /*****************************************************************************************************************/