cart2polar: Turns Cartesian coordinates into polar coordinates

View source: R/EMEGShelper.R

cart2polarR Documentation

Turns Cartesian coordinates into polar coordinates

Description

This function takes Cartesian coordinates and turns them into polar/geographic coordinates. Finding these positions are necessary for creating ecfg configuration files for EMEGS such that the software knows its three dimensional location on a sphere. Assumes radius of one, X is right ear (negative) to left ear (positive), Y positive toward nose , and Z is 1 at Cz. Spherical coordinates are returned in radians and degrees. Theta is 0 at Cz pi at other pole. Phi is zero at right ear, pi/2 (90°) at nose, pi (180°) at left ear, 3/2*pi (270°) at Oz.

Usage

cart2polar(x_coor, y_coor, z_coor)

Arguments

x_coor

x coordinate between -1 and 1

y_coor

y coordinate between -1 and 1

z_coor

z coordinate between -1 and 1

Value

Returns a named vector with theta and phi in degrees and radians

Author(s)

Andrew H Farkas, andrewhfarkas at g mail dot com


AndrewHFarkas/EMEGShelper documentation built on Oct. 20, 2023, 9:57 a.m.