function c = beam_steering_lm(enh,lambda,s_lm)
% BEAM_STEERING_LM returns phasors for a phased array to steer the beam to
% a certain direction
%   enh:    east, north, height coordinates of antennas in the array
%   lambda: wavelength of received signal
%   s_lm :  vector with direction cosine coordinates with respect to east 
%           and north axis, respectively 
    l = s_lm(1);
    m = s_lm(2);
    
    theta = asind(sqrt(l.^2 + m.^2));
    phi = atan2d(m,l);  
    phi = mod(phi + 360, 360);
    k = -2*pi/lambda*[sind(theta).*cosd(phi);sind(theta).*sind(phi);cosd(theta)];
    c = exp(-1i*enh*k);
end