Skip to content

[Feature Request] Use mapbox/cheap-ruler (not Haversine) for GPS distance calculations #1031

@aavmurphy

Description

@aavmurphy

Have a look at mapbox/cheap-ruler:
blog: https://blog.mapbox.com/fast-geodesic-approximations-with-cheap-ruler-106f229ad016
code: https://github.com/mapbox/cheap-ruler

It has very fast point-to-point geo-distance calculations. It uses only 1 Longitude based trig call, once! And, it is usually more accurate than Haversine (it is an approximation of a more accurate formulae based on the Earth's actual shape, a squashed sphere, not a sphere) . This is a dramatic speedup for geo-distance calculations.

Either get the median Lon for the markers, or do per degree (e.g. 23.5 to 24.5 ~ 23), do the 1 trig call, then all point-to-point distance calculations are trig-free.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage meI really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions