brandon-rhodes / pyephem

Scientific-grade astronomy routines for Python
Other
783 stars 121 forks source link

Wrong computation for constellation positions #249

Closed xwiz closed 1 year ago

xwiz commented 1 year ago

I am using this library for the first time today and was shocked by the result of the following simple program. How can the sun be in Sagittarius instead of Capricorn in any new year?

import datetime
import ephem

#Create Sun object
Sun = ephem.Sun()

#Calculate the position of the Sun for the given date
Sun.compute("1991/01/01")

#Find the constellation in which the Sun is positioned
constellation = ephem.constellation(Sun)

#Print the constellation
print("The Sun is positioned in the constellation of", constellation[1])