Skip to content

Fix vincdir longitude wrapping across the antimeridian - #174

Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
GeoscienceAustralia:masterfrom
timothyanderson096-ocdealcheck:fix/35-vincdir-longitude-wrap
Open

timothyanderson096-ocdealcheck wants to merge 1 commit into
GeoscienceAustralia:masterfrom
timothyanderson096-ocdealcheck:fix/35-vincdir-longitude-wrap

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown

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/

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

vincdir: Geodesics crossing 180th meridian

1 participant