Note that spdep provides functions for calculating Great Circle distances, see dnearneigh() and nbdist().