Learn R Programming

IRISSeismic (version 1.6.7)

surfaceDistance: Earth surface distance between two points

Description

The surfaceDistance() function calculates the distance in kilometers between any two lat-lon pairs using the Haversine equation.

Usage

surfaceDistance(lat1_deg, lon1_deg, lat2_deg, lon2_deg)

Value

Distance in kilometers

Arguments

lat1_deg

latitude 1 (degrees)

lon1_deg

longitude 1 (degrees)

lat2_deg

latitude 2 (degrees)

lon2_deg

longitude 2 (degrees)

Author

Jonathan Callahan jonathan@mazamascience.com

References

https://en.wikipedia.org/wiki/Haversine_formula