Siddhanta Parity API Documentation - v1.3.0
    Preparing search index...
    • Converts equatorial coordinates to horizontal coordinates.

      Given a date and time, a geographic location of an observer on the Earth, and equatorial coordinates (right ascension and declination) of a celestial body, returns horizontal coordinates (azimuth and altitude angles) for that body as seen by that observer. Allows optional correction for atmospheric refraction.

      Parameters

      • date: FlexibleDateTime

        The date and time for which to find horizontal coordinates.

      • observer: Observer

        The location of the observer for which to find horizontal coordinates.

      • ra: number

        Right ascension in sidereal hours of the celestial object, referred to the mean equinox of date for the J2000 epoch.

      • dec: number

        Declination in degrees of the celestial object, referred to the mean equator of date for the J2000 epoch. Positive values are north of the celestial equator and negative values are south.

      • Optionalrefraction: string

        If omitted or has a false-like value (false, null, undefined, etc.) the calculations are performed without any correction for atmospheric refraction. If the value is the string "normal", uses the recommended refraction correction based on Meeus "Astronomical Algorithms" with a linear taper more than 1 degree below the horizon. The linear taper causes the refraction to linearly approach 0 as the altitude of the body approaches the nadir (-90 degrees). If the value is the string "jplhor", uses a JPL Horizons compatible formula. This is the same algorithm as "normal", only without linear tapering; this can result in physically impossible altitudes of less than -90 degrees, which may cause problems for some applications. (The "jplhor" option was created for unit testing against data generated by JPL Horizons, and is otherwise not recommended for use.)

      Returns HorizontalCoordinates