Repository navigation
geo3d 0.3.0: exact where it matters
An accuracy release. Your code keeps compiling: no public type, method or signature has changed.
Some results are now more accurate, as listed below.
🎯 More accurate
- Distance along the ground now works for every pair of points
(#3).geodesic_inverseandgeodesic_direct
now use Karney's algorithm, the one GeographicLib uses, instead of Vincenty's.- It is accurate to about 15 nm, up from about 0.5 mm.
geodesic_inverseused to returnNonefor points on nearly opposite sides of the Earth. Now
it only returnsNonefor NaN or infinite input, or a latitude beyond ±90°.- It matches geographiclib-rs to within 4 nm on 25 000 test pairs.
- The code is ported from GeographicLib and geographiclib-rs, which are both MIT-licensed. See
NOTICE.
- Four precision fixes (#5). Each has a test
that failed before the fix:- Elevation near straight up. It used to round to exactly 90°, up to 0.6 m out at
geostationary range. This affects every look angle. - Great-circle distance. It was up to 0.9 m short near the far side of the Earth. It is now
accurate to about a nanometre everywhere. Vec3::angle_to. Tiny angles used to come out as 0.- Ray–ground intersections. These lost precision when starting close to the surface. This
affectsray_intersect,ground_strikeandline_of_sight.
- Elevation near straight up. It used to round to exactly 90°, up to 0.6 m out at
📖 Clearer docs
- The README and the docs.rs front page were rewritten in plain language. They now have recipes, a
"find what you need" table, an accuracy table, a glossary, and a lookup table for MATLAB, pymap3d
and map_3d users. - There is a new comparison against five other Rust crates, with charts.
It covers accuracy, tricky cases, features and speed, including the places where geo3d is
slower. - There is a new contributing guide.
- A correction: the
eciframe is TEME, the one SGP4 satellite models use. It is not J2000, which
differs by about 0.4°. Treating UTC as UT1 can add up to 400 m. The old docs promised "tens of
metres", which wasn't true. - docs.rs now shows the optional features. Searching for familiar names like
geodetic2aer,
vdistorhaversinenow finds the matching geo3d function.
⚡ Speed
geodesic_directis a little faster than before, and about 13 % faster than geographiclib-rs.geodesic_inversetakes about twice as long as before (about 0.86 µs per call). That extra work
is what makes it exact everywhere. It is within 4 % of geographiclib-rs.- Look angles and great-circle distance are 15–20 ns slower per call, because of the precision
fixes.
🧹 Housekeeping
- The code is split into one module per topic.
- The crates.io description is simpler. The
no-std::no-alloccategory was removed, because geo3d
needsstdtoday (#12 will change that). - CI now checks that every code change comes with a CHANGELOG line.
📦 crates.io · 📖 docs.rs · 📊 How it compares