% *********************************************
% BasicConstants_Predator
%%
% Version 3.0 2/15/02. 
% This version corrects Cm_alpha, rudder control power, units, and comments.
% AAE565 Spring 2002
%
% *********************************************
% BasicConstants - Identifies, describes, and assigns all of the 
%                  the most basic variables for analyzing the control
%                  and stability of a generic aircraft.
% *********************************************     
%
% A&AE 565 Spring 2002 - Purdue University
% 
% Note: This code is provided for a first order approximation of the dynamic 
%       analysis of an airplane and is not intended for final designs.
%
% Equations/Figures can be found in :
% 
% (Ref.1) Roskam, Jan. "Airplane Flight Dynamics and Automatic Flight
%         Controls"
%         Published by DARcorporation
%         120 E. Ninth St., Suite 2
%         Lawrence, KS 66044
%         Third Printing, 2001.
%
% (Ref.2) Roskam, Jan. "Methods for Estimating Satbility and
%         Control Derivatives of Conventional Subsonic Airplanes"
%         Published by the Author 
%         519 Boulder 
%         Lawrence, Kansas 66044
%         Third Printing, 1997.
%  
% (Ref.3) Roskam, Jan. "Airplane Design: Part IV: Preliminary Calculation
%         of Aerodynamic, Thrust and Power Characteristics"
%         Published by Roskam Aviation and Engineering Corporation
%         Rt4, Box 274
%         Ottawa, Kansas 66067
%         Second Printing, 1990.
%
aircraft='Predator RQ-1A, cruise configuration';
adelf = 0;          	% Two dimensional lift effectiveness parameter Ref.(2),Equ(8.7)
alpha = 0*pi/180;       % Trim Angle of attack [rad]. This should be zero since our
%						equations of motion are body axis system rather then the stability axis system.
alpha_0 = -6*pi/180;	% Airfoil zero-lift AOA [rad]
altitude=5000;			% Trim altitude [ft]
AR_h = 6.2;        		% Aspect ratio of the horizontal tail
AR_w = 21;         		% Aspect ratio of the wing
b_f = 22.6;         	% Span of the flap [ft]
b_h = 14.5;   		  	% Span of the horizontal tail [ft]
b_h_oe = 7.3;        	% Elevator outboard position [ft]
b_h_ie = 1.0;     		% Elevator inboard position [ft]
b_w = 48.7;          	% Span of the wing [ft]
b_v = 12.3;          	% Vertical tail span measured from fuselage centerline[ft]
b_v_or = 8.57;       	% Outboard position of rudder [ft]
b_v_ir = 1;        		% Inboard position of rudder [ft]
c_a = 0.6;           	% Chord of aileron [ft]
C_bar_D_o = 0.0209;  	% Parasite drag
Cd_0 = 0.0209;       	% Drag coefficient at zero lift (parasite drag)
c_e = 2.3;	         	% Elevator chord [ft]
cf = 0.975;          	% Chord of the wing flap [ft]
c_h = 2.3;           	% Mean aerodynamic chord of the horizontal tail [ft]
CL = 0.825;        		% Lift coefficient (3-D)
CL_hb = 0;          	% Lift coefficient of the horzontal tail/body
CL_wb=.825; 	     	% Lift coefficient of the wing/body - assuming iw=0
Cl_alpha_h = 2*pi;		% 2-D Lift curve slope of horizontal tail
Cl_alpha_v = 2*pi;   	% 2-D Lift curve slope of vertical tail
Cl_alpha = 7.88;     	% Two-dimensional lift curve slope of whole aircraft
Cl_alpha_w = 7.88;   	% Two-dimensional lift curve slope of wing
Cm_0_r = -.16;      	% Zero lift pitching moment coefficient of the wing root
Cm_o_t = -.16;      	% Zero lift pitching moment coefficient of the wing tip
c_r = 2.3;          	% Chord of the rudder [ft]
c_w = 2.5;          	% Mean aerodynamic chord of the wing [ft]
c_v = 2.3;           	% Mean aerodynamic chord of the vertical tail [ft]
D_p = 5.6;           	% Diameter of propeller [ft]
d = 2.8;				% Average diameter of the fuselage [ft]
delf = 0*pi/180;        % Streamwise flap deflection [rad] 
delta_e = 0*pi/180;	   	% Elevator deflection [rad]
delta_r = 0*pi/180;     % Rudder deflection [rad]
dihedral = 7*pi/180;    % Geometric dihedral angle of the wing [rad], positive for 
%						dihedral (wing tips up), negative for anhedral(tips down) [rad]
dihedral_h = 0*pi/180;  % Geometric dihedral angle of the horizontal tail [rad]
e = 0.505;           	% Oswald's efficiency factor
epsilon_t = 0*pi/180;   % Horizontal tail twist angle [rad]
epsilon_0_h = 0;     	% Downwash angle at the horizontal tail (see Note in 
%						Ref.(3) under section 8.1.5.2) [rad]
eta_h = 1.05;	      	% Ratio of dynamic pressure at the horizontal tail to that of the freestream 
eta_ia = .43;       	% Percent semi-span position of inboard edge of aileron
eta_oa = 1.0;       	% Percent semi-span position of outboard edge of aileron
eta_p = 0.70;			% Propeller Efficiency
eta_v = 1.05;			% Ratio of the dynamic pressure at the vertical tail 
%						to that of the freestream
h1_fuse =3.6;       	% Height of the fuselage at 1/4 of the its length 
h2_fuse =2.45;      	% Height of the fuselage at 3/4 of the its length 
h_h = -1.96;        	% Height from chord plane of wing to chord plane of
%						horizontal tail [ft] - Fig 3.7, Ref. 2
hmax_fuse = 3.7;    	% Maximum height of the fuselage [ft]  
Ixx = 920;              % Airplane moment of inertia about x-axis [slug-ft^2]
Iyy = 3000;             % Airplane moment of inertia about y-axis [slug-ft^2]
Izz = 3600;             % Airplane moment of inertia about z-axis [slug-ft^2]
Ixz = 0;                % Airplane product of inertia [slug-ft^2]
i_h = 0*pi/180;         % Incidence angle of horizontal tail [rad]  
i_w = 0*pi/180;	   		% Incidence angle of wing [rad]  
k = 0.0300;				% k of the drag polar, generally= 1/(pi*AR*e)
Lambda = 0*pi/180;      % Sweep angle of wing [rad]
Lambda_c2 = 0*pi/180;   % Sweep angle at the c/2 of the wing [rad]
Lambda_c4 = 2.2*pi/180; % Sweep angle at the c/4 of the wing [rad]     
Lambda_c2_v = 0*pi/180; % Sweep angle at the c/2 of the vertical tail [rad]
Lambda_c4_v = 0*pi/180; % Sweep angle at the c/4 of the vertical tail [rad]
Lambda_c2_h = 0*pi/180; % Sweep angle at the c/2 of the horizontal tail [rad]
Lambda_c4_h = 0*pi/180; % Sweep angle at the c/4 of the horizontal tail [rad]
lambda = 0.358;         % Taper ratio of wing
lambda_h = 1;     		% Taper ratio of horizontal tail
lambda_v = 1;           % Taper ratio of vertical tail
l_f = 27;           	% Horizontal length of fuselage [ft]  
l_v = 11.3;       	    % Horizontal distance from aircraft arbitrary reference point to vertical tail AC [ft]
M = 0.12;               % Mach number
S_b_s = 60;             % Body side area [ft^2]
S_h = 31;	            % Area of horizontal tail [ft^2]
S_h_slip = 0;	        % Area of horizontal tail that is covered in 
%						prop-wash [ft^2] - See Fig.(8.64) - Ref.(3) 
S_o = 4;    	        % Fuselage x-sectional area at Xo [ft^2] - 
%						See Fig.(7.2) - Ref.(2)
% 						Xo is determined by plugging X1/l_b into: 
%						0.378 + 0.527 * (X1/l_b) = (Xo/l_b)
S_w = 112;              % Surface area of wing [ft^2]
S_v = 22;   	    	% Surface area of vertical tail [ft^2]
tc_w = 0.13;            % Thickness to chord ratio of wing 
tc_h = 0.09;            % Thickness to chord ratio of horizontal tail
theta = 0*pi/180;       % Wing twist - negative for washout [rad]
theta_h = 0*pi/180;     % Horizontal tail twist between the root and tip 
%						stations,negative for washout [rad]
two_r_one = 2.2;     	% Fuselage depth in region of vertical tail [ft] Ref.(2),Figure 7.5
U = 70;	       	   		% Free Stream Velocity (Trim velocity) [KNOTS true]
W = 2250;            	% Weight of Airplane [lbf]
wingloc = 0;         	% If the aircraft is a highwing: (wingloc=1), low-wing:(wingloc=0) 
wmax_fuse = 3.7;  		% Maximum fuselage width [ft]
X1 = 6;   	         	% Distance from the front of the fuselage where the 
%						x-sectional area decrease (dS_x/dx) 
%						is greatest (most negative) [ft] - Ref.(2),Fig. 7.2  
x_m = 12.9;         	% Distance from nose of aircraft to arbitrary reference point [ft]
%						measured positive aftward.
x_over_c_v = 0.25;  	% PARAMETER ACCOUNTING FOR THE RELATIVE POSITIONS OF THE HORIZONTAL AND VERTICAL TAILS
%						defined as the fore-and-aft distance from leading edge of vertical fin to the
%						aerodynamic center of the horizontal tail divided by the chord of the vertical tail 
%						[nondimensional] - See Fig 7.6 of Ref. 2 
Xach=11.925;%			Distance from the leading edge of the wing mean aerodynamic chord
%                       to the aerodynamic center of the horizontal tail (positive aftward) [ft]
Xacwb=.25*c_w;%			Distance from the leading edge of the wing mean aerodynamic chord
%                       to the aerodynamic center of the wing and body. 
%						Measured as positive aft, starting from the leading edge of the mean aero. chord. [ft]
Xacw=.25*c_w;%			Distance from the leading edge of the wing mean aerodynamic chord
%                       to the aerodynamic center of the wing ALONE. 
%						Measured as positive aft, starting from the leading edge of the mean aero. chord. [ft]
Xref=.25*c_w;%			Distance from the leading edge of the wing mean aerodynamic chord
%                       to the arbitrary moment reference point. The equivalent force system
% 						for the aerodynamic force system is given about this point.
%						Measured as positive aft, starting from the leading edge of the mean aero. chord. [ft]
Z_h = 3.3;        		% Negative of the VERTICAL distance from the fuselage 
%						centerline to the horizontal tail aero center 
%						(Z_h is a negative number FOR TAILS ABOVE THE CENTERLINE)
%						- Ref.(2), Fig.7.6
%						***This produces a bunch of interpolation errors because 
%						Roskam doesn't have data for horizontal tails below the 
%						centerline of the fuselage
Z_v = -1.5;    			% Vertical distance from the aircraft arbirary reference point to the vertical 
%						tail aero center (positive up) - Ref.(2), Fig. 7.18
Z_w = -0.5;	       		% This is the vertical distance from the wing root c/4 [ft]
%						to the fuselage centerline, 
%						positive downward - Ref.(2), Equ(7.5)
Z_w1 = 0.5;	         	% Distance from body centerline to c/4 of wing root 
%						chord,positive for c/4 point
%						below body centerline (ft) - Ref.(2), Fig. 7.1  
