satellogic / orbit-predictor

Python library to propagate satellite orbits.
MIT License
140 stars 43 forks source link

Fix get sun #127

Closed matiasg closed 2 years ago

matiasg commented 2 years ago

The original code in get_sun seems to come from https://la.mathworks.com/matlabcentral/fileexchange/23051-vectorized-solar-azimuth-and-elevation-estimation

There is a bug there with a hardcoded oblecl as 23.4406. The difference is really minuscule, it affects the 4th significant digit. There is a second bug with a sign, but it is not noticeable since the corresponding term is always 0

This PR fixes both bugs.