function s = yagi12_70cm(pos,dir,c)
% s = yagi12_70cm(pos,dir,c)
% 7-element-Yagi like FX213
% pos :  [x y z]-vector of center of mass position of the antenna (default [0 0 0])
% dir :  main radiation direction: Euler's angles or transformation matrix.
%        See function rotation for details. (default: positive x direction)
% c   :  complex amplitude of excitation (default 1.0)

% Author:  Klaus von der Heide, e-mail:  dj5hg@qsl.net

% Default
% =======
if nargin<3  c = 1; end

% Constants
% =========
k = 2;                   % index of active dipole
d = 0.002;               % diameter of passive elements
dd= 0.008;               % diameter of active dipole
x = [-0.137 0.000 0.069 0.193 0.343 0.518 0.713 0.921 1.140 1.368 1.605 1.854 2.083]' - 0.817; % element positions
l = [ 0.340 0.330 0.309 0.307 0.307 0.303 0.299 0.297 0.293 0.293 0.293 0.289 0.289]'/2;      % half length of elements
n = length(x);           % number of elements
z = zeros(n,1);          % height of antenna elements
m = 15;                  % number of segments per element

% Construction
% ============
a  = [x -l z];           % coordinates of one end of elements
b  = [x +l z];           % coordinates of the other end of elements
el = wires(a([1,3:end],:),b([1,3:end],:),d,m);             % passive elements
dp = exwire(a(2,:),b(2,:),dd,m,c);                         % dipole
boom = wire([x(1)-0.03 0 0-0.02], [x(end)+0.03 0 0-0.02], 0.02, 20); % Boom
s = construct(dp,el,boom);  % putting all together

% Possible shift and rotation
% ===========================
if nargin>0  s = translation(s,pos); end
if nargin>1  s = rotation(s,dir);    end
