@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.
381 lines (380 loc) • 16.3 kB
TypeScript
/*****************************************************************************************************************/
import type { GregorianMonth } from './calendar';
import type { EclipticCoordinate, EquatorialCoordinate, GeographicCoordinate } from './common';
/*****************************************************************************************************************/
/**
*
*
* Lunation 1st as the first new moon of 1923 at approximately 02:41 UTC,
* January 17, 1923 as per Ernest William Brown's lunar theory.
*
*
*/
export declare const LUNATION_BASE_JULIAN_DAY = 2423436.6115277777;
/*****************************************************************************************************************/
/**
*
*
* The time between two identical Lunar syzygies, equivalent of 29.53059
* Earth days, which is based on Mean Synodic Month, 2000 AD mean solar days.
*
*
*/
export declare const LUNAR_SYNODIC_MONTH = 29.530588853;
/*****************************************************************************************************************/
export type AlgonquinMoonNames = 'Wolf Moon' | 'Snow Moon' | 'Worm Moon' | 'Pink Moon' | 'Flower Moon' | 'Strawberry Moon' | 'Buck Moon' | 'Sturgeon Moon' | 'Corn Moon' | "Hunter's Moon" | 'Beaver Moon' | 'Cold Moon';
/*****************************************************************************************************************/
export type AnishinaabegMoonNames = 'Spirit Moon' | 'Bear Moon' | 'Snow Crust Moon' | 'Broken Snowshoe Moon' | 'Sucker Moon' | 'Blooming Moon' | 'Berry Moon' | 'Grain Moon' | 'Changing Leaves Moon' | 'Falling Leaves Moon' | 'Freezing Moon' | 'Little Spirit Moon';
/*****************************************************************************************************************/
export type ColloquialMoonNames = AlgonquinMoonNames | AnishinaabegMoonNames | 'Harvest Moon' | 'Blue Moon';
/*****************************************************************************************************************/
export declare const names: Map<GregorianMonth, Set<AlgonquinMoonNames | AnishinaabegMoonNames>>;
/*****************************************************************************************************************/
export declare const Phases: {
readonly New: "New";
readonly WaxingCrescent: "Waxing Crescent";
readonly FirstQuarter: "First Quarter";
readonly WaxingGibbous: "Waxing Gibbous";
readonly Full: "Full";
readonly WaningGibbous: "Waning Gibbous";
readonly LastQuarter: "Last Quarter";
readonly WaningCrescent: "Waning Crescent";
readonly Invalid: "Invalid";
};
export type Phase = (typeof Phases)[keyof typeof Phases];
/*****************************************************************************************************************/
export declare const getLunarAnnualEquationCorrection: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarMeanAnomaly()
*
* The Moon's mean anomaly is the angle between perigee and the Moon's current position.
*
* @param date - The date to calculate the Moon's mean anomaly for.
* @returns The Moon's mean anomaly at the given date.
*
*/
export declare const getLunarMeanAnomaly: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarMeanGeometricLongitude()
*
* The Moon's mean geometric longitude is the angle between the Moon's current
* position and the vernal equinox.
*
* @param date - The date to calculate the Moon's mean geometric longitude for.
* @returns The Moon's mean geometric longitude at the given date.
*
*/
export declare const getLunarMeanGeometricLongitude: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarArgumentOfLatitude()
*
* The Moon's argument of latitude is the angle between the Moon's current
* position and the vernal equinox.
*
* @param datetime - The date to calculate the Moon's argument of latitude for.
* @returns The Moon's argument of latitude at the given date.
*
*/
export declare const getLunarArgumentOfLatitude: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarMeanEclipticLongitude()
*
* The mean lunar ecliptic longitude is the ecliptic longitude of the Moon
* if the Moon's orbit where free of perturbations
*
* @param date - The date to calculate the Moon's mean ecliptic longitude for.
* @returns The Moon's mean ecliptic longitude at the given date.
*
*/
export declare const getLunarMeanEclipticLongitude: (datetime: Date) => number;
/*****************************************************************************************************************/
export declare const getLunarEvectionCorrection: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarMeanEclipticLongitudeOfTheAscendingNode()
*
* The mean lunar ecliptic longitude of the ascending node is the angle where
* the Moon's orbit crosses the ecliptic at the current epoch relative to J2000.
*
* @param date - The date to calculate the Moon's mean ecliptic longitude of the ascending node for.
* @returns The Moon's mean ecliptic longitude of the ascending node at the given date.
*
*/
export declare const getLunarMeanEclipticLongitudeOfTheAscendingNode: (datetime: Date) => number;
/*****************************************************************************************************************/
export declare const getLunarMeanAnomalyCorrection: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarTrueAnomaly()
*
* The true anomaly of the Moon is the angle between the perihelion and the
* current position of the Moon, as seen from the Earth.
*
* @param date - The date to calculate the Moon's true anomaly for.
* @returns The Moon's true anomaly in degrees.
*/
export declare const getLunarTrueAnomaly: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarTrueEclipticLongitude()
*
* The corrected lunar ecliptic longitude is the ecliptic longitude of the Moon
* if the Moon's orbit where free of perturbations.
*
* @param date - The date to calculate the Moon's true ecliptic longitude for.
* @returns The Moon's true ecliptic longitude in degrees.
*
*/
export declare const getLunarTrueEclipticLongitude: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarCorrectedEclipticLongitudeOfTheAscendingNode()
*
* The corrected lunar ecliptic longitude of the ascending node is the angle where
* the Moon's orbit crosses the ecliptic corrected for perturbations in the
* Moon's orbit due to the Sun.
*
* @param date - The date to calculate the Moon's corrected ecliptic latitude for.
* @returns The Moon's corrected ecliptic latitude in degrees.
*
*/
export declare const getLunarCorrectedEclipticLongitudeOfTheAscendingNode: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarEclipticLongitude()
*
* The ecliptic longitude for the Moon is the angle between the perihelion and
* the current position of the Moon, as seen from the centre of the Earth,
* corrected for the equation of center and the Moon's ecliptic longitude at
* perigee at the epoch.
*
* @param date - The date to calculate the Moon's ecliptic longitude for.
* @returns The Moon's ecliptic longitude in degrees.
*
*/
export declare const getLunarEclipticLongitude: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarEclipticLatitude()
*
* The ecliptic latitude for the Moon is the angle between the ecliptic and
* the current position of the Moon, as seen from the centre of the Earth,
* corrected for the equation of center and the Moon's ecliptic longitude at
* perigee at the epoch.
*
* @param date - The date to calculate the Moon's ecliptic latitude for.
* @returns The Moon's ecliptic latitude in degrees.
*
*/
export declare const getLunarEclipticLatitude: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarEclipticCoordinate()
*
* The ecliptic coordinates for the Moon are the angles between the ecliptic and
* the current position of the Moon, as seen from the centre of the Earth,
* corrected for the equation of center and the Moon's ecliptic longitude at
* perigee at the epoch.
*
* @param date - The date to calculate the Moon's ecliptic coordinates for.
* @returns The Moon's ecliptic coordinates in degrees.
*
*/
export declare const getLunarEclipticCoordinate: (datetime: Date) => EclipticCoordinate;
/*****************************************************************************************************************/
/**
*
* getLunarEquatorialCoordinate()
*
* The equatorial coordinates for the Moon are the angles between the equator and
* the current position of the Moon, as seen from the centre of the Earth,
* corrected for the equation of center and the Moon's ecliptic longitude at
* perigee at the epoch.
*
* @param date - The date to calculate the Moon's equatorial coordinates for.
* @returns The Moon's equatorial coordinates in degrees.
*
*/
export declare const getLunarEquatorialCoordinate: (datetime: Date) => EquatorialCoordinate;
/*****************************************************************************************************************/
/**
*
* getLunarElongation()
*
* The elongation of the Moon is the angle between the Sun and the Moon, as
* seen from the reference observer Earth.
*
* @param date - The date to calculate the Moon's elongation for.
* @returns The Moon's elongation in degrees.
*
*/
export declare const getLunarElongation: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarAngularDiameter()
*
* The Moon's angular diameter is the distance between the Moon's centre and the Moon's limb.
*
* @param date - The date to calculate the Moon's angular diameter for.
* @returns The Moon's angular diameter in degrees
*
*/
export declare const getLunarAngularDiameter: (datetime: Date, observer?: GeographicCoordinate & {
elevation: number;
}) => number;
/*****************************************************************************************************************/
/**
*
* getLunarDistance()
*
*
* The distance to the Moon is the distance between the centre of the Earth
* and the centre of the Moon, corrected for the equation of center and the
* Moon's ecliptic longitude at perigee at the epoch.
*
* @param date - The date to calculate the distance to the Moon for.
* @returns The distance to the Moon in metres.
*
*/
export declare const getLunarDistance: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarAge()
*
* The age of the Moon is calculated by ascertaining the number of degrees
* the Moon has traversed in it's orbit, given that it takes the Moon
* 29.5306 days to traverse a full 360° in one orbit cycle.
*
* @param date - The date to calculate the Moon's age for.
* @returns The Moon's age in both degrees and days.
*
*/
export declare const getLunarAge: (date: Date) => {
A: number;
age: number;
};
/*****************************************************************************************************************/
/**
*
* getLunarPhaseAngle()
*
* The phase angle of the Moon is the angle subtended by the incident
* light from the Sun as seen from the Earth's line of sight.
*
* @param date - The date to calculate the Moon's phase angle for.
* @returns The Moon's phase angle in degrees.
*
*/
export declare const getLunarPhaseAngle: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarIllimination()
*
* The total percentage illumination of the Moon as seen from Earth
* (i.e., the visible portion of the Moon), not to be confused with
* the total illumination of the Moon by the Sun which is always 50%.
*
* @param date - The date to calculate the Moon's phase angle for.
* @returns The Moon's illumination as a percentage of the visible portion of the Moon as seen from Earth.
*
*/
export declare const getLunarIllumination: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* getLunarPhase()
*
* The phase of the Moon is the shape of the Moon's illuminated portion
* as seen from the Earth.
*
* @param date - The date to calculate the Moon's phase for.
* @returns The phase of the Moon.
*
*/
export declare const getLunarPhase: (datetime: Date) => Phase;
/*****************************************************************************************************************/
/**
*
* getBrownLunationNumber()
*
* The Brown Lunation Number (BLN), per Ernest William Brown's lunar theory introduced
* in the American Ephemeris and Nautical Almanac., defining Lunation 1st as the first
* new moon of 1923 at approximately 02:41 UTC, January 17, 1923.
*
* Represents the number of Lunar synodic months since Lunation 1st.
*
*/
export declare const getLunarBrownLunationNumber: (datetime: Date) => number;
/*****************************************************************************************************************/
/**
*
* isNewMoon()
*
* @param datetime - The date to determine if the Moon is new for.
* @returns true if the Moon is new, false otherwise.
*
*/
export declare const isNewMoon: (datetime: Date) => boolean;
/*****************************************************************************************************************/
/**
*
* getNextNewMoon()
*
* @param datetime - The date to determine the next new Moon for.
* @returns The date of the next new Moon.
*/
export declare const getNextNewMoon: (datetime: Date) => Date;
/*****************************************************************************************************************/
/**
*
* isFullMoon()
*
* @param datetime - The date to determine if the Moon is full for.
* @returns true if the Moon is full, false otherwise.
*
*/
export declare const isFullMoon: (datetime: Date) => boolean;
/*****************************************************************************************************************/
/**
*
* getNextFullMoon()
*
* @param datetime - The date to determine the next full Moon for.
* @returns The date of the next full Moon.
*/
export declare const getNextFullMoon: (datetime: Date) => Date;
/*****************************************************************************************************************/
/**
*
* isBlueMoon()
*
* A Blue Moon is a full Moon that occurs twice in a single calendar month.
*
* I appreciate that the term "Blue Moon" is a colloquial term and that it
* is not an astronomical term, but it is a term that is widely used and
* understood by the general public. The term "Blue Moon" is also used to
* describe the third full Moon in a season that has four full Moons.
*
* @param datetime - The date to determine if the Moon is a Blue Moon for.
* @returns true if the Moon is a Blue Moon, false otherwise.
*/
export declare const isBlueMoon: (datetime: Date) => boolean;
/*****************************************************************************************************************/