For distance between two GPS coordinates as I googled I realized the best method to use is haversine formula.

The **haversine formula** is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides and angles of spherical “triangles”.