View source: R/sl.lonlatrot2abg.R
sl.lonlatrot2abg | R Documentation |
Convert rotation parameters from longitude-latitude-rotation to alpha-beta-gamma.
sl.lonlatrot2abg(lonlatrot)
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. |
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).
Helge Goessling
sl.rot
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.