How to Calculate the Distance Between Two Geohashes or Locations
If I want to calculate the distance between two positions, how can I achieve this?
If you have two geohashes, you first need to decode them into latitude and longitude:
After you have your coordinates you can calculate the distance:
IF(! ISBLANK(#Timestamp); (ACOS(COS(RADIANS(90-#LatitudeFrom)) *COS(RADIANS(90-#LatitudeTo)) +SIN(RADIANS(90-#LatitudeFrom)) *SIN(RADIANS(90-#LatitudeTo)) *COS(RADIANS(#LongitudeFrom-#LongitudeTo))) *3958.756); null)
whereby r = 3958.756 gives the distance in miles and r = 6371 in kilometer.