-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathobstacle_scenario.m
133 lines (131 loc) · 3.84 KB
/
obstacle_scenario.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
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
131
132
133
function [x_obs, y_obs, z_obs, R_obs, u_obs, v_obs, w_obs, num_obs] = obstacle_scenario(scenario_id)
%{
This function was written in order to store different scenario
for obstacles positioning. Given scenario_id, it returns
corresponding initial positioning (x, y, z), radius (R),
and velocities (u, v, w) of obstacles. In addition, it also returns
the number of obstacles in the scenario.
%}
switch scenario_id
case 0
x_obs = [];
y_obs = [];
z_obs = [];
R_obs = [0];
u_obs = [];
v_obs = [];
w_obs = [];
case 1 % Trajectory from Section V A of Alturbeh e Whidborne (2014)
x_obs = 3500;
y_obs = 1000;
z_obs = 1000;
R_obs = 200;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 1.5
x_obs = 1000;
y_obs = 1000;
z_obs = 1000;
R_obs = 200;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 2
x_obs = 800;
y_obs = 990;
z_obs = 900;
R_obs = 400;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 2.1
x_obs = [800 1000];
y_obs = [990 1690];
z_obs = [900 900];
R_obs = [400 150];
u_obs = [0 0];
v_obs = [0 0];
w_obs = [0 0];
case 2.2
x_obs = [800 1000 3000];
y_obs = [990 1690 1490];
z_obs = [900 900 1000];
R_obs = [400 150 200];
u_obs = [0 0 0];
v_obs = [0 0 0];
w_obs = [0 0 0];
case 3
x_obs = 2000;
y_obs = 1000;
z_obs = 1000;
R_obs = 200;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 4
x_obs = [3500 4500];
y_obs = [1000 990];
z_obs = [1000 850];
R_obs = [200 200];
u_obs = [0 0];
v_obs = [0 0];
w_obs = [0 0];
case 5
x_obs = 5000;
y_obs = 1000;
z_obs = 1000;
R_obs = 200;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 6
x_obs = 500;
y_obs = 1000;
z_obs = 1200;
R_obs = 200;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 7
x_obs = 6000;
y_obs = 990;
z_obs = 1000;
R_obs = 400;
u_obs = 0;
v_obs = 0;
w_obs = 0;
case 8
x_obs = [6000 8000 8750 10000];
y_obs = [990 980 1000 990];
z_obs = [1000 1200 900 1000];
R_obs = [400 200 100 200];
u_obs = [0 0 0 0];
v_obs = [0 0 0 0];
w_obs = [0 0 0 0];
case 8.1 % Same as 8, but obstacles are closer to aircraft
x_obs = [2000 4000 4750 6000];
y_obs = [990 980 1000 990];
z_obs = [1000 1200 900 1000];
R_obs = [400 200 100 200];
u_obs = [0 0 0 0];
v_obs = [0 0 0 0];
w_obs = [0 0 0 0];
case 9 % Trajectory from Section V B of Alturbeh e Whidborne (2014)
x_obs = [2000 2100];
y_obs = [1000 1000];
z_obs = [1000 1000];
R_obs = [200 200];
u_obs = [-18 15];
v_obs = [0 0];
w_obs = [0 0];
case 10 % Like case 9, but the obstacle are static
x_obs = [2000 2100];
y_obs = [1000 1000];
z_obs = [1000 1000];
R_obs = [200 200];
u_obs = [0 0];
v_obs = [0 0];
w_obs = [0 0];
end
num_obs = length(x_obs);