Package pygeodesy :: Module ecef :: Class EcefVeness |
[frames] | no frames]

# Class EcefVeness

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
               _EcefBase --+
                           |
                          EcefVeness

Known Subclasses:
  - EcefSudano

Conversion between geodetic and geocentric, aka Earth-Centered, Earth-Fixed (ECEF) coordinates transcribed from Chris Veness' JavaScript classes LatLonEllipsoidal, Cartesian.

See Also: A Guide to Coordinate Systems in Great Britain, section B) Converting between 3D Cartesian and ellipsoidal latitude, longitude and height coordinates.

Instance Methods
__init__(self, a_ellipsoid, f=None, name='') New EcefVeness/EcefSudano converter. |
forward(self, latlonh, lon=None, height=0, M=False) Convert from geodetic `(lat, lon, height)` to geocentric `(x, y, z)`. |
reverse(self, xyz, y=None, z=None, **no_M) Convert from geocentric `(x, y, z)` to geodetic `(lat, lon, height)` transcribed from Chris Veness' JavaScript. |
Inherited from `_EcefBase`: `toStr` Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `_DOT_`, `attrs`, `classof`, `copy`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `_EcefBase`: `a`, `datum`, `ellipsoid`, `equatoradius`, `equatorialRadius`, `f`, `flattening` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, a_ellipsoid, f=None, name='') (Constructor) |
New EcefVeness/EcefSudano converter. Arguments: `a_ellipsoid` - An ellipsoid (Ellipsoid, Ellipsoid2, Datum or a_f2Tuple) or `scalar` for the equatorial radius of the ellipsoid (`meter`). `f` - `None` or the ellipsoid flattening (`scalar`), required for `scalar` `a_ellipsoid`, `f=0` represents a sphere, negative `f` a prolate ellipsoid. `name` - Optional name (`str`). Raises: `EcefError` - If `a_ellipsoid` not Ellipsoid, Ellipsoid2, Datum or a_f2Tuple or `scalar` or `f` not `scalar` or if `scalar` `a_ellipsoid` not positive or `f` not less than 1.0. Overrides: object.__init__

### forward (self, latlonh, lon=None, height=0, M=False) |
Convert from geodetic `(lat, lon, height)` to geocentric `(x, y, z)`. Arguments: `latlonh` - Either a `LatLon`, an Ecef9Tuple or `scalar` latitude in `degrees`. `lon` - Optional `scalar` longitude in `degrees` for `scalar` `latlonh`. `height` - Optional height in `meter`, vertically above (or below) the surface of the ellipsoid. `M` - Optionally, return the rotation EcefMatrix (`bool`). Returns: An Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with geocentric `(x, y, z)` coordinates for the given geodetic ones `(lat, lon, height)`, case `C` 0, EcefMatrix `M` and `datum` if available. Raises: `EcefError` - If `latlonh` not `LatLon`, Ecef9Tuple or `scalar` or `lon` not `scalar` for `scalar` `latlonh` or `abs(lat)` exceeds 90°. Overrides: _EcefBase.forward

### reverse (self, xyz, y=None, z=None, **no_M) |
Convert from geocentric `(x, y, z)` to geodetic `(lat, lon, height)` transcribed from Chris Veness' JavaScript. Uses B. R. Bowring’s formulation for μm precision in concise form: 'The accuracy of geodetic latitude and height equations', Survey Review, Vol 28, 218, Oct 1985. Arguments: `xyz` - Either an Ecef9Tuple, an `(x, y, z)` 3-tuple or `scalar` ECEF `x` coordinate in `meter`. `y` - ECEF `y` coordinate in `meter` for `scalar` `xyz` and `z`. `z` - ECEF `z` coordinate in `meter` for `scalar` `xyz` and `y`. `no_M` - Rotation matrix `M` not available. Returns: An Ecef9Tuple`(x, y, z, lat, lon, height, C, M, datum)` with geodetic coordinates `(lat, lon, height)` for the given geocentric ones `(x, y, z)`, case `C`, EcefMatrix `M` always `None` and `datum` if available. Raises: `EcefError` - If `xyz` not Ecef9Tuple or `scalar` `x` or `y` and/or `z` not `scalar` for `scalar` `xyz`. Overrides: _EcefBase.reverse See Also: Ralph M. Toms 'An Efficient Algorithm for Geocentric to Geodetic Coordinate Conversion', Sept 1995 and 'An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion', Apr 1996, both from Lawrence Livermore National Laboratory (LLNL) and John J. Sudano An exact conversion from an Earth-centered coordinate system to latitude longitude and altitude.