-
Notifications
You must be signed in to change notification settings - Fork 6
/
vehicle_parameters.m
84 lines (59 loc) · 1.94 KB
/
vehicle_parameters.m
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
function [e, S, b, T_max, mass, AR, k, C_D_0, ...
gamma_max, gamma_min, phi_max, phi_min, ...
n_max, n_min, V_min_drag, T_min] = vehicle_parameters(vehicle_id, G, RHO)
%{
This function stores the vehicle parameters for different
aircrafts.
%}
switch vehicle_id
case 1 % DECODE 1
% Wing area [m²]
S = 0.966;
% Span [m]
b = 2.9483;
% Aircraft mass [kg]
mass = 15;
% Maximum thrust [N]
T_max = mass*G*0.361;
% Aspect Ratio [-]
AR = b^2/S;
% Oswald factor [-]
e = 1.78 * (1 - 0.045 * AR ^ 0.68) - 0.64;
% k value [-]
k = 1/(pi * AR * e);
% Cd0 value [-]
C_D_0 = 0.0498;
gamma_max = deg2rad(20);
gamma_min = deg2rad(-20);
phi_max = deg2rad(40);
phi_min = deg2rad(-40);
n_max = 3.8;
n_min = -1.5;
V_min_drag = sqrt(mass*G*2/(RHO*S))*((k/C_D_0)^(1/4));
T_min = 1/2*RHO*S*2*C_D_0.*V_min_drag.^2;
case 2 % DECODE 2
% Oswald factor [-]
e = 0.8;
% Wing area [m²]
S = 1.554;
% Span [m]
b = 3.9422;
% Maximum thrust [N]
T_max = 130;
% Aircraft mass [kg]
mass = 25;
% Aspect Ratio [-]
AR = b^2/S;
% k value [-]
k = 0.0334;
% Cd0 value [-]
C_D_0 = 0.0143;
gamma_max = deg2rad(20);
gamma_min = deg2rad(-20);
phi_max = deg2rad(30);
phi_min = deg2rad(-30);
n_max = 3.8;
n_min = -1.5;
V_min_drag = sqrt(mass*G*2/(RHO*S))*((k/C_D_0)^(1/4));
T_min = 1/2*RHO*S*2*C_D_0.*V_min_drag.^2;
end