cart2sph_deg
- ssapy.utils.cart2sph_deg(x, y, z)[source][source]
Convert Cartesian coordinates to spherical coordinates in degrees.
This function converts Cartesian coordinates (x, y, z) to spherical coordinates: azimuth (az), elevation (el), and radius (r). The azimuth and elevation angles are returned in degrees.
Parameters:
x (float or array-like): The x-coordinate(s). y (float or array-like): The y-coordinate(s). z (float or array-like): The z-coordinate(s).
Returns:
- tuple:
az (float or array-like): Azimuth angle in degrees (angle in the x-y plane from the positive x-axis).
el (float or array-like): Elevation angle in degrees (angle from the x-y plane to the z-axis).
r (float or array-like): Radius (distance from the origin).
Example:
cart2sph_deg(1, 1, 1) -> (45.0, 35.264389682754654, 1.7320508075688772)