The functions transform a coordinate system into another. Currently, essentially only from the earth system to cartesian.
RMtrafo
is the internal basic function that also allows
to reduce vectors to their norm.
1 2 3 
new 
integer or character. One of the values
Or the corresponding Note that Default: 
phi 
optional submodel 
coord 
matrix or vector of earth coordinates 
units 
"km" or "miles"; if not given and

system 
integer or character. The coordinate system, e.g.

grid 
logical. Whether the given coordinates are considered to
be on a grid given by Default: FALSE 
... 
the optional arguments of 
The functions transform between different coordinate systems.
The function RMtrafo
returns a matrix, in general. For
fixed column,
the results, applied to each row of the matrix, are returned.
The function RFearth2cartesian
returns a matrix in
onetoone correspondance with coord
assuming that the
earth is an ellipsoid.
The function RFearth2dist
calculates distances, cf.
dist
, assuming that the
earth is an ellipsoid.
Important options are units
and coordinate_system
, see
RFoptions
.
Note also that the zenit must be given explicitely for projection onto a plane. See the examples below.
Martin Schlather, schlather@math.unimannheim.de
For calculating the earth coordinates as ellipsoid:
linkconstants,
RMangle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  data(weather)
(coord < weather[1:5, 3:4])
(z < RFfctn(RMtrafo(new=RC_CARTESIAN_COORD), coord))
(z1 < RFearth2cartesian(coord)) ## equals z
z1  z ## 0, i.e., z1 and t(z) are the same
dist(z)
(d < RFearth2dist(coord))
d  dist(z) ## 0, i.e., d and dist(z) are the same
## projecction onto planes
RFoptions(zenit=c(122, 47))
RFearth2cartesian(coord, system="gnomonic")
RFearth2cartesian(coord, system="orthographic")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.