### Things are working for 5 quads, 1 payload! Still need to add back in wind,...

Things are working for 5 quads, 1 payload! Still need to add back in wind, user forces, and disturbances, but things look good and it simulates very quickly for a 3 second hover trajectory
parent c47f3f53
 ... ... @@ -12,6 +12,9 @@ function [params] = parameters_Payload(global_params) params.Jx = J_sphere; % Moment of Inertia about x (kg m^2) params.Jy = J_sphere; % Moment of Inertia about y (kg m^2) params.Jz = J_sphere; % Moment of Inertia about z (kg m^2) params.J = [params.Jx, 0, 0; 0, params.Jy, 0; 0, 0, params.Jz]; %% Noise and Disturbances params.distSTD = 0; % 0-mean White Gaussian Dist (Ext Force) ... ...
File deleted
File deleted
File deleted
File deleted
 function [] = plot_force(T,F,name) figure(); subplot(3,1,1); plot(T,F(:,1)); ylabel('x-dir (N)'); title(name); subplot(3,1,2); plot(T,F(:,2)); ylabel('y-dir (N)'); subplot(3,1,3); plot(T,F(:,3)); ylabel('z-dir (N)'); xlabel('Time (s)'); end
 function [] = plot_orientation(T,X,Xd) figure(); subplot(3,1,1); plot(T,X(:,7)); hold on; plot(T,Xd(:,7),'r--'); hold off; ylabel('\phi (rad)'); xlabel('Time (s)'); title('Attitude'); legend('Actual','Desired'); ylim([-pi pi]); subplot(3,1,2); plot(T,X(:,8)); hold on; plot(T,Xd(:,8),'r--'); hold off; ylabel('\theta (rad)'); xlabel('Time (s)'); ylim([-pi pi]); legend('Actual','Desired'); subplot(3,1,3); plot(T,X(:,9)); hold on; plot(T,Xd(:,9),'r--'); hold off; ylabel('\psi (rad)'); xlabel('Time (s)'); ylim([-pi pi]); legend('Actual','Desired'); end
 function [] = plot_position(T,X,Xd) figure(); subplot(3,1,1); plot(T,X(:,1)); hold on; plot(T,Xd(:,1),'r--'); hold off; ylabel('x (m)'); title('Position'); legend('Actual','Desired'); subplot(3,1,2); plot(T,X(:,2)); hold on; plot(T,Xd(:,2),'r--'); hold off; ylabel('y (m)'); legend('Actual','Desired'); subplot(3,1,3); plot(T,X(:,3)); hold on; plot(T,Xd(:,3),'r--'); hold off; ylabel('z (m)'); xlabel('Time (s)'); legend('Actual','Desired'); end
File deleted
No preview for this file type