Skip to content
Snippets Groups Projects
Commit a8b12e44 authored by dawehr's avatar dawehr
Browse files

Merged simplePlots

parent b096dfb4
No related branches found
No related tags found
No related merge requests found
...@@ -40,22 +40,30 @@ linkaxes([ax1, ax2], 'x'); ...@@ -40,22 +40,30 @@ linkaxes([ax1, ax2], 'x');
ax2 = subplot(2,2,1); ax2 = subplot(2,2,1);
plot(expData.Time.data, expData.X_Setpoint_Constant.data - expData.VRPN_X_Constant.data); plot(expData.Time.data, expData.X_Setpoint_Constant.data - expData.VRPN_X_Constant.data);
title('X error'); title('X error');
ylabel('meters');
xlabel('time (s)');
ax1 = subplot(2,2,2); ax1 = subplot(2,2,2);
plot(expData.Time.data, expData.X_pos_PID_Correction.data); plot(expData.Time.data, expData.X_pos_PID_Correction.data);
title('x output'); title('x controller output');
ylabel('rad');
xlabel('time (s)');
ax3 = subplot(2,2,3); ax3 = subplot(2,2,3);
plot(expData.Time.data, expData.Pitch_PID_Correction.data); hold on; plot(expData.Time.data, expData.Pitch_PID_Correction.data); hold on;
plot(expData.Time.data, expData.VRPN_Pitch_Constant.data .* 10); %plot(expData.Time.data, expData.VRPN_Pitch_Constant.data .* 10);
title('pitch output'); title('pitch output');
legend('output', 'Pitch x10'); ylabel('rad/s');
%legend('output', 'Pitch x10');
xlabel('time (s)');
ax4 = subplot(2,2,4); ax4 = subplot(2,2,4);
plot(expData.Time.data, expData.Pitch_Rate_PID_Correction.data); hold on; plot(expData.Time.data, expData.Pitch_Rate_PID_Correction.data); hold on;
plot(expData.Time.data, expData.gyro_y.data .* 100000); %plot(expData.Time.data, expData.gyro_y.data * 0.1);
legend('output', 'Pitch rate x100000'); %legend('output', 'Pitch rate x100000');
ylabel('Normalized PWM');
title('pitch rate output'); title('pitch rate output');
xlabel('time (s)');
linkaxes([ax1, ax2, ax3, ax4], 'x'); linkaxes([ax1, ax2, ax3, ax4], 'x');
%% X pos controller flow %% X pos controller flow
...@@ -282,6 +290,7 @@ xlabel('Time (s)'); ...@@ -282,6 +290,7 @@ xlabel('Time (s)');
ylabel('Displacement (m)'); ylabel('Displacement (m)');
hold off; hold off;
linkaxes([ax1, ax2, ax3], 'x');
linkaxes([ax1, ax2, ax3], 'x'); linkaxes([ax1, ax2, ax3], 'x');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment