One function
departure in geospace-code/pymap3d
The author described this change as “loxodrome_inverse: fix an issue that (circumference / 2 - distance) is returned when lat1 == lon2 and lon1 < lon2”. It counts as a record because the check below fails on the code as it stood at a2e91517f and passes on 7db6ac364, with nothing else changed between the two runs.
Projectgeospace-code/pymap3d
Fix saved2022-10-25
Sharing licenceBSD-2-Clause · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Computes the distance along a specific parallel between two meridians. like Matlab departure() Parameters ---------- lon1, lon2 : float geodetic longitudes (degrees) lat : float geodetic latitude (degrees) ell : Ellipsoid, optional reference ellipsoid deg : bool, optional degrees input/output (False: radians in/out) Returns ------- dist: float ground distance (meters)
The change
| 23 | 23 | if deg: | |
| 24 | 24 | lon1, lon2, lat = radians(lon1), radians(lon2), radians(lat) | |
| 25 | 25 | ||
| 26 | - | return rcurve.parallel(lat, ell=ell, deg=False) * ((lon2 - lon1) % pi) | |
| 26 | + | return rcurve.parallel(lat, ell=ell, deg=False) * (abs(lon2 - lon1) % pi) |
The check that tells the two apart
fail→pass·src/pymap3d/tests/test_rhumb.py::test_loxodrome_inverse[0-0-0-1-111319.49-90]
Check file src/pymap3d/tests/test_rhumb.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before ita2e91517fa455ef04d46794f65eba4f76d62493c
Broken version dated2022-10-25
Modulepymap3d.lox
Units changeddeparture
Fingerprintfef8e00eaf24bbf2
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in geospace-code/pymap3d
- 2023-02-26Ellipsoid