cartesian_to_polar: Cartesian to Polar Coordinates

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/cartesian_to_polar.R

Description

Convert from East-North-Up cartesian coordinates to polar coordinates.

Usage

1
cartesian_to_polar(cartesian, anchor = c(0, 0, 0), digits = NULL)

Arguments

cartesian

A data.table with three columns describing the *XYZ* coordinates of a point cloud.

anchor

A numeric vector of length three which describe the *XYZ* anchor coordinate for reference to get the polar coordinates. It assumes that the reference coordinates are c(X = 0, Y = 0, Z = 0) as default.

digits

A numeric vector of length 1 describing the decimal numbers to round the zenith and azimuth angles. If NULL, round does not apply. NULL as default.

Details

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.

Value

A data.table with the zenith and azimuth angles (degrees), and the distance to the anchor coordinate.

Author(s)

J. Antonio Guzmán Q.

See Also

polar_to_cartesian

Examples

1
2
3
4

Antguz/rTLS documentation built on Dec. 14, 2021, 9:49 a.m.