Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web service or .net library for moon and sun set/rise times?

Tags:

.net

astronomy

Anyone know of a web service or .NET class library that can provide rise/set times for the sun and moon for any given date and any given latitude/longitude?

Thanks in advance.

like image 750
NovaJoe Avatar asked Dec 29 '25 02:12

NovaJoe


2 Answers

yes - the SunTime class at CodeProject may be of some help!

like image 86
Grace Avatar answered Dec 31 '25 16:12

Grace


Have a look at The ASCOM Initiative. This is the technology used by Microsoft's World Wide Telescope to provide control of telescopes. In version 5.5 of the ASCOM Platform, one of the new components that we've just introduced is a .NET interface to the NOVAS library, which gives you a host of vector astrometry routines and the Kepler orbit engine for doing positional astrometry on solar system bodies.

I don't think that there is a function that will directly give you sunrise/sunset, but it will give you all of the building blocks you need to compute these and much more.

All of this is open source, too. The original NOVAS routines are available from the US Naval Observatory site linked above, in both FORTRAN and C. The ASCOM source code is available from our subversion server.

like image 37
Tim Long Avatar answered Dec 31 '25 17:12

Tim Long



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!