sl.lonlatrot2abg: Convert Rotation Lon-Lat-Rot to Alpha-Beta-Gamma

View source: R/sl.lonlatrot2abg.R

sl.lonlatrot2abgR Documentation

Convert Rotation Lon-Lat-Rot to Alpha-Beta-Gamma

Description

Convert rotation parameters from longitude-latitude-rotation to alpha-beta-gamma.

Usage

sl.lonlatrot2abg(lonlatrot)

Arguments

A vector of length 3 with the following elements:

lonlatrot[1]

The longitude of the point that is supposed to be the new North Pole.

lonlatrot[2]

The latitude of the point that is supposed to be the new North Pole.

lonlatrot[3]

The angle (in degrees) of rotation around the new North Pole.

Value

A vector of length 3 with the parameters alpha, beta, and gamma as used in sl.rot. Note that to achieve identity transformation (that is, no transformation at all) the third element of the argument must be -90 (see the second example).

Author(s)

Helge Goessling

See Also

sl.rot

Examples

abg = sl.lonlatrot2abg(lonlatrot=c(30,0,5))
sl.rot(lon=0,lat=0,alpha=abg[1],beta=abg[2],gamma=abg[3])
## Should return: 
## $lon
## [1] 175
## 
## $lat
## [1] 60
sl.rot(lon=30,lat=0,alpha=abg[1],beta=abg[2],gamma=abg[3])
## Should return: $lon
## [1] -20.55605
## 
## $lat
## [1] 90

abg = sl.lonlatrot2abg(lonlatrot=c(0,90,-90))
sl.rot(lon=-150,lat=40,alpha=abg[1],beta=abg[2],gamma=abg[3])
## Should return:
## $lon
## [1] -150
## 
## $lat
## [1] 40

FESOM/spheRlab documentation built on April 6, 2024, 6:52 p.m.