%% Transform ENU Coordinates to Geodetic Coordinates
% Specify the geodetic coordinates of the local origin in Zermatt, Switzerland.

lla0 = [46.017 7.750 1673]; % [lat0 lon0 alt0]

% Specify the ENU coordinates of a point of interest, in meters. In this case, the point of interest is the Matterhorn.

xyzENU = [-7134.8 -4556.3 2852.4]; % [xEast yNorth zUp]

% Transform the local ENU coordinates to geodetic coordinates using flat earth approximation.

lla = enu2lla(xyzENU,lla0,'flat')

% Copyright 2020 The MathWorks, Inc.