sl.smalltriag.area: Compute Small Triangle Area on Sphere

View source: R/sl.smalltriag.area.R

sl.smalltriag.areaR Documentation

Compute Small Triangle Area on Sphere

Description

Compute the area of a small triangle on a sphere.

Usage

sl.smalltriag.area(lon, lat)

Arguments

lon

a vector of length 3 specifying the longitudes of the triangle vertices.

lat

a vector of length 3 specifying the latitudes of the triangle vertices.

Details

This function works in x-y-z coordinates, meaning that it becomes imprecise for larger triangles (e.g. spanning more than a few degrees). However, the function is comparably fast and may therefore be favoured when applied to many small triangles. If accuracy is an issue, use sl.triag.area instead.

Value

A scalar giving the area of the triangle (on a unit sphere).

Author(s)

Helge Goessling

See Also

sl.triag.area, sl.polygon.area

Examples

sl.smalltriag.area(lon=c(0,2,1),lat=c(0,0,1))
## Should return:
## [1] 0.0003045813
## (Compare the result of sl.triag.area: 0.0003046329)

sl.smalltriag.area(c(0,60,30),c(0,0,30))
## Should return:
## [1] 0.2454951
## (Compare the result of sl.triag.area: 0.2866951)

helgegoessling/spheRlab documentation built on April 8, 2024, 8:34 a.m.