cosinekitty / astronomy

Astronomy Engine: multi-language calculation of Sun, Moon, and planet positions. Predicts lunar phases, eclipses, transits, oppositions, conjunctions, equinoxes, solstices, rise/set times, and other events. Provides vector and angular coordinate transforms among equatorial, ecliptic, horizontal, and galactic orientations.
MIT License
492 stars 63 forks source link

Investigate JPL Horizons calculation of refraction for negative altitude angles #10

Closed cosinekitty closed 5 years ago

cosinekitty commented 5 years ago

JPL Horizons does not seem to calculate refraction for negative altitude angles the same way NOVAS C 3.1 does. This forced me to skip horizontal coordinate checking for tests cases of objects below the horizon. I would like to reverse engineer the JPL Horizons refraction angle formula by comparing data sets with refraction disabled (airless) and enabled. The NOVAS formula seems unpleasant to work with because it looks like there is a step discontinuity once the zenith angle goes above 91 degrees. It would be nice to see if Horizons has smooth behavior, and if so, I would like to emulate it, both for more complete unit testing and for being able to create Chebyshev approximations of objects like the Moon to have efficient rise/set/culm calculations.

cosinekitty commented 5 years ago

I figured out the JPL Horizons algorithm. Now Astronomy.Horizon() allows 4 options: false (airless), 'novas', 'jplhor', 'sae'.