ECEF to LLA ConverterΒΆ

Convert Earth-Centered, Earth-Fixed (ECEF) coordinates to Latitude, Longitude and Altitude (LLA) coordinates.

Note: Geodetic latitude (WGS84) is used here.

from ostk.physics.coordinate.spherical import LLA
from ostk.physics import Environment
<frozen importlib._bootstrap>:241: FutureWarning: pybind11-bound class 'ostk.physics.coordinate.frame.provider.Dynamic' is using an old-style placement-new '__init__' which has been deprecated. See the upgrade guide in pybind11's docs. This message is only visible when compiled in debug mode.

environment = Environment.default()
earth = environment.access_celestial_object_with_name("Earth")
x_ECEF = (2340841.98864643, -1351485.7522754, 5757737.03072958)
lla = LLA.cartesian(x_ECEF, earth.get_equatorial_radius(), earth.get_flattening())
print(lla)
-- LLA ---------------------------------------------------------------------------------------------
    Latitude:                                65.000000000000014 [deg]                 
    Longitude:                               -30.000000000000092 [deg]                
    Altitude:                                30.000000001098108 [m]                   
----------------------------------------------------------------------------------------------------