reverse (self,
xyz,
y=None,
z=None,
M=False,
name='')
|
|
Convert from geocentric (x, y, z) to geodetic (lat,
lon, height) .
- Arguments:
xyz - A geocentric (Cartesian , Ecef9Tuple) or scalar ECEF
x coordinate (meter ).
y - ECEF y coordinate for scalar
xyz and z
(meter ).
z - ECEF z coordinate for scalar
xyz and y
(meter ).
M - Optionally, return the rotation EcefMatrix (bool ).
name - Optional name (str ).
- 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 , optional M (EcefMatrix) and datum if available.
- Raises:
EcefError - Invalid xyz or scalar
x or y and/or
z not scalar for
scalar xyz .
- Overrides:
_EcefBase.reverse
Note:
In general, there are multiple solutions and the result which
minimizes height is returned, i.e., (lat,
lon) corresponds to the closest point on the ellipsoid. If
there are still multiple solutions with different latitudes
(applies only if z = 0), then the solution with
lat > 0 is returned. If there are still multiple
solutions with different longitudes (applies only if x
= y = 0) then lon = 0 is returned. The
returned height value is not below −E.a * (1 − E.e2) / sqrt(1 − E.e2 * sin(lat)**2).
The returned lon is in the range [−180°, 180°]. Like
forward above, v1 = Transpose(M) ⋅
v0.
|