function add_OC(x,y,fsize,shipdir)
% function add_ship(x,y,fsize)
%
% This code plots a ship icon in the current figure at the position 
% specified by input arguments x,y.  The optional argument fsize determines
% the size of the icon (default 10).
%
% Written by Miles Sundermeyer, 8/28/96

if (nargin==2)		% need to set fsize
   fsize = .075;
   shipdir = -1;
elseif (nargin==3)	% this is okay as well
   shipdir = -1;
elseif (nargin==4)	% this is okay as well
else
   error('ERROR: Wrong number of input arguments')
end

whoiblue = [.1 .1 .95];
whoigreen = [.7 .9 .5];

holdflag = ishold;
if ~holdflag
  hold on
end

ax = axis;
axx = diff(ax(1:2));
ayy = 1.1*diff(ax(3:4));

% hull
xx = -shipdir*([.2 .3 .4 .5 .6 .7 .8] - .5);
yy = [.6 .4 .35 .35 .35 .4 .6] - .5;
fill(x+fsize*axx*xx,y+fsize*ayy*yy,whoiblue);
%fill(x+fsize*axx*xx,y+fsize*ayy*yy,'w');

% a-frame
xxx = -shipdir*([.75 .8 .9] - .5);
yyy = [.6 .7 .4] - .5;
plot(x+fsize*axx*xxx,y+fsize*ayy*yyy,'color',whoiblue);
% this makes Endeavor White
%plot(x+fsize*axx*xxx,y+fsize*ayy*yyy,'color','w');

% 0-1 and smoke stack
xx = -shipdir*([.35 .35 .40 .45 .525 .5 .625 .625] - .5);
yy = [.6 .70 .70 .80 .80 .70 .70 .6] - .5;
fill(x+fsize*axx*xx,y+fsize*ayy*yy,whoigreen);
%fill(x+fsize*axx*xx,y+fsize*ayy*yy,'w');

if ~holdflag
  hold off
end

