UNPKG

astronomy-bundle

Version:

Bundle for astronomical calculations such as position of moon, sun and planets, sunrise, sunset or solar eclipses. Most of the calculations are based on Jean Meeus 'Astronomical Algorithms' book and the VSOP87 theory.

38 lines (37 loc) 2.92 kB
import { EclipticSphericalCoordinates, EquatorialSphericalCoordinates, LocalHorizontalCoordinates, RectangularCoordinates } from '../coordinates/types/CoordinateTypes'; import { Location } from '../earth/types/LocationTypes'; import { Conjunction } from '../planets/types/PlanetTypes'; import TimeOfInterest from '../time/TimeOfInterest'; import { AstronomicalObjectConstructor, AstronomicalObjectInterface } from './interfaces/AstronomicalObjectInterfaces'; export default abstract class AstronomicalObject implements AstronomicalObjectInterface { protected readonly toi: TimeOfInterest; readonly name: string; protected readonly jd: number; protected readonly jd0: number; protected readonly T: number; protected readonly t: number; protected constructor(toi?: TimeOfInterest, name?: string); getTimeOfInterest(): TimeOfInterest; abstract getHeliocentricEclipticRectangularJ2000Coordinates(): Promise<RectangularCoordinates>; abstract getHeliocentricEclipticRectangularDateCoordinates(): Promise<RectangularCoordinates>; abstract getHeliocentricEclipticSphericalJ2000Coordinates(): Promise<EclipticSphericalCoordinates>; abstract getHeliocentricEclipticSphericalDateCoordinates(): Promise<EclipticSphericalCoordinates>; abstract getGeocentricEclipticRectangularJ2000Coordinates(): Promise<RectangularCoordinates>; abstract getGeocentricEclipticRectangularDateCoordinates(): Promise<RectangularCoordinates>; abstract getGeocentricEclipticSphericalJ2000Coordinates(): Promise<EclipticSphericalCoordinates>; abstract getGeocentricEclipticSphericalDateCoordinates(): Promise<EclipticSphericalCoordinates>; getGeocentricEquatorialSphericalJ2000Coordinates(): Promise<EquatorialSphericalCoordinates>; getGeocentricEquatorialSphericalDateCoordinates(): Promise<EquatorialSphericalCoordinates>; getApparentGeocentricEclipticRectangularCoordinates(): Promise<RectangularCoordinates>; abstract getApparentGeocentricEclipticSphericalCoordinates(): Promise<EclipticSphericalCoordinates>; getApparentGeocentricEquatorialSphericalCoordinates(): Promise<EquatorialSphericalCoordinates>; getTopocentricEquatorialSphericalCoordinates(location: Location): Promise<EquatorialSphericalCoordinates>; getTopocentricHorizontalCoordinates(location: Location): Promise<LocalHorizontalCoordinates>; getApparentTopocentricHorizontalCoordinates(location: Location): Promise<LocalHorizontalCoordinates>; getDistanceToEarth(): Promise<number>; getApparentDistanceToEarth(): Promise<number>; getTopocentricDistanceToEarth(location: Location): Promise<number>; getLightTime(): Promise<number>; getConjunctionInRightAscensionTo(astronomicalObjectConstructor: AstronomicalObjectConstructor): Promise<Conjunction>; getConjunctionInLongitudeTo(astronomicalObjectConstructor: AstronomicalObjectConstructor): Promise<Conjunction>; }