I have the satellite longitude, latitude and altitude. Then I have the Ra&Decl of and distant object. I need to know the angular distance between the object and the moon/sun at a given time.
import ephem
sun = ephem.Sun()
scraft = ephem.Observer()
scraft.lon = lon
scraft.lat = lat
scraft.elevation = altit
scraft.date = time-15019.5 # my time is in MJD
sun.compute(scraft)
print float(sun.dec), float(sun.ra)
Is this the correct approach? is there a way to check the result? (another tool with a web interface, where I could type in the numbers for few cases and see if there is difference)