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

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

% Specify the geodetic coordinates of a point of interest. In this case, the point of interest is the Matterhorn.

lla = [45.976 7.658 4531]; % [lat lon alt]

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

xyzNED = lla2ned(lla,lla0,'flat')

% Copyright 2020 The MathWorks, Inc.