I wrote a new extension to measure distances between two points. Currently it has to methods
- pythagorean(a, b)
- allows you to calculate the hypotenuse of a and b according to the pythagorean theorem
- gcDistance(lat1, lng1, lat2, lng2)
- allows you to calculate the great-circle distance between two points on a sphere. Input format is decimal degrees (like in the other location components)
- haversineFormula(lat1, lng1, lat2, lng2)
- Has a higher accuracy for shorter distances than the gcDistance
- vincentyFormula(lat1, lng1, lat2, lng2)
- The vincenty formula allows you to calculate the distance between two points on earth with an accuracy of 50 m.
The extension is hosted in my Github repo.
Please post all suggestions and issues here.
2017-09-01: Initial release
2017-09-02: v2 with more functions
2018-01-05: fixed Play Store error in v3