Initial implementation of haversine formula