%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PURPOSE: Plot items related to the tailcone.
% AUTHOR:  rsm
% DATE:    00/5/20
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%

  if exist('dataTC') ~= 1, return, end
  
  str = [' ',titleStr,' ',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;
    winpos( position(1,:) );
  else
    figure(thrFig);
  end
  set( thrFig, 'Name', 'Thruster Plot', 'DeleteFcn', 'clear thrFig' );


  subplot(3,1,1)
  plot(dataTC(:,1), dataTC(:,motorCurrent1));
%  if exist('dataSim') 
%    line(dataSim(:,1), dataSim(:,cThrAmps),'color','r');
%    legend('Nav', 'Sim');
%  end
  ylabel('Counts')
  title(['Thruster Current 1',str]);
  grid on
  subplot(3,1,2)
  plot(dataTC(:,1), dataTC(:,motorCurrent2));
%  if exist('dataSim') 
%    line(dataSim(:,1), [dataSim(:,sVel_u)],'color','r');
%    legend('Nav', 'Sim');
%  end
  ylabel('Counts')
  title(['Thruster Current 2',str]);
  xlabel('Seconds');
  grid on;
  subplot(3,1,3)
  plot(dataTC(:,1), dataTC(:,propRpm));
  if exist('dataSim') 
    line(dataSim(:,1), [dataSim(:,sOmega_P)*60/2/pi],'color','r');
    legend('Nav', 'SimCmd');
  end
  ylabel('Rev/Min')
  title(['Propeller Speed',str]);
  xlabel('Seconds');
  grid on;

  if exist( 'ActFig' ) ~= 1
    ActFig = figure;
    winpos( position(1,:) );
  else
    figure(ActFig);
  end
  set( ActFig, 'Name', 'Actuator Current', 'DeleteFcn', 'clear ActFig' );

  subplot(2,1,1)
  plot(dataTC(:,1), dataTC(:,rudderCurrent) );
  ylabel('Counts')
  title(['Rudder Actuator Current',str]);
  xlabel('Seconds');
  grid on;

  subplot(2,1,2)
  plot(dataTC(:,1), dataTC(:,elevatorCurrent));
  ylabel('Counts')
  title(['Elevator Actuator Current',str]);
  xlabel('Seconds');
  grid on;


