LLA to ECEF ConverterΒΆ

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

Note: Geodetic latitude (WGS84) is used here.

from ostk.physics.unit import Length
from ostk.physics.unit import Angle
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")
lla = LLA(Angle.degrees(65.0), Angle.degrees(-30.0), Length.meters(30.0))
x_ECEF = lla.to_cartesian(earth.get_equatorial_radius(), earth.get_flattening())
print(x_ECEF)
[ 2340841.98864643 -1351485.7522754   5757737.03072958]