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.
40 lines (39 loc) • 2.43 kB
TypeScript
import AstronomicalObject from '../astronomicalObject/AstronomicalObject';
import { EclipticSphericalCoordinates, RectangularCoordinates } from '../coordinates/types/CoordinateTypes';
import { Location } from '../earth/types/LocationTypes';
import TimeOfInterest from '../time/TimeOfInterest';
import IPlanet from './interfaces/IPlanet';
import { Vsop87 } from './types/Vsop87Types';
export default abstract class Planet extends AstronomicalObject implements IPlanet {
protected readonly toi: TimeOfInterest;
readonly name: string;
protected useVsop87Short: boolean;
private readonly sun;
private readonly earth;
protected constructor(toi?: TimeOfInterest, name?: string, useVsop87Short?: boolean);
abstract get diameter(): number;
protected abstract get vsop87J2000(): Promise<Vsop87>;
protected abstract get vsop87Date(): Promise<Vsop87>;
protected abstract get vsop87DateShort(): Promise<Vsop87>;
getHeliocentricEclipticSphericalJ2000Coordinates(): Promise<EclipticSphericalCoordinates>;
getHeliocentricEclipticSphericalDateCoordinates(): Promise<EclipticSphericalCoordinates>;
getAngularDiameter(): Promise<number>;
getApparentMagnitude(): Promise<number>;
protected abstract calculateApparentMagnitude(distanceSun: number, distanceEarth: number, phaseAngle: number): number;
getHeliocentricEclipticRectangularJ2000Coordinates(): Promise<RectangularCoordinates>;
getHeliocentricEclipticRectangularDateCoordinates(): Promise<RectangularCoordinates>;
getGeocentricEclipticRectangularJ2000Coordinates(): Promise<RectangularCoordinates>;
getGeocentricEclipticRectangularDateCoordinates(): Promise<RectangularCoordinates>;
getGeocentricEclipticSphericalJ2000Coordinates(): Promise<EclipticSphericalCoordinates>;
getGeocentricEclipticSphericalDateCoordinates(): Promise<EclipticSphericalCoordinates>;
getApparentGeocentricEclipticSphericalCoordinates(): Promise<EclipticSphericalCoordinates>;
getTransit(location: Location): Promise<TimeOfInterest>;
getRise(location: Location): Promise<TimeOfInterest>;
getSet(location: Location): Promise<TimeOfInterest>;
getElongation(): Promise<number>;
getPhaseAngle(): Promise<number>;
getIlluminatedFraction(): Promise<number>;
getPositionAngleOfBrightLimb(): Promise<number>;
isWaxing(): Promise<boolean>;
private getLightTimeCorrectedEclipticSphericalCoordinates;
}