ComputeDistance: Compute the Distance Between Two Coordinates

View source: R/ComputeDistance.R

ComputeDistanceR Documentation

Compute the Distance Between Two Coordinates

Description

This function computes the distance between two geographical coordinates. These locations must be in decimal degrees.

Usage

ComputeDistance(Lat1, Lat2, Lon1, Lon2)

Arguments

Lat1

the latitude of the first coordinate

Lat2

the latitude of the second coordinate

Lon1

the longitude of the first coordinate

Lon2

the longitude of the second coordinate

Details

Coordinates are given in decimal degrees (WGS 84)

Examples

# Calculate the distance between two coordinates
ComputeDistance(-12.19506,-12.19477,141.8946,141.8980) 

RossDwyer/VTrack documentation built on Feb. 23, 2024, 10:40 p.m.