View source: R/cartesian_to_polar.R
cartesian_to_polar | R Documentation |
Convert from East-North-Up cartesian coordinates to polar coordinates.
cartesian_to_polar(cartesian, anchor = c(0, 0, 0), digits = NULL)
cartesian |
A |
anchor |
A |
digits |
A |
It assumes that the positive *Z* axis is the reference vector for the zenith angle. Likewise, it assumes that the *Y* axis is the north-south direction (positive to negative) for the azimuth angle.
If a point from cartesian
presents the same *XY* coordinates than anchor
, angles
returns NA
.
A data.table
with the zenith and azimuth angles (degrees), and the distance to the anchor coordinate.
J. Antonio Guzmán Q.
polar_to_cartesian
data(pc_tree) cartesian_to_polar(pc_tree) anchor <- c(1, 1, 1) cartesian_to_polar(pc_tree, anchor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.