%LATCH - display parameters of docking latch mechanism
%
%B. A. Moran, 28-Jan-1998

%    Copyright (C) 1995-1998
%    Massachussetts Institute of Technology
%    Sea Grant AUV Laboratory
%    $Id: latch.m,v 1.1 2000/01/10 19:08:01 rob Exp $	

set( gcf, 'Name', 'Latch Variables', 'defaultAxesFontSize', 16 )

subplot( 2, 1, 1 )
cla
plot( time, [.5*data(:,m_latchio1) + .75 .5*data(:,m_latchio2) - .25], 'd' );
title( ['Pole in Latch Indicator: ' run_name] )
set( gca, 'YTick', [-0.25 0.25 0.75 1.25], 'YTickLabel', ...
    '!occ|occ|!empty|empty' )

zoom on

subplot( 2, 1, 2 )
cla
ind = find( finite(data(:,latch_check)) );
plot( time(ind), [NaN; diff(data(ind,latch_check))], '*', ...
    time, data(:,m_latchio0) + 1.5, 'd' );
set( gca, 'YLim', [-1.5 3], 'YTick', [-1 0 1 1.5 2.5], ...
    'YTickLabel', 'rel||req|m off|m on' )
xlabel( 'elapsed time (s)' );

zoom on
