%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PURPOSE: Plot items related to the thruster.
% AUTHOR:  rsm
% DATE:    99/12/28
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%

  caseName = 'DorOdy';
  str = [', Case:',caseName,' ',myDate];
  PaperPosn = [.5 .5 3.75 2.5];
  FigurePosn = [5 30 815 760];
  i = 0;

%  i = i+1;
%  figure(i)
%  if hardflag ==3, set(gcf,'PaperPosition',PaperPosn), end
%  set(gcf,'position',FigurePosn)
%  clf


  if exist( 'thrFig' ) ~= 1
    thrFig = figure;
  else
    figure(thrFig);
  end
  set( thrFig, 'Name', 'Thruster Plot', 'DeleteFcn', 'clear thrFig' );
  set(gcf,'position',position)


  subplot(3,1,1)
  plot(dataNav(:,1), dataNav(:,mThrAmps), 'linewidth',2);
  if exist('dataSim') 
    line(dataSim(:,1), dataSim(:,cThrAmps), 'linewidth',2,'color','r');
    legend('Nav', 'Sim');
  end
  ylabel('Amps')
  title(['Thruster Current',str]);
  grid on
  subplot(3,1,2)
  plot(dataNav(:,1), dataNav(:,mWaterSpeed), 'linewidth',2);
  if exist('dataSim') 
    line(dataSim(:,1), [dataSim(:,sVel_u)], 'linewidth',2,'color','r');
    legend('Nav', 'Sim');
  end
  ylabel('Meters/Sec')
  title(['Speed, Meters/Sec',str]);
  xlabel('Seconds');
  grid on;
  subplot(3,1,3)
  plot(dataNav(:,1), dataNav(:,mOmega_P)*60/2/pi, 'linewidth',2);
  if exist('dataSim') 
    line(dataSim(:,1), [dataSim(:,sOmega_P)*60/2/pi], 'linewidth',2,'color','r');
    legend('Nav', 'SimCmd');
  end
  ylabel('Rev/Min')
  title(['Propeller Speed',str]);
  xlabel('Seconds');
  grid on;



