sphdist {astrolibR}R Documentation

Distance on a sphere

Description

Angular distance between two points on a sphere, specified by longitude and latitude

Usage

sphdist(long1, lat1, long2, lat2, degrees = FALSE)

Arguments

long1

Longitude of the first point

lat1

Latitude of the first point

long2

Longitude of the second point

lat2

Latitude of the second point

degrees

Flag denoting whether input angles are in degrees or radians

Details

The distance is computed after conversion from spherical to rectangular coordinates.

Value

dis

Angle, in degrees or radians

Author(s)

Arnab Chakraborty R adaptation 2013

See Also

gcirc

Examples

sphdist(2, 100, -35, 180, +35)
  

[Package astrolibR version 0.1 Index]