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

# Module nvectorBase

(INTERNAL) Private elliposiodal and spherical `Nvector` base classes LatLonNvectorBase and NvectorBase and function sumOf.

Pure Python implementation of `n-vector`-based geodesy tools for ellipsoidal earth models, transcoded from JavaScript originals by (C) Chris Veness 2005-2016 and published under the same MIT Licence**, see Vector-based geodesy.

Version: 24.11.24

Classes
| NvectorBase (INTERNAL) Base class for ellipsoidal and spherical `Nvector`s.
| LatLonNvectorBase (INTERNAL) Base class for n-vector-based ellipsoidal and spherical `LatLon`s.

Functions
n_xyz2latlon(x_xyz, y=0, z=0, **name) Convert `n-vector` to (geodetic) lat- and longitude in `degrees`. |
n_xyz2philam(x_xyz, y=0, z=0, **name) Convert `n-vector` to (geodetic) lat- and longitude in `radians`. |
sumOf(nvectors, Vector=None, h=None, **Vector_kwds) Return the vectorial sum of two or more n-vectors. |

Variables
| __all__ = `_ALL_LAZY.nvectorBase`
| NorthPole = `_N_vector_(0, 0, 1)`
| SouthPole = `_N_vector_(0, 0, -1)`

Function Details

### n_xyz2latlon (x_xyz, y=0, z=0, **name) |
Convert `n-vector` to (geodetic) lat- and longitude in `degrees`. Arguments: `x_xyz` - X component (`scalar`) or (3-D) vector (`Nvector`, Vector3d, Vector3Tuple or Vector4Tuple). `y` - Y component of vector (`scalar`), required if `x_xyz is scalar` and same units as `x_xyz`, ignored otherwise. `z` - Z component of vector (`scalar`), like `y`. `name` - Optional `name=NN` (`str`). Returns: A LatLon2Tuple`(lat, lon)`. See Also: Function n_xyz2philam.

### n_xyz2philam (x_xyz, y=0, z=0, **name) |
Convert `n-vector` to (geodetic) lat- and longitude in `radians`. Arguments: `x_xyz` - X component (`scalar`) or (3-D) vector (`Nvector`, Vector3d, Vector3Tuple or Vector4Tuple). `y` - Y component of vector (`scalar`), required if `x_xyz is scalar` and same units as `x_xyz`, ignored otherwise. `z` - Z component of vector (`scalar`), like `y`. `name` - Optional `name=NN` (`str`). Returns: A PhiLam2Tuple`(phi, lam)`. See Also: Function n_xyz2latlon.

### sumOf (nvectors, Vector=None, h=None, **Vector_kwds) |
Return the vectorial sum of two or more n-vectors. Arguments: `nvectors` - Vectors to be added (`Nvector`[]). `Vector` - Optional class for the vectorial sum (`Nvector`) or `None`. `h` - Optional height, overriding the mean height (`meter`). `Vector_kwds` - Optional, additional `Vector` keyword arguments, ignored if `Vector is None`. Returns: Vectorial sum (`Vector`) or a Vector4Tuple`(x, y, z, h)` if `Vector is None`. Raises: `VectorError` - No `nvectors`.