def xyz2geodetic(x, y, z):
"""
Convert ECEF *x*, *y*, and *z* (all in [m]) to geodetic
coordinates (using the WGS84 ellipsoid). Return lat [deg], lon
[deg], and alt [m]. Multiple coordinates are acceptable, i.e.,
*x*, *y*, and *z* may be equal length containers.
"""
lon, lat, alt = pyproj.transform(ECEF, LLA, x, y, z, radians=False)
if isinstance(lon, Iterable):
lon = [x - 360 if x > 180 else x for x in lon]
else:
if lon > 180:
lon -= 360
return lat, lon, alt
评论列表
文章目录