Calculate rise / set time from Ra, Dec, Longitude and Latitude

38 Views Asked by At

I am trying to get the local rise and set time for an object in the sky given its coordinates in right ascension and declination, as well as the observers latitude and longitude.

So far I've figured this formula out:

    ra = math.radians(ra)
    dec = math.radians(dec)
    lat = math.radians(lat)
    long = math.radians(long)

    rise = ra - math.acos(-math.tan(dec)*math.tan(lat))
    set = ra + math.acos(-math.tan(dec)*math.tan(lat))

but I'm unsure of how to convert the radians to a local time. How can I do that?

0

There are 0 best solutions below