Compute the distance between the two COG