la1k / libpredict

A satellite orbit prediction library
GNU General Public License v2.0
39 stars 24 forks source link

Sunrise, sunset, moonrise and moonset. #17

Open thomasing opened 9 years ago

thomasing commented 9 years ago

Proposed API functions: time predictsunrise(observer, time, observation_) time predictsunset(observer, time, observation_) time predictmoonrise(observer, time, observation_) time predictmoonset(observer, time, observation_) All functions should use apparent elevation and correct for sun disk and moon disk diameter, such that sunrise happens at the moment the top of the sun disk is above the horizon. Functions should return the predicted time and fill observation pointer with observation data, if it is provided.

ryeng commented 8 years ago

I think we should have some more parameters to define which definition of sunrise/sunset is requested. See http://search.cpan.org/~jforget/Astro-Sunrise-0.95/lib/Astro/Sunrise.pm#DESCRIPTION for some definitions.

We can provide constants in header files for the most common ones.