Repository navigation
Fix vincdir longitude wrapping across the antimeridian - #174
Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
Conversation
Preserve existing return precision and in-range results; wrap out-of-range longitude before returning. Add 48 focused regression cases and install the independent reference library only in the test workflow. Refs GeoscienceAustralia#35.
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.
Fixes #35.
Wrap out-of-range longitude in vincdir() after applying its existing 11-decimal-degree return precision. Preserve in-range results, both exact +/-180 endpoint labels, and the latitude/azimuth calculations. The rounding order avoids flipping endpoint labels for sub-resolution movement.
Includes 48 regression cases and a test-only GeographicLib CI dependency. Runtime dependencies and convert.py are unchanged.
Validation: 74 existing tests passed; the new tests gave 34 failures before the correction and all 48 passed afterward. Full suite: 122 passed, including a fresh run of the submission copy. Coverage includes east/west crossings, angle objects, multiple ellipsoids, floating-point boundaries and real grid-conversion round trips.
GitHub before/after evidence (same production correction; tests subsequently renamed/formatted only):
https://github.com/timothyanderson096-ocdealcheck/gdn-engineering-benchmarks/actions/runs/39530295582
Additional local checks: 12,340 reference comparisons passed a 1 mm numerical tolerance; 9,498 already-in-range return tuples were exactly unchanged. This is not a physical positioning-accuracy claim.
Scope: direct geo2grid() endpoint tests retain the same 10 failures before/after this correction (zone 61 at/near +180); forced-zone convergence inconsistencies also remain. These separate converter defects are not fixed here. Review requested only for the focused longitude-output correction.
Reproduce:
python -m pip install -r requirements.txt pytest geographiclib==2.1
python -m pytest geodepy/tests/