Skip to content

feature: add support for the geocentric Earth radius#256

Open
msheby wants to merge 2 commits intoKosherJava:masterfrom
msheby:feature/wgs84-geocentric-radius
Open

feature: add support for the geocentric Earth radius#256
msheby wants to merge 2 commits intoKosherJava:masterfrom
msheby:feature/wgs84-geocentric-radius

Conversation

@msheby
Copy link

@msheby msheby commented Mar 18, 2026

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)

@KosherJava
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants