% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spherical_distance.R
\name{spherical_distance}
\alias{spherical_distance}
\title{Calculate the distance between two locations}
\usage{
spherical_distance(lat1, long1, lat2, long2)
}
\arguments{
\item{lat1}{Latitude of the first location.}

\item{long1}{Longitude of the first location.}

\item{lat2}{Latitude of the second location.}

\item{long2}{Longitude of the second location.}
}
\value{
A numeric value giving the distance in meters between the
pair of locations.
}
\description{
This function uses the haversine formula to calculate the great circle
distance between two locations, identified by their latitudes and longitudes.
It is borrowed from rnoaa
(https://github.com/ropenscilabs/rnoaa/blob/master/R/meteo_distance.R) and
included here as rnoaa is a large package that is rather unrelated to
maxcovr. I have renamed it from meteo_spherical_distance to
spherical_distance
}
\note{
This function assumes an earth radius of 6,371 km.
}
\examples{

spherical_distance(lat1 = -27.4667,
                   long1 = 153.0217,
                   lat2 = -27.4710,
                   long2 = 153.0234)

}
\author{
Alex Simmons \email{a2.simmons@qut.edu.au},
Brooke Anderson \email{brooke.anderson@colostate.edu}
}
