%MAKECITA Defines linearised model of Cessna Citation aircraft
%
% Usage: citation = makecita('lti')
%   [Ac,Bc,Cc,Dc] = makecita('ss')
%
% Defines continuous-time linearised state-space model of 
% Cessna Citation  aircraft (slightly modified) as LTI object or
% as 4 matrices of state-space model.
%
% Input:   Elevator angle (rad)
% Outputs: Pitch angle (rad), Altitude (m), Altitude rate (m/sec)
% States:  Angle of attack (rad), Pitch angle (rad), 
%          Pitch rate (rad/sec), Altitude (m)

% J.M.Maciejowski, Cambridge University Engineering Dept, 25.9.98

function [Ac,Bc,Cc,Dc] = makecita(choose)

Ac = [-1.2822   0  0.98   0;
          0     0   1     0;
      -5.4293   0 -1.8366 0;
      -128.2 128.2  0     0];

Bc = [-0.3; 0; -17; 0];

Cc = [   0      1  0 0;
         0      0  0 1;
      -128.2 128.2 0 0];

Dc = zeros(3,1);

if strcmp(choose,'lti'),
 Ac = ss(Ac,Bc,Cc,Dc);
 set(Ac,'InputName','Elevator (rad)',...
        'OutputName',{'Pitch (rad)';'Altitude (m)';'Altitude rate (m/sec)'},...
        'StateName',{'Angle of attack (rad)';'Pitch angle (rad)';...
                     'Pitch rate (rad/sec)';'Altitude (m)'});
end


