diff options
author | Siddharth11235 | 2019-09-03 18:09:16 +0530 |
---|---|---|
committer | Siddharth11235 | 2019-09-03 18:09:16 +0530 |
commit | b4b6aa36e3486a3544acc52419149b5671f841e9 (patch) | |
tree | 66c1783158f23e6d21c77324156fc57e18d4ac67 /Prof_Arya/Initial_Cessna.m | |
parent | f5266f634f4fb4fd39933a83551a01cf446256b8 (diff) | |
download | OpenModelica_HIL-b4b6aa36e3486a3544acc52419149b5671f841e9.tar.gz OpenModelica_HIL-b4b6aa36e3486a3544acc52419149b5671f841e9.tar.bz2 OpenModelica_HIL-b4b6aa36e3486a3544acc52419149b5671f841e9.zip |
Diffstat (limited to 'Prof_Arya/Initial_Cessna.m')
-rw-r--r-- | Prof_Arya/Initial_Cessna.m | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Prof_Arya/Initial_Cessna.m b/Prof_Arya/Initial_Cessna.m new file mode 100644 index 0000000..3fd510d --- /dev/null +++ b/Prof_Arya/Initial_Cessna.m @@ -0,0 +1,93 @@ +clear all
+close all
+clc
+
+global C_L_0 C_L_alpha C_L_q C_L_delta_e
+global C_D_0 C_D_alpha C_D_beta C_D_delta_e k
+global C_Y_beta C_Y_p C_Y_r C_Y_delta_a
+global C_l_beta C_l_p C_l_r C_l_delta_a C_l_delta_r
+global C_M_0 C_M_alpha C_M_alpha_dot C_M_delta_e
+global C_N_beta C_N_p C_N_r C_N_delta_a C_N_delta_r
+
+global m C_bar b S_ref
+global I_xx I_yy I_zz I_xy I_yz I_xz
+
+g = 9.8;
+rho = 1.225;
+
+m = 1043.26;
+C_bar = 1.493;
+b = 10.911;
+S_ref = 16.1651;
+
+I_xx = 1285.31;
+I_yy = 1824.93;
+I_zz = 2666.893;
+I_xz = 0;
+I_yz = 0;
+I_xy = 0;
+
+C_L_0 = 0.25;
+C_L_alpha = 4.47;
+C_L_q = 1.7;
+C_L_delta_e = 0.3476;
+
+C_D_0 = 0.036;
+k = 0.3;
+% C_D_alpha = 0.13;
+% C_D_beta = 0.17;
+% C_D_delta_e = 0.06;
+
+C_Y_beta = -0.31;
+C_Y_p = -0.037;
+C_Y_r = 0.21;
+C_Y_delta_a = 0;
+
+C_l_beta = -0.089;
+C_l_p = -0.47;
+C_l_r = 0.096;
+C_l_delta_a = -0.09;
+C_l_delta_r = 0.0147;
+
+C_M_0 = -0.02;
+C_M_alpha = -1.8;
+C_M_alpha_dot = -12.4;
+C_M_delta_e = -1.28;
+
+C_N_beta = 0.065;
+C_N_p = -0.03;
+C_N_r = -0.99;
+C_N_delta_a = -0.0053;
+C_N_delta_r = -0.0657;
+
+V_trim = 60;
+V = 60;
+
+alpha_delta_e_thrust = fsolve(@Trim_Cessna_Body, [0.035 -0.065 1500]);
+
+alpha = alpha_delta_e_thrust(1,1);
+delta_e = alpha_delta_e_thrust(1,2);
+thrust = alpha_delta_e_thrust(1,3);
+
+x = 0;
+y = 0;
+z = 0;
+
+delta_a = 0;
+delta_r = 0;
+beta = 0;
+
+u = V_trim*cos(alpha)*cos(beta);
+v = V_trim*sin(beta);
+w = V_trim*sin(alpha)*cos(beta);
+
+phi = 0;
+theta = alpha;
+psi = 0;
+
+p = 0;
+q = 0;
+r = 0;
+
+statenames = getstatenames('Cessna_6DOF_trim_ha');
+display(statenames)
\ No newline at end of file |