equatorial_to_horizontal

ssapy.utils.equatorial_to_horizontal(observer_latitude, declination, right_ascension=None, hour_angle=None, local_time=None, hms=False)[source][source]

Convert equatorial coordinates (declination and either right ascension or hour angle) to horizontal coordinates (azimuth and altitude) for a given observer’s latitude.

Parameters:

observer_latitude (float): Latitude of the observer in degrees. declination (float): Declination of the celestial object in degrees. right_ascension (float, optional): Right ascension of the celestial object in hours.

If provided, local_time is required to calculate hour angle.

hour_angle (float, optional): Hour angle of the celestial object in degrees or hours.

If provided, it will be used directly for calculations.

local_time (float, optional): Local time in hours, used to compute hour angle from right ascension. hms (bool, optional): If True, interprets hour angle or right ascension as hours-minutes-seconds (HMS)

and converts them to decimal degrees.

Returns:

tuple: A tuple containing:
  • azimuth (float): Azimuth angle in degrees, measured clockwise from north.

  • altitude (float): Altitude angle in degrees, measured above the horizon.

Notes:

  • Either right_ascension or hour_angle must be provided for the calculation.

  • If both right_ascension and hour_angle are provided, hour_angle will take precedence.