%
%    PCTRL - script to plot PID pitch control parameters in current axes
%
%    Copyright (C) 1995-1998
%    Massachussetts Institute of Technology
%    Sea Grant AUV Laboratory
%    $Id: pctrl.m,v 1.2 2000/06/14 01:55:17 rob Exp $

%plot( nav(m_present_time), 180/pi*(nav(:,m_pitch) - ...
%    data(:,c_pitch))*data(1,uo_control_kpp), 'r' );

time = dataDC(:,m_present_time);
plot( time,   180/pi*dataDC(:,pitchProp), 'r' );
  line( time, 180/pi*dataDC(:,pitchRate), 'Color', [0 .5 0] );
  line( time, 180/pi*dataDC(:,pitchInt) , 'Color', [0 0.75 0.75] )
  line( time, 180/pi*dataDC(:,cDeltaE), 'Color', 'b' );
  set( gca, 'ydir', 'reverse' );
  zoom on
  grid on
  title( ['PID Pitch (prop r, int c, deriv g, elev b)'] );
 %title( ['Pitch Control Terms (PID)'] );
  xlabel( 'Elapsed Time, Sec.' )
  ylabel( 'Control Activity Deg.' )
% legend('Prop','Deriv','Int','Elev Cmd.',3)
