Skip to content

Commit ac3b3cb

Browse files
committed
Adds final reproducible results for quadrotor simulation trajectories
1 parent ad76b1d commit ac3b3cb

14 files changed

Lines changed: 8217 additions & 8 deletions
-1.23 MB
Binary file not shown.
24.1 MB
Binary file not shown.
6.3 MB
Binary file not shown.

numerical_sims_quadrotor/figures/CC_ZF_trajectory.tex

Lines changed: 4051 additions & 0 deletions
Large diffs are not rendered by default.
4.03 MB
Binary file not shown.

numerical_sims_quadrotor/plot_data.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
clear
33
clc
44
%%
5-
ZF_data=load('.\data\kp_1_kd_10');
5+
ZF_data=load('.\data\kp_1_kd_9');
66
CC_data=load('.\data\kp_1_kd_18');
7+
sub_sample=100;
78
% Plot trajectories on a linear scale
89
figure()
9-
plot(CC_data.time,CC_data.trajs.y(1,:),'--')
10+
plot(CC_data.time(1:sub_sample:end),CC_data.trajs.y(1,1:sub_sample:end),'--')
1011
hold on
11-
plot(CC_data.time,CC_data.trajs.y(2,:),'--')
12-
plot(ZF_data.time,ZF_data.trajs.y(1,:))
13-
plot(ZF_data.time,ZF_data.trajs.y(2,:))
12+
plot(CC_data.time(1:sub_sample:end),CC_data.trajs.y(2,1:sub_sample:end),'--')
13+
plot(ZF_data.time(1:sub_sample:end),ZF_data.trajs.y(1,1:sub_sample:end))
14+
plot(ZF_data.time(1:sub_sample:end),ZF_data.trajs.y(2,1:sub_sample:end))
1415
legend('x CC','y CC','x ZF','y ZF')
1516
xlabel('time')
1617
ylabel('x')

numerical_sims_quadrotor/simulate_dynamics.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
switch(Veh_mod)
1313
case 1
1414
% Mass with friction dynamics
15-
addpath(genpath('.\vehicles\mass_with_friction'))
15+
addpath(genpath('..\vehicles\mass_with_friction'))
1616
rng(1)
1717
c_damp=1+rand;mass=1+rand;step_size=1;
1818
dim=2;% spatial dimension (of positions and velocities)
1919
G_veh=define_G_mass_with_friction_wrapped(dim,c_damp,mass,step_size);
2020
case 2
2121
% Quadrotor dynamics
22-
addpath(genpath('.\vehicles\quadrotor'))
22+
addpath(genpath('..\vehicles\quadrotor'))
2323
dim=2;% spatial dimension (of positions and velocities)
2424
% Current implementation only supports dim=2 for quadrotors
2525
kp=1;kd=18;
@@ -37,7 +37,7 @@
3737

3838
% Sector bounds
3939
m=1; % lower bound on the sector
40-
L=10; % Upper bound on the sector
40+
L=5; % Upper bound on the sector
4141

4242

4343
%% Numerically simulate the dynamics
22.5 MB
Binary file not shown.
24.1 MB
Binary file not shown.
6.3 MB
Binary file not shown.

0 commit comments

Comments
 (0)