-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cit_par_SM.py
130 lines (97 loc) · 3.62 KB
/
Cit_par_SM.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 19 14:52:48 2019
@author: emili
"""
#<<<<<<< Updated upstream
# Citation 550 - Linear simulation
from math import *
# xcg = 0.25 * c
############################# FROM FLIGHT DATA ##############################
results=[3741.8208049022446, 101.86584939729075, 5.27206018383283, 3.22914101036729, 6179.467564276934]
# Stationary flight condition
hp0 = results[0] # pressure altitude in the stationary flight condition [m]
V0 = results[1] # true airspeed in the stationary flight condition [m/sec]
alpha0 = results[2] * pi/180 # angle of attack in the stationary flight condition [rad]
th0 = results[3] * pi/180 # pitch angle in the stationary flight condition [rad]
# Aircraft mass
m = results[4] # mass [kg]
# aerodynamic properties
e = 0.85 # Oswald factor [ ]
CD0 = 0.0276 # Zero lift drag coefficient [ ]
CLa = 4.99046 # Slope of CL-alpha curve [ ]
# Longitudinal stability
Cma = -1.08 # longitudinal stabilty [ ]
Cmde = -2.24 # elevator effectiveness [ ]
################################## NOT FROM FLIGHT DATA ######################
# Aircraft geometry
S = 30.00 # wing area [m^2]
Sh = 0.2 * S # stabiliser area [m^2]
Sh_S = Sh / S # [ ]
lh = 0.71 * 5.968 # tail length [m]
c = 2.0569 # mean aerodynamic cord [m]
lh_c = lh / c # [ ]
b = 15.911 # wing span [m]
bh = 5.791 # stabilser span [m]
A = b ** 2 / S # wing aspect ratio [ ]
Ah = bh ** 2 / Sh # stabilser aspect ratio [ ]
Vh_V = 1 # [ ]
ih = -2 * pi / 180 # stabiliser angle of incidence [rad]
# Constant values concerning atmosphere and gravity
rho0 = 1.2250 # air density at sea level [kg/m^3]
lambd = -0.0065 # temperature gradient in ISA [K/m]
Temp0 = 288.15 # temperature at sea level in ISA [K]
R = 287.05 # specific gas constant [m^2/sec^2K]
g = 9.81 # [m/sec^2] (gravity constant)
# air density [kg/m^3]
rho = rho0 *pow(((1+(lambd * hp0 / Temp0))), (-((g / (lambd*R)) + 1)))
W = m * g # [N] (aircraft weight)
# Constant values concerning aircraft inertia
muc = m / (rho * S * c)
mub = m / (rho * S * b)
KX2 = 0.019
KZ2 = 0.042
KXZ = 0.002
KY2 = 1.25 * 1.114
# Aerodynamic constants
Cmac = 0 # Moment coefficient about the aerodynamic centre [ ]
CNwa = CLa # Wing normal force slope [ ]
CNha = 2 * pi * Ah / (Ah + 2) # Stabiliser normal force slope [ ]
depsda = 4 / (A + 2) # Downwash gradient [ ]
# Lift and drag coefficient
CL = 2 * W / (rho * V0 ** 2 * S) # Lift coefficient [ ]
CD = CD0 + (CLa * alpha0) ** 2 / (pi * A * e) # Drag coefficient [ ]
# Stabiblity derivatives
CX0 = W * sin(th0) / (0.5 * rho * V0 ** 2 * S)
CXu = -0.02792
CXa = -0.47966
CXadot = +0.08330
CXq = -0.28170
CXde = -0.03728
CZ0 = -W * cos(th0) / (0.5 * rho * V0 ** 2 * S)
CZu = -0.37616
CZa = -5.74340
CZadot = -0.00350
CZq = -5.66290
CZde = -0.69612
Cmu = +0.06990
Cmadot = +0.17800
Cmq = -8.79415
CYb = -0.7500
CYbdot = 0
CYp = -0.0304
CYr = +0.8495
CYda = -0.0400
CYdr = +0.2300
Clb = -0.10260
Clp = -0.71085
Clr = +0.23760
Clda = -0.23088
Cldr = +0.03440
Cnb = +0.1348
Cnbdot = 0
Cnp = -0.0602
Cnr = -0.2061
Cnda = -0.0120
Cndr = -0.0939
#=======