/*****************************************************************************************************************/ /*****************************************************************************************************************/ import { type EquatorialCoordinate, type GeographicCoordinate, type HorizontalCoordinate } from './common'; /*****************************************************************************************************************/ export interface Parameters { Ar: number; H1: number; } /*****************************************************************************************************************/ export interface Transit { /** * * * The local sidereal time of rise. * * */ LSTr: number; /** * * * The local sidereal time of set. * * */ LSTs: number; /** * * * The azimuthal angle (in degrees) of the object at rise. * * */ R: number; /** * * * The azimuthal angle (in degrees) of the object at set. * * */ S: number; } /*****************************************************************************************************************/ export interface TransitInstance { /** * * * The date and time of rise or set. * * */ datetime: Date; /** * * * The local sidereal time of rise or set. * * */ LST: number; /** * * * The Greenwich sidereal time of rise or set. * */ GST: number; /** * * * The local azimuthal angle (in degrees) of the object at rise or set. * */ az: number; } /*****************************************************************************************************************/ export declare function isTransitInstance(value: unknown): value is TransitInstance; /*****************************************************************************************************************/ /** * * isBodyCircumpolar() * * An object is considered circumpolar if it is always above the observer's horizon * and never sets. This is true when the altitude of the object at its lower * culmination is greater than the observer's horizon. * * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns a boolean indicating whether the target is circumpolar. */ export declare function isBodyCircumpolar(observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): boolean; /*****************************************************************************************************************/ /** * * isBodyVisible() * * An object is visible if it is ever above the observer's horizon. This is true when * the object's declination is greater than the observer's latitude minus 90 degrees. * * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns a boolean indicating whether the target is ever visible for the observer. */ export declare function isBodyVisible(observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): boolean; /*****************************************************************************************************************/ /** * * isBodyAboveHorizon() * * An object is above the horizon if it is above the observer's horizon at the time of observation. * * @param datetime - The date and time of the observation. * @param observer - The geographic coordinate of the observer. * @param target - The equatorial or horizontal coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns a boolean indicating whether the target is above the horizon for the observer's location and for the time of observation. * */ export declare function isBodyAboveHorizon(datetime: Date, observer: GeographicCoordinate, target: EquatorialCoordinate | HorizontalCoordinate, horizon?: number): boolean; /*****************************************************************************************************************/ /** * * doesBodyRiseOrSet() * * An object both rises and sets if it crosses the observer's horizon, e.g., it is neither * circumpolar nor perpetually below the horizon. This is a purely geometric condition on the * latitude of the observer, the declination of the object and the horizon, and so the result * does not depend on the time of observation. * * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns false if the object never rises or sets for the observer, otherwise returns the Ar and H1 transit parameters. * */ export declare function doesBodyRiseOrSet(observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): false | Parameters; /*****************************************************************************************************************/ /** * * getBodyTransit() * * Determines the local sidereal time and azimuthal angle of rise and set for an object. * * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns the transit for the body, or undefined if the body never rises or sets for the observer. * */ export declare function getBodyTransit(observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): Transit | undefined; /*****************************************************************************************************************/ /** * * getBodyNextRise() * * Determines the next rise time for an object, if at all. * * @param datetime - The date to start searching for the next rise. * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns The next rise of the object, or false where it never rises. * * N.B. A body that never rises is returned as false whether it is always above the horizon of the * observer, e.g., it is circumpolar, or never above it, e.g., it is never visible: there is no * rise to return in either case. Which of the two it is is resolved by isBodyCircumpolar() and by * isBodyVisible(). */ export declare function getBodyNextRise(datetime: Date, observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): TransitInstance | false; /*****************************************************************************************************************/ /** * * getBodyNextSet() * * Determines the next set time for an object, if at all. * * @param datetime - The date to start searching for the next set. * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns The next set of the object, or false where it never sets. * * N.B. A body that never sets is returned as false whether it is always above the horizon of the * observer, e.g., it is circumpolar, or never above it, e.g., it is never visible: there is no set * to return in either case, and so the two are not distinguished by a return that is otherwise * truthy but carries no set, e.g., the caller may take any truthy return to be a set. Which of the * two it is is resolved by isBodyCircumpolar() and by isBodyVisible(). */ export declare function getBodyNextSet(datetime: Date, observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): TransitInstance | false; /*****************************************************************************************************************/ /** * * isBodyVisibleForNight() * * Determines whether an object is visible at some point during the night. * * @param datetime - The date to start searching for the next set. * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @param horizon - The observer's horizon (in degrees). * @returns a boolean indicating whether the object is visible at some point during the night. * */ export declare function isBodyVisibleForNight(datetime: Date, observer: GeographicCoordinate, target: EquatorialCoordinate, horizon?: number): boolean; /*****************************************************************************************************************/