gcd_km: Great circle distances

Description Usage Arguments Value Examples

Description

Calculate great circle distances between pairs of points on sphere, by default, the earth.

Usage

1
2
3
4
5
6
7
gcd_km(x, y, ...)

## S4 method for signature 'numeric,numeric'
gcd_km(x, y, x1, y1, ..., R = 6371)

## S4 method for signature 'xy,xy'
gcd_km(x, y, ...)

Arguments

x, y

pair of numeric vectors or single xy object for Longitude (decimal degrees)

...

extra parameters passed on to methods

x1, y1

pair of numeric vectors or a single "xy" object for Latitude (decimal degrees)

R

radius of the sphere, default the radius of the earth in kilometres

Value

distances between point pairs, usually in km

Examples

1
2
3
Brisbane <- list(x = 153.0251, y = -27.4698)
Cairns <- list(x = 145.7781, y = -16.9186)
gcd_km(Brisbane, Cairns)

BillVenables/WWRGraphics documentation built on Feb. 1, 2021, 12:13 p.m.