Calculate the distance between two coordinates