rhannequin / astronoby

Ruby library based on astronomy and astrometry books
https://dev.to/rhannequin/series/17782
MIT License
59 stars 2 forks source link

Compute the equation of time #40

Closed rhannequin closed 8 months ago

rhannequin commented 8 months ago

The equation of time is the difference of the real Sun time and the mean Sun time. This difference is due to the elliptical shape of the Earth's orbit, and the obliquity of the orbit.

Sun now has a #equation_of_time method that returns an integer: the time difference in seconds.

date = Date.new(2010, 7, 27)

Astronoby::Sun.equation_of_time(date: date)
# => -392