This functions finds distance (in km) between two points on Earth using latitude-longitude coordinates of the two points. Distance is calculated using two distance funstions: Haversine and Pythagoran. The first output is based on Haversine function, which is more accurate especially for longer distances.
latlon1: latlon of origin point [lat lon]
latlon2: latlon of destination point [lat lon]
d1km: distance calculated by Haversine formula
d2km: distance calculated based on Pythagoran theorem
--Example 1, short distance:
%d1km approximately equal to d2km
--Example 2, longer distance:
d1km is significantly different from d2km (d2km is not able to work for longer distances).