Update: added plot_settings, integrated loadvector, added folders/files for future season preset selection
This commit is contained in:
43
season/FT23/plot_settings/plot_driver_general.m
Normal file
43
season/FT23/plot_settings/plot_driver_general.m
Normal file
@ -0,0 +1,43 @@
|
||||
function [outputArg] = plot_driver_general(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: accelerator pedal position [%]
|
||||
ax2 = nexttile(tl);
|
||||
hold(ax2, "on")
|
||||
grid(ax2, "on")
|
||||
title(ax2, "APP [%]")
|
||||
for i = 1:length(selected_laps)
|
||||
plot(ax2,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).app_percent)
|
||||
end
|
||||
% plot 3: brake pressure front [bar]
|
||||
ax3 = nexttile(tl);
|
||||
hold(ax3, "on")
|
||||
grid(ax3, "on")
|
||||
title(ax3, "Brake Pressure Front [bar]")
|
||||
for i = 1:length(selected_laps)
|
||||
plot(ax3,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).brakePFront_bar)
|
||||
end
|
||||
% plot 4: steering angle [°]
|
||||
ax4 = nexttile(tl);
|
||||
hold(ax4, "on")
|
||||
grid(ax4, "on")
|
||||
title(ax4, "Steering Angle [°]")
|
||||
for i = 1:length(selected_laps)
|
||||
plot(ax4,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).steering_deg)
|
||||
end
|
||||
% link all x axes
|
||||
linkaxes([ax1, ax2, ax3, ax4],"x")
|
||||
|
||||
% return null (not relevant for plots!)
|
||||
outputArg = [];
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user