powered by
The function uses basic trigonometric relationships to transform XYZ coordinates to polar coordinates
CarToPol(x, ...)# S4 method for matrix CarToPol(x, norad = FALSE, origin = c(0, 0, 0))# S4 method for numeric CarToPol(x, norad = FALSE, origin = c(0, 0, 0))# S4 method for data.frame CarToPol(x, norad = FALSE, origin = c(0, 0, 0))
# S4 method for matrix CarToPol(x, norad = FALSE, origin = c(0, 0, 0))
# S4 method for numeric CarToPol(x, norad = FALSE, origin = c(0, 0, 0))
# S4 method for data.frame CarToPol(x, norad = FALSE, origin = c(0, 0, 0))
A 3-column or 2-column numeric, matrix or data.frame with longitude, latitude and, if set accordingly, radius data.
numeric
matrix
data.frame
(matrix, data.frame, numeric) A 3 column data matrix with XYZ coordinates in Cartesian space.
Arguments passed to class-specific methods.
(logical). Toggles whether the rho coordinate (distance from origin) should be omitted from the output.
logical
(numeric) Vector with length 3, the XYZ coordinates of the sphere center.
3
# some random points xyz <- rbind( c(6371, 0,0), c(0, 6371,0), c(1000,1000,1000) ) # conversions CarToPol(xyz)
Run the code above in your browser using DataLab