forked from liander-medeiros/F16NonlinearModel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.m
59 lines (56 loc) · 1.43 KB
/
main.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
% Author
% Bilal Akbana
% bilal.akbana12@gmail.com
%
% Date
% 09/11/2023
%
% Description
% Nonlinear simulation of F-16 aircraft for real-time pilot-in-the-loop
% simulation.
%
% States
% [u v w] body velocities, m/s
% [phi theta psi] euler angles, rad
% [p q r] angular rates, rad/s
% [xe ye ze] north-east-down positions, m
% Pa actual power, percentage
%
% Control inputs
% δa ailerons, [-21.5,21.5], deg
% δh elevator, [-25, 25], deg
% δr rudder, [-30, 30], deg
% δsb speed brake, [0,60], deg
% δth throttle, [0,1]
%
% References
% 1) Simulator study of stall/post-stall characteristics of a fighter
% airplane with relaxed longitudinal static stability, NASA-TP-1538
%% Add subfolders to the search path
clc, clear, close all
addpath(genpath(pwd))
%% Bus signals
Initialconditions()
Pilotinputs();
Actuatorbusobjects()
Aerobusobjects();
Propbusobjects();
Rigidbodybusobjects();
Atmospherebusobjects();
Totalforces();
Totalmoments();
Massforces();
Aircraftparams();
Aircraftstates();
Disturbances();
%% Parameters
Aeroparams=Aeroparamvals();
Propparams=Propparamvals();
Aircraftparams=Aircraftparamvals();
Initialconds=Initialconditionvals();
Inertiaconstants=Inertiaconstantvals();
Atmosphereparams=Atmosphereparamvals();
Actuatorparams=Actuatorparamvals();
%% Open simulation model
load_system('Model.slx')
open_system('Model.slx')