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.

53 lines (52 loc) 2.56 kB
/*****************************************************************************************************************/ /*****************************************************************************************************************/ import type { GeographicCoordinate } from './common'; /*****************************************************************************************************************/ /** * * getGeneralizedSolarTransit() * * This is a lower accuracy method for calculating the transit of the Sun. * * Atmospheric conditions are not taken into account. * * @param datetime - The date to calculate the generalized solar transit for. * @param observer - The geographic coordinates of the observer. * @returns The generalized solar transit for the given date. * */ export declare const getGeneralizedSolarTransit: (datetime: Date, observer: GeographicCoordinate) => { sunrise: Date | null; noon: Date | null; sunset: Date | null; J: number; ha: number; }; /*****************************************************************************************************************/ export declare const getSolarTransit: (datetime: Date, observer: GeographicCoordinate, horizon?: number, temperature?: number, pressure?: number) => { sunrise: Date | null; noon: Date | null; sunset: Date | null; }; /*****************************************************************************************************************/ /** * * getNight() * * Calculates the start and end of the next night for the observer at the given date. * * @param date - The date to calculate the extent of the next night for. * @param observer - The geographic coordinates of the observer. * @param horizon - The horizon altitude to use for the calculation. * @param temperature - The temperature to use for the calculation. * @param pressure - The pressure to use for the calculation. * @returns The start and end of the next night for the observer. * */ export declare const getNight: (datetime: Date, observer: GeographicCoordinate, horizon?: number, temperature?: number, pressure?: number) => { start: Date | null; end: Date | null; }; /*****************************************************************************************************************/ export declare const isNight: (datetime: Date, observer: GeographicCoordinate, horizon?: number, temperature?: number, pressure?: number) => boolean; /*****************************************************************************************************************/