Reputation: 6366
PyEphem is a neat library that allows easy calculation of sunrise, set, dawn, and dusk of location based on lat, long, and UTC timestamp
I don't want to go through the calculation myself, rather I was wondering if there is an existing library I could use
Upvotes: 1
Views: 1681
Reputation: 1585
I know this post is old but check out CoordinateSharp. It can do exactly what you described. It can even do Solar/Lunar eclipse calculations.
Example Usage:
Coordinate c = new Coordinate(19.0991676, -98.2209974, DateTime.Now());
c.CelestialInfo.SunRise; //Returns sunrise nullable DateTime for location.
Upvotes: 0