ENU2UVW convert from ENU to UVW coordinates
Contents
Inputs
- e,n,up: East, North, Up coordinates of point(s) (meters)
- lat0,lon0: geodetic coordinates of observer/reference point (degrees)
- angleUnit: string for angular units. Default 'd': degrees
outputs
- u,v,w: coordinates of test point(s) (meters)
function [u,v,w] = enu2uvw(east, north, up, lat0, lon0, angleUnit) if nargin < 6 angleUnit = 'd'; end if strncmp(angleUnit, 'd', 1) lat0 = deg2rad(lat0); lon0 = deg2rad(lon0); end t = cos(lat0) * up - sin(lat0) * north; w = sin(lat0) * up + cos(lat0) * north; u = cos(lon0) * t - sin(lon0) * east; v = sin(lon0) * t + cos(lon0) * east; end