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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/sl.lonlatrot2abg.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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

helgegoessling/spheRlab documentation built on Sept. 29, 2017, 6:36 a.m.