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
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.