R/distance.R

distance <-
function(long1, lat1, long2, lat2){
    sqrt(((long2 - long1) * .long.to.km((lat1 + lat2)/2))^2 + ((lat2 - lat1) * .lat.to.km((lat1 + lat2)/2))^2)
}

Try the nwfscMapping package in your browser

Any scripts or data that you put into this service are public.

nwfscMapping documentation built on May 2, 2019, 5:27 p.m.