Fixed function that returns distance between coordinates in km.