feat: add WGS84 geocentric radius with refraction-corrected dip#282
Open
msheby wants to merge 1 commit into
Open
feat: add WGS84 geocentric radius with refraction-corrected dip#282msheby wants to merge 1 commit into
msheby wants to merge 1 commit into
Conversation
Adds latitude-aware dip calculation to AstronomicalCalculator using the exact WGS84 ellipsoid formula and atmospheric refraction coefficient k. New API: - getGeocentricRadius(double latitude): exact WGS84 surface radius R(φ) - getElevationAdjustment(double elevation, double latitude): 2-arg overload - getElevationAdjustment(double observerElevation, double horizonElevation, double latitude): 3-arg overload with elevated-horizon support - adjustZenith(double, double, double, LocalDate): 4-arg overload - adjustZenith(double, double, double, double, LocalDate): 5-arg overload - getRefractionCoefficient() / setRefractionCoefficient(double): accessor pair for atmospheric refraction coefficient (default 0.17, range [0, 1)) Dip formula: acos(R_eff / (R_eff + h_km)) where R_eff = R(φ) / (1 - k). Sub-horizon clamping (observerElevation < horizonElevation) returns 0°; exact computation of a raised-horizon angle requires terrain distance, which is not available in this API. All four subclasses (NOAACalculator, MeeusCalculator, SPACalculator, SunTimesCalculator) updated to pass latitude to the new 4-arg adjustZenith. equals/hashCode updated to include refractionCoefficient. BREAKING CHANGE: getEarthRadius(), setEarthRadius(double), getElevationAdjustment(double), and adjustZenith(double, double, LocalDate) have been removed. Use getElevationAdjustment(double, double) and adjustZenith(double, double, double, LocalDate) instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds latitude-aware dip calculation to AstronomicalCalculator using the exact WGS84 ellipsoid formula and atmospheric refraction coefficient k.
New API:
Dip formula: acos(R_eff / (R_eff + h_km)) where R_eff = R(φ) / (1 - k). Sub-horizon clamping (observerElevation < horizonElevation) returns 0°; exact computation of a raised-horizon angle requires terrain distance, which is not available in this API.
All four subclasses (NOAACalculator, MeeusCalculator, SPACalculator, SunTimesCalculator) updated to pass latitude to the new 4-arg adjustZenith. equals/hashCode updated to include refractionCoefficient.
BREAKING CHANGE: getEarthRadius(), setEarthRadius(double), getElevationAdjustment(double), and adjustZenith(double, double, LocalDate) have been removed. Use getElevationAdjustment(double, double) and adjustZenith(double, double, double, LocalDate) instead.