Python pyproj convert ecef to lla

后端 未结 3 1830
夕颜
夕颜 2021-02-04 12:51

I want to convert x/y/z-ECEF positions to lla (lat/lon/alt) using WGS84 in python with pyproj but it seems like the conversion fails.

Example code is here:



        
3条回答
  •  有刺的猬
    2021-02-04 13:54

    lon, lat, alt = pyproj.transform(ecef, lla, x, y, z, radians=True)
    

    Should be :

    lat, lon, alt = pyproj.transform(ecef, lla, x, y, z, radians=True)
    

    Since lla = pyproj.Proj(proj='latlong', ellps='WGS84', datum='WGS84') specify the latlong order

提交回复
热议问题