feature: add support for the geocentric Earth radius#256
feature: add support for the geocentric Earth radius#256msheby wants to merge 2 commits intoKosherJava:masterfrom
Conversation
|
@msheby , thank you very much for the PR. You may have noticed that there is a 3-0-modernization branch, and that is currently keeping me busy. I hope to look at this in a few weeks. |
|
Oh, I didn't notice; would you like me to rebase my PR on that work? |
|
@msheby , |
|
(First of all, I'm happy to get into the provinence of my contribution offline.) With respect to your questions, yes, I'm familiar with the NREL paper. It explicitly implements the second edition of the Meeus book. Section 3.12 ("Calculate the topocentric sun right ascension") incorporates observer geographical latitude using the 1976 IAU values found on page 82 of Meeus. As my commit indicates, these values are the more recent WGS84 ones. With respect to your last question, it might be cleaner to fold in rigorous altitude calculations than to alter the physical modeling to get what a user is truly interested in. |
Use WGS84 ellipsoid for latitude-dependent Earth radius in elevation adjustments
Add getGeocentricRadius() to AstronomicalCalculator that calculates
Earth's radius based on observer latitude using WGS84 ellipsoid.
ZmanimCalendar now uses this when elevation adjustments are enabled.
Earth's radius varies from 6378.137 km at equator to 6356.752 km at
poles. Using a fixed 6356.9 km introduced systematic errors of ~14 km
at mid-latitudes, translating to 1-2 seconds in sunset calculations.
Reference: WGS84 ellipsoid parameters (NGA Technical Report 8350.2)