39 lines
1.2 KiB
Matlab
39 lines
1.2 KiB
Matlab
function [outputArg] = plot_driver_statistics(panel, start, stop, 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]")
|
|
plot(ax1,pltData.xAxis(start:stop),pltData.speed_kph(start:stop))
|
|
% plot 2: accelerator pedal position [%]
|
|
ax2 = nexttile(tl);
|
|
hold(ax2, "on")
|
|
grid(ax2, "on")
|
|
title(ax2, "APP [%]")
|
|
plot(ax2,pltData.xAxis(start:stop),pltData.app_percent(start:stop))
|
|
linkaxes([ax1, ax2],"x")
|
|
% plot 3: accelerator pedal position histogram
|
|
ax3 = nexttile(tl);
|
|
hold(ax3, "on")
|
|
grid(ax3, "on")
|
|
title(ax3, "APP distribution")
|
|
ylabel(ax3, "\sigma [%]")
|
|
xlabel(ax3, "APP [%]")
|
|
histogram(ax3,pltData.app_percent(start:stop),"Normalization","percentage")
|
|
% plot 4: brake pressure histogram
|
|
ax4 = nexttile(tl);
|
|
hold(ax4, "on")
|
|
grid(ax4, "on")
|
|
title(ax4, "BrakeP distribution")
|
|
ylabel(ax4, "\sigma [%]")
|
|
xlabel(ax4, "Brake Pressure Front [bar]")
|
|
histogram(ax4,pltData.brakePFront_bar(start:stop),"Normalization","percentage")
|
|
|
|
% return null (not relevant for plots!)
|
|
outputArg = [];
|
|
end
|
|
|