function [e,n,u] = xyz2enu(refLat, refLong, refH, X, Y, Z)
 % pøevod z ECEF do lokálních souøadnic east, north, up
 %refLat, refLong, refH, - ve WGS84
 % X, Y, Z - v ECEF
 [Xr,Yr,Zr] = wgs2ecef(refLat,refLong,refH);
 refLat=refLat*pi./180;
 refLong=refLong*pi./180;
  e = -sin(refLong).*(X-Xr) + cos(refLong).*(Y-Yr);
  n = -sin(refLat).*cos(refLong).*(X-Xr) - sin(refLat).*sin(refLong).*(Y-Yr) + cos(refLat).*(Z-Zr);
  u = cos(refLat).*cos(refLong).*(X-Xr) + cos(refLat).*sin(refLong).*(Y-Yr) + sin(refLat).*(Z-Zr);