%--------------------------------------------------------------------------
%
% PURPOSE: Test the rudder rate limiter routine
% AUTHOR:  Rob McEwen
% DATE:    99/4/22
%
%--------------------------------------------------------------------------
 Ts           = .1;               % Sample interval, sec.
 tdb          = [0:100]'/10;
% udb          = ones(501,1)*10*pi/180;
% udb          = 10*pi/180*sin(2*pi*.5*tdb);
 uMag          = 20*pi/180;
 maxDeltaR    = pi/12;          % Max tailcone deflection; 15 degrees.
 maxDeltaRDot = 10*pi/180;      % Max tailcone deflection rate; 
 deltaRDead   = maxDeltaRDot*Ts;% Max rudder defln in one sample interval
%
%[toutdb] = sim('rudderRateSS1',tdb,simset('maxstep',tdb(2)-tdb(1)));
%[toutdb, xdb, ydb ] = sim('rudderRate2',tdb,[],[tdb udb]);
 [toutdb] = sim('rudderRate2',max(tdb),simset('maxstep',tdb(2)-tdb(1)));
%
 plot(toutdb,[ydb udb])
 grid on