Package pygeodesy :: Module cartesianBase |
[frames] | no frames]

# Module cartesianBase

(INTERNAL) Private `CartesianBase` class for elliposiodal, spherical and N-/vectorial `Cartesian`s and public functions rtp2xyz, rtp2xyz_, xyz2rtp and xyz2rtp_.

After (C) Chris Veness 2011-2015 published under the same MIT Licence**, see https://www.Movable-Type.co.UK/scripts/latlong.html, https://www.Movable-Type.co.UK/scripts/latlong-vectors.html and https://www.Movable-Type.co.UK/scripts/geodesy/docs/latlon-ellipsoidal.js.html.

Version: 24.02.04

Classes
| CartesianBase (INTERNAL) Base class for ellipsoidal and spherical `Cartesian`.
| RadiusThetaPhi3Tuple 3-Tuple `(r, theta, phi)` with radial distance `r` in `meter`, inclination `theta` (with respect to the positive z-axis) and azimuthal angle `phi` in Degrees or Radians representing a spherical, polar position.

Functions
rtp2xyz(r_rtp, *theta_phi, **name_Cartesian_and_kwds) Convert spherical, polar `(r, theta, phi)` to cartesian `(x, y, z)` coordinates. |
rtp2xyz_(r_rtp, *theta_phi, **name_Cartesian_and_kwds) Convert spherical, polar `(r, theta, phi)` to cartesian `(x, y, z)` coordinates. |
xyz2rtp(x_xyz, *y_z, **name) Convert cartesian `(x, y, z)` to spherical, polar `(r, theta, phi)` coordinates. |
xyz2rtp_(x_xyz, *y_z, **name) Convert cartesian `(x, y, z)` to spherical, polar `(r, theta, phi)` coordinates. |

Variables
| __all__ = `_ALL_LAZY.cartesianBase`

Function Details

### rtp2xyz (r_rtp, *theta_phi, **name_Cartesian_and_kwds) |
Convert spherical, polar `(r, theta, phi)` to cartesian `(x, y, z)` coordinates. Arguments: `r_rtp` - Radial distance (`scalar`, conventially `meter`) or a previous RadiusThetaPhi3Tuple instance. `theta_phi` - Inclination `theta` (`degrees` with respect to the positive z-axis) and azimuthal angle `phi` (`degrees`), ignored if `r_rtp` is a RadiusThetaPhi3Tuple. `name_Cartesian_and_kwds` - Optional `name=NN` (`str`), a `Cartesian=None` class to return the coordinates and additional `Cartesian` keyword arguments. Returns: A `Cartesian(x, y, z)` instance or if no `Cartesian` keyword argument is given a Vector3Tuple`(x, y, z)`, with `x`, `y` and `z` in the same units as radius `r`, `meter` conventionally. Raises: `TypeError` - Invalid `r_rtp`. See Also: Functions rtp2xyz_ and xyz2rtp.

### rtp2xyz_ (r_rtp, *theta_phi, **name_Cartesian_and_kwds) |
Convert spherical, polar `(r, theta, phi)` to cartesian `(x, y, z)` coordinates. Arguments: `r_rtp` - Radial distance (`scalar`, conventially `meter`) or a previous RadiusThetaPhi3Tuple instance. `theta_phi` - Inclination `theta` (`radians` with respect to the positive z-axis) and azimuthal angle `phi` (`degrees`), ignored is `r_rtp` is a RadiusThetaPhi3Tuple. `name_Cartesian_and_kwds` - Optional `name=NN` (`str`), a `Cartesian=None` class to return the coordinates and additional `Cartesian` keyword arguments. Returns: A `Cartesian(x, y, z)` instance or if no `Cartesian` keyword argument is given a Vector3Tuple`(x, y, z)`, with `x`, `y` and `z` in the same units as radius `r`, `meter` conventionally. Raises: `TypeError` - Invalid `r_rtp` or `theta_phi`. See Also: Physics convention (ISO 80000-2:2019).

### xyz2rtp (x_xyz, *y_z, **name) |
Convert cartesian `(x, y, z)` to spherical, polar `(r, theta, phi)` coordinates. Returns: RadiusThetaPhi3Tuple`(r, theta, phi)` with `theta` and `phi`, both in Degrees. See Also: Function xyz2rtp_ and class RadiusThetaPhi3Tuple.

### xyz2rtp_ (x_xyz, *y_z, **name) |
Convert cartesian `(x, y, z)` to spherical, polar `(r, theta, phi)` coordinates. Arguments: `x_xyz` - X component (`scalar`) or a cartesian (`Cartesian`, Ecef9Tuple, `Nvector`, Vector3d, Vector3Tuple, Vector4Tuple or a `tuple` or `list` of 3+ `scalar` items) if no `y_z` specified. `y_z` - Y and Z component (`scalar`s), ignored if `x_xyz` is not a `scalar`. `name` - Optional `name=NN` (`str`). Returns: RadiusThetaPhi3Tuple`(r, theta, phi)` with radial distance `r` (`meter`, same units as `x`, `y` and `z`), inclination `theta` (with respect to the positive z-axis) and azimuthal angle `phi`, both in Radians. See Also: Physics convention (ISO 80000-2:2019).