/*****************************************************************************************************************/ import type { EquatorialCoordinate, GeographicCoordinate, HorizontalCoordinate, Interval } from './common'; import { type Planet } from './planets'; /*****************************************************************************************************************/ type Target = { name: string; } & HorizontalCoordinate & EquatorialCoordinate; /*****************************************************************************************************************/ export type Conjunction = { datetime: Date; targets: [Target, Target]; angularSeparation: number; ra: number; dec: number; }; /*****************************************************************************************************************/ /** * * getMidpointEquatorialCoordinate() * * Calculates the midpoint of two equatorial coordinates on the celestial sphere, by taking the * mean of the two coordinates as unit vectors, so as to correctly handle the wrap of right * ascension across the vernal equinox at 0h. * * @param A - The equatorial coordinate of the first target. * @param B - The equatorial coordinate of the second target. * @returns The equatorial coordinate of the midpoint between the two targets. * */ export declare function getMidpointEquatorialCoordinate(A: EquatorialCoordinate, B: EquatorialCoordinate): EquatorialCoordinate; /*****************************************************************************************************************/ /** * * isPlanetaryConjunction() * * Technically, a conjunction is when two celestial objects have the same right ascension or ecliptic longitude, however * in practice, it is when they are close together in the sky. This function tests for the latter. * * @param datetime - The date and time of the observation to test for conjunction. * @param observer - The geographic coordinate of the observer. * @param planets - The two planets to test for conjunction. * @param horizon - The minimum altitude of the planets above the horizon. * @param angularSeparationThreshold - The minimum angular separation of the planets. * @returns The conjunction of the two planets if they are in conjunction, otherwise false. * */ export declare function isPlanetaryConjunction(datetime: Date, observer: GeographicCoordinate, planets: [Planet, Planet], params?: { horizon?: number; angularSeparationThreshold?: number; }): Conjunction | false; /*****************************************************************************************************************/ /** * * isConjunction() * * Tests for a conjunction between two targets, where a conjunction is defined as an angular separation * of less than the threshold given, which is by default three degrees. * * The objects also have to be above the local observer's horizon, which is by default six degrees * to ensure good visibility. * * @param datetime - The date and time of the observation to test for conjunction. * @param targets - The two targets to test for conjunction. * @param params - The parameters for the conjunction test. * @returns The conjunction of the two targets if they are in conjunction, otherwise false. * */ export declare function isConjunction(datetime: Date, targets: [Target, Target], params?: { horizon?: number; angularSeparationThreshold?: number; }): Conjunction | false; /*****************************************************************************************************************/ /** * findPlanetaryConjunction * * Finds the next conjunction of two planets within a given time interval. * * @param startDate - The start date and time of the interval to search for conjunction. * @param endDate - The end date and time of the interval to search for conjunction. * @param observer - The geographic coordinate of the observer. * @param planets - The two planets to test for conjunction. * @param horizon - The minimum altitude of the planets above the horizon. * @param angularSeparationThreshold - The minimum angular separation of the planets. * @param stepMinutes - The step size in minutes for checking conjunction. * @throws An error if the step size is not finite, or is not greater than zero. * @returns The conjunction of the two planets if they are in conjunction, otherwise null. */ export declare function findPlanetaryConjunction(interval: Interval, observer: GeographicCoordinate, planets: [Planet, Planet], params?: { horizon?: number; angularSeparationThreshold?: number; stepMinutes?: number; }): Conjunction | undefined; /*****************************************************************************************************************/ /** * * findConjunction() * * @param interval - The interval to search for the initial conjunction. * @param targets - The two targets to test for conjunction. * @param params - The parameters for the conjunction test. * @throws An error if the step size is not finite, or is not greater than zero. * @returns The conjunction of the two targets if they are in conjunction, otherwise false. */ export declare function findConjunction(interval: Interval, targets: [Target, Target], params?: { horizon?: number; angularSeparationThreshold?: number; stepMinutes?: number; }): Conjunction | false; /*****************************************************************************************************************/ /** * findPlanetaryConjunctions * * Finds all conjunctions of the planets within a given time interval, returning only those that are in * conjunction with each other (as determined by the angular separation threshold). * * @param interval - The interval to search for the initial conjunction. * @param observer - The geographic coordinate of the observer. * @param horizon - The minimum altitude of the planets above the horizon. * @param angularSeparationThreshold - The minimum angular separation for conjunction. * @param stepMinutes - The step size in minutes for checking conjunction. * @throws An error if the step size is not finite, or is not greater than zero. * @returns An array of conjunctions found. * */ export declare function findPlanetaryConjunctions(interval: Interval, observer: GeographicCoordinate, params?: { horizon?: number; angularSeparationThreshold?: number; stepMinutes?: number; }): Map; /*****************************************************************************************************************/ /** * findConjunctions * * Finds all conjunctions of the planets, the Moon, Spica and Regulus within a given time interval, * returning only those that are in conjunction with each other (as determined by the angular * separation threshold). * * @param interval - The interval to search for the initial conjunction. * @param observer - The geographic coordinate of the observer. * @param horizon - The minimum altitude of the targets above the horizon. * @param angularSeparationThreshold - The minimum angular separation for conjunction. * @param stepMinutes - The step size in minutes for checking conjunction. * @throws An error if the step size is not finite, or is not greater than zero. * @returns The closest conjunction found for each pair of targets, keyed by their names. * */ export declare function findConjunctions(interval: Interval, observer: GeographicCoordinate, params?: { horizon?: number; angularSeparationThreshold?: number; stepMinutes?: number; }): Map; export {}; /*****************************************************************************************************************/