degreelen: Compute the length of 1-degree of latitude and longitude

View source: R/degreelen.R

degreelenR Documentation

Compute the length of 1-degree of latitude and longitude

Description

Compute the length of 1-degree of latitude and longitude

Usage

degreelen(lat, model)

ellipsoid(model = c("IRTF", "WGS84"))

Arguments

lat

numeric; degrees

model

(optional) character; which ellipsoidal correction should be used?

Author(s)

A.J.Barbour, adapted from degreelen.m by B.W.Crowell

References

http://en.wikipedia.org/wiki/World_Geodetic_System

Examples

## Not run: 
lats <- 30:32
# Lon should be about 111.4 km, and Lat 96 - 94 km
degreelen(lats)

# In most cases there is no discerible effect
# caused by varying the semi-major axis.
#   Not much difference according to this machine:
all.equal(degreelen(lats,"IRTF"), degreelen(lats,"WGS84"), tolerance = .Machine$double.eps)

#   unless the precision of the input is in micrometers, 
#   which is essentially impossible to achieve:
options(digits=13)
lats <- 30.1111111123
rbind(degreelen(lats,"IRTF"),degreelen(lats,"WGS84"))

## End(Not run)

abarbour/deform documentation built on Dec. 5, 2024, 1:55 p.m.