/*****************************************************************************************************************/ import type { CartesianCoordinate, EclipticCoordinate, EquatorialCoordinate, GalacticCoordinate, GeographicCoordinate, HorizontalCoordinate } from './common'; /*****************************************************************************************************************/ /** * * convertEclipticToEquatorial() * * Performs the conversion from Ecliptic to Equatorial coordinates for a given * datetime and target (observer agnostic). * * N.B. The conversion is about the true obliquity of the ecliptic, e.g., the mean obliquity of * the date corrected for the nutation in obliquity, and so an ecliptic coordinate of the date is * referred to the true equator and equinox of the date. * * N.B. The conversion is the rotation of the unit vector of the target about the x-axis, e.g., the * direction of the true equinox of the date, through the transpose of R1(ε), e.g., the inverse of * the rotation of convertEquatorialToEcliptic(). * * @param datetime - The date and time of the observation for which to calculate the Horizontal coordinate * @param target - The ecliptical coordinate of the observed object. * @returns The equatorial coordinates of the target, with the right ascension within [0°, 360°). * */ export declare function convertEclipticToEquatorial(datetime: Date, target: EclipticCoordinate): EquatorialCoordinate; /*****************************************************************************************************************/ /** * * convertEquatorialToEcliptic() * * Performs the conversion from Equatorial to Ecliptic coordinates for a given datetime and target * (observer agnostic), as the rotation of the unit vector of the target about the x-axis, e.g., the * direction of the true equinox of the date, through the true obliquity of the ecliptic, R1(ε). * * N.B. The conversion is about the true obliquity of the ecliptic, e.g., the mean obliquity of * the date corrected for the nutation in obliquity, and so the equatorial coordinate is taken as * referred to the true equator and equinox of the date, as convertEclipticToEquatorial() returns. * * @param datetime - The date to convert the equatorial coordinate for. * @param target - The equatorial coordinate of the target. * @returns The ecliptic coordinate of the target, with the longitude within [0°, 360°). * */ export declare function convertEquatorialToEcliptic(datetime: Date, target: EquatorialCoordinate): EclipticCoordinate; /*****************************************************************************************************************/ /** * * convertGalacticToEquatorial() * * Performs the conversion from Galactic to Equatorial coordinates for a given target (observer and * datetime agnostic), as the rotation of the unit vector of the target from the galactic frame to * the International Celestial Reference System (ICRS), as is defined by the Hipparcos catalogue * (ESA 1997, Vol. 1, §1.5.3), through the transpose of G = R3(90° − θ) · R1(90° − δP) · * R3(αP + 90°), e.g., the inverse of the rotation of convertEquatorialToGalactic(). * * N.B. The galactic frame is fixed, e.g., it is not a function of the date, and is referred to the * ICRS, and so the equatorial coordinate is returned as a catalogue coordinate of the ICRS. * * @param target - The galactic coordinate of the observed object. * @returns The equatorial coordinate of the target, referred to the ICRS, with the right ascension * within [0°, 360°). * */ export declare function convertGalacticToEquatorial(target: GalacticCoordinate): EquatorialCoordinate; /*****************************************************************************************************************/ /** * * convertEquatorialToGalactic() * * Performs the conversion from Equatorial to Galactic coordinates for a given target (observer and * datetime agnostic), as the rotation of the unit vector of the target from the International * Celestial Reference System (ICRS) to the galactic frame, as is defined by the Hipparcos catalogue * (ESA 1997, Vol. 1, §1.5.3), e.g., G = R3(90° − θ) · R1(90° − δP) · R3(αP + 90°). * * N.B. The galactic frame is fixed, e.g., it is not a function of the date, and is referred to the * ICRS, and so the equatorial coordinate is taken as a catalogue coordinate referred to the ICRS. * * @param target - The equatorial coordinate of the target, referred to the ICRS. * @returns The galactic coordinate of the target, with the longitude within [0°, 360°). * */ export declare function convertEquatorialToGalactic(target: EquatorialCoordinate): GalacticCoordinate; /*****************************************************************************************************************/ /** * * convertEquatorialToHorizontal() * * Performs the conversion from Equatorial to Horizontal coordinates for a given * datetime, observer, and target. * * @param datetime - The date and time of the observation for which to calculate the Horizontal coordinate * @param observer - The geographic coordinate of the observer. * @param target - The equatorial coordinate of the observed object. * @returns The horizontal coordinates of the target * */ export declare function convertEquatorialToHorizontal(datetime: Date, observer: GeographicCoordinate, target: EquatorialCoordinate & { distance?: number; }): HorizontalCoordinate; /*****************************************************************************************************************/ /** * * convertHorizontalToEquatorial() * * Performs the conversion from Horizontal to Equatorial coordinates for a given * datetime, observer, and target. * * @param datetime - The date and time of the observation for which to calculate the Horizontal coordinate * @param observer - The geographic coordinate of the observer. * @param target - The horizontal coordinate of the observed object. * @returns The equatorial coordinates of the target */ export declare function convertHorizontalToEquatorial(datetime: Date, observer: GeographicCoordinate, target: HorizontalCoordinate): EquatorialCoordinate; /*****************************************************************************************************************/ /** * * convertGeocentricToGeographic() * * Performs the conversion from a geocentric equatorial cartesian position to the geographic * coordinate of the observer at that position, e.g., the coordinate of the point on the surface * of the Earth directly beneath them, together with their elevation above it. * * The position is given in the geocentric equatorial frame, e.g., the frame an ephemeris resolves * the position of a satellite in, with the x-axis towards the vernal equinox, the z-axis along the * rotational axis of the Earth, and the origin at its center (in SI metres). * * N.B. The latitude is resolved against a spherical Earth, e.g., it is the geocentric latitude, * which is the figure of the Earth everywhere else in the library, and the elevation is taken * above the radius given, e.g., an observer of a different figure of the Earth gives the radius * of it. * * @param datetime - The date and time of the observation, which orients the Earth beneath the position. * @param position - The geocentric equatorial cartesian position of the observer (in SI metres). * @param radius - The radius of the Earth (in SI metres). Defaults to the equatorial radius. * @throws An error if any component of the position is not finite, or the position is at the center of the Earth. * @throws An error if the radius is not finite, or is not greater than zero. * @returns The geographic coordinate of the observer, e.g., { latitude, longitude, elevation }. * */ export declare function convertGeocentricToGeographic(datetime: Date, position: Required, radius?: number): GeographicCoordinate; /*****************************************************************************************************************/ /** * * convertEquatorialToCartesian() * * Performs the conversion from an equatorial coordinate to the unit direction vector of it in the * equatorial frame, with the x-axis towards the vernal equinox, the y-axis towards a right * ascension of 90°, and the z-axis towards the north celestial pole: * * x = cos δ cos α * y = cos δ sin α * z = sin δ * * N.B. The vector is the direction of the target alone, e.g., it is of unit length, and so the * epoch and the parallax of the target, where they are given, are not taken into account. * * @param target - The equatorial coordinate of the target, e.g., { ra, dec } (in degrees). * @returns The unit direction vector of the target, e.g., { x, y, z }. * */ export declare function convertEquatorialToCartesian(target: EquatorialCoordinate): Required; /*****************************************************************************************************************/ /** * * convertCartesianToEquatorial() * * Performs the conversion from a direction vector in the equatorial frame, of any non-zero length, * to the equatorial coordinate of it, with the x-axis towards the vernal equinox, the y-axis towards * a right ascension of 90°, and the z-axis towards the north celestial pole. * * N.B. The declination is taken as the angle between the vector and the plane of the equator, e.g., * atan2(z, hypot(x, y)), and not as the arcsine of the z-component, which is ill-conditioned * towards the poles, where the sine of the declination flattens out. * * N.B. The zero vector has no direction, and so both of its angles are NaN. * * @param vector - The direction vector in the equatorial frame, e.g., { x, y, z }. * @returns The equatorial coordinate of the direction, e.g., { ra, dec } (in degrees), with the right ascension in [0, 360). * */ export declare function convertCartesianToEquatorial(vector: Required): EquatorialCoordinate; /*****************************************************************************************************************/