43 lines
1.2 KiB
Matlab
43 lines
1.2 KiB
Matlab
function [outputArg] = plot_driver_steering(panel, selected_laps, pltData)
|
|
% create tiledlayout (R2023a and newer)
|
|
tl = tiledlayout(panel,"vertical");
|
|
|
|
% plot 1: speed
|
|
ax1 = nexttile(tl);
|
|
hold(ax1, "on")
|
|
grid(ax1, "on")
|
|
title(ax1, "Speed [km/h]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax1,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).speed_kph)
|
|
end
|
|
% plot 2: steering angle [°]
|
|
ax2 = nexttile(tl);
|
|
hold(ax2, "on")
|
|
grid(ax2, "on")
|
|
title(ax2, "Steering Angle [°]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax2,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).steering_deg)
|
|
end
|
|
% plot 3: oversteer
|
|
ax3 = nexttile(tl);
|
|
hold(ax3, "on")
|
|
grid(ax3, "on")
|
|
title(ax3, "Oversteer")
|
|
% TODO!!
|
|
|
|
% plot 4: lateral acceleration [g]
|
|
ax4 = nexttile(tl);
|
|
hold(ax4, "on")
|
|
grid(ax4, "on")
|
|
title(ax4, "Lateral Acc [g]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax4,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).acc_lat_g)
|
|
end
|
|
% link all x axes
|
|
linkaxes([ax1, ax2, ax3, ax4],"x")
|
|
|
|
% return null (not relevant for plots!)
|
|
outputArg = [];
|
|
end
|
|
|