Distance tools extension


#1

I wrote a new extension to measure distances between two points. Currently it has four 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.


Changelog

2017-09-01: Initial release
2017-09-02: v2 with more functions
2018-01-05: fixed Play Store error in v3


Google maps cicle
Check if user is near a location
Tomar distancia y tiempo de Google maps
#2

I have just downloaded it. Thank you!


#3

Excelente, cuando tienes un tutorial?


#4

wait a tutorial also, thanks


#5

Gracias RedPanda, seria genial un pequeño tutorial


#6

You all want a tutorial, but the input is simply latitude and longtitude of point 1 and 2 :slight_smile:


#7

Other formula is by Haversine:

http://kio4.com/appinventor/15D_procedimientos.htm

En un plano puedes medir la distancia de esta manera;

http://kio4.com/appinventor/15C_procedimientos.htm


#8

v2 is out now and has two new formulas: haversine and vincenty


#9

i want say thanks for all, i could make with Haversine


#10

May I ask, what is the distance unit for this extension? (miles / kilometers)


#11

I would imagine it’s km but you can double check by calculating the distance between two know points:

https://www.movable-type.co.uk/scripts/latlong.html


#12

very clear thank you, Domhnall


#13

thank you for fix in Play store
finally i found the problem was couse your extention :XD


#14

method for show markers in certain circle from string in your choosing and show it in advanced ListView
D: The distance for your location


#15

Hi…
The resolution of this image is very bad. Could you upload a better resolution sample?


#16

you can see blocks in aia example


#17

thank you.