%
% PURPOSE: Plot vertical plane states and controls.
%
% .time is in units of fractional days.
%
% Setup figure positions, etc.
  review;
%  

if exist( 'vplaneFigPtr' ) ~= 1
  vplaneFigPtr= figure;
  set( vplaneFigPtr, 'Name', 'LR Vplane', 'DeleteFcn', 'clear vplaneFigPtr' );
  set(gcf,'position',position)
  if(exist('fontsize')) 
    vplaneFontsize=fontsize;
  else
    vplaneFontsize=22;
  end
  vplaneFontweight='normal';
  set(gca,'fontsize',vplaneFontsize,'fontweigh',vplaneFontweight)
  set(gcf,'defaultaxesfontsize',vplaneFontsize,'defaulttextfontsize', ...
      vplaneFontsize)
else
  figure(vplaneFigPtr);
end

   subplot(3,1,1)
   plot(data.depth.time, data.depth.value);
   grid on;set(gca,'ydir','reverse');
   xlabel('Hours');
   ylabel('Depth, Meters');
   title([ 'LR Vertical Plane for ', filepath], 'interpreter','none');
   dynamicDateTicks;

   subplot(3,1,2)
   plot(data.platform_pitch_angle.time, data.platform_pitch_angle.value*180/pi);
   xlabel('Hours');
   ylabel('Pitch, Deg');
   grid on;
   dynamicDateTicks;
   
   subplot(3,1,3)
   plot(data.platform_elevator_angle.time, data.platform_elevator_angle.value*180/pi,'b');
   grid on;set(gca,'ydir','reverse');
   xlabel('Hours');
   ylabel('Elevator Angle, Deg');
   hold on
   plot(data.platform_mass_position.time, ...
       data.platform_mass_position.value*1000,'r');
   legend('Elevator, Deg','Mass Position, cm');
   

   linkaxes(get(gcf,'children'),'x')
   dynamicDateTicks;
   
