diff --git a/controls/DataAnalysisTool/Tool/simplePlots.m b/controls/DataAnalysisTool/Tool/simplePlots.m index 330ba82b4f333451e34c3ad38238bb4be8d21720..c969045e174281faa600fa02bb38089cb586375e 100644 --- a/controls/DataAnalysisTool/Tool/simplePlots.m +++ b/controls/DataAnalysisTool/Tool/simplePlots.m @@ -40,22 +40,30 @@ linkaxes([ax1, ax2], 'x'); ax2 = subplot(2,2,1); plot(expData.Time.data, expData.X_Setpoint_Constant.data - expData.VRPN_X_Constant.data); title('X error'); +ylabel('meters'); +xlabel('time (s)'); ax1 = subplot(2,2,2); 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); 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'); -legend('output', 'Pitch x10'); +ylabel('rad/s'); +%legend('output', 'Pitch x10'); +xlabel('time (s)'); ax4 = subplot(2,2,4); plot(expData.Time.data, expData.Pitch_Rate_PID_Correction.data); hold on; -plot(expData.Time.data, expData.gyro_y.data .* 100000); -legend('output', 'Pitch rate x100000'); +%plot(expData.Time.data, expData.gyro_y.data * 0.1); +%legend('output', 'Pitch rate x100000'); +ylabel('Normalized PWM'); title('pitch rate output'); +xlabel('time (s)'); linkaxes([ax1, ax2, ax3, ax4], 'x'); %% X pos controller flow @@ -282,6 +290,7 @@ xlabel('Time (s)'); ylabel('Displacement (m)'); hold off; +linkaxes([ax1, ax2, ax3], 'x'); linkaxes([ax1, ax2, ax3], 'x');