close all
clear all


 %filenames{1} = '../2021-08-01-Deployment/TestMachineData/6-2-2021/2021.06.02T15.27.54_summary';
 %filenames{2} = '../2022-04-01-Deployment/LabTests/12-21-2022/VentedSpringConstantSpeedMoves_1_summary';
 %filenames{3} = '../2023-04-01-Deployment/LabTests/3-5-2024-EfficiencyTests/2024.03.05T16.44.43_summary';
 %filenames{4} = '../2024-04-01-Deployment/LabTests/4-4-2024/2024.04.04T14.26.39_summary';
 %filenames{5} = '../2025-04-01-Deployment/LabTests/03-11-2025/2025.03.11T16.08.37_summary';
 %filenames{6} = '../2025-04-01-Deployment/LabTests/03-10-2025/2025.03.10T15.10.35_summary';
 %filenames{7} = '../2025-11-20-Shoreside/LabTests/11-21-2025/2025.11.21T15.11.36_summary';

 %DataName(1) = {'6-2-2021'}'
 %DataName(2) = {'12-21-2022'}'
 %DataName(3) = {'3-5-2024'}'
 %DataName(4) = {'4-4-2024'}'
 %DataName(5) = {'3-11-2025'}'
 %DataName(6) = {'3-10-2025'}'
 %DataName(7) = {'11-21-2025'}'

 filenames{1} = '../2025-04-01-Deployment/LabTests/03-11-2025/2025.03.11T16.08.37_summary';
 filenames{2} = '../2025-11-20-Shoreside/LabTests/11-21-2025/2025.11.21T15.11.36_summary';

 DataName(1) = {'3-11-2025'}'
 DataName(2) = {'11-21-2025'}'

%filenames{1} = '../2023-04-01-Deployment/LabTests/3-5-2024-EfficiencyTests/2024.03.05T16.44.43_summary';
%filenames{2} = '../2024-04-01-Deployment/LabTests/4-4-2024/2024.04.04T14.26.39_summary';

%DataName(1) = {'3-5-2024'}'
%DataName(2) = {'4-4-2024'}'

for i = 1:length(filenames)
  data{i} = load(filenames{i});
end

figure('Position',[520 167 1040 1331])
for i = 1:length(filenames)
subplot(6,1,1)
plot(data{i}.TM_mean_speed*39.4,data{i}.L_mean_RPM,'x');
hold all;
xlabel('Mean Speeds (ips)');
ylabel('Mean RPM');
legend(DataName)
grid on;
subplot(6,1,2)
plot(data{i}.TM_mean_speed*39.4,data{i}.TM_mean_force/4.45,'x');
hold all;
xlabel('Mean Speeds (ips)');
ylabel('Mean Force (lbs)');
grid on;
legend(DataName)
subplot(6,1,3)
plot(data{i}.TM_mean_speed*39.4,data{i}.TM_mean_lower_hyd_pressure,'x');
hold all;
xlabel('Mean Speeds (ips)');
ylabel('Mean Lower Hyd Pressure (psi)');
grid on;
legend(DataName)
subplot(6,1,4)
plot(data{i}.TM_mean_speed*39.4,data{i}.TM_mean_speed.*data{i}.TM_mean_force,'x');
hold all;
xlabel('Mean Speeds (ips)');
ylabel('Mech Input Power (W)');
grid on;
legend(DataName)
subplot(6,1,5)
plot(data{i}.TM_mean_speed*39.4,data{i}.L_mean_power,'x');
hold all;
xlabel('Mean Speeds (ips)');
ylabel('Elec Output Power (W)');
grid on;
legend(DataName)
subplot(6,1,6)
plot(data{i}.TM_mean_speed*39.4,data{i}.mean_eff,'x');
hold all;
ylabel('Efficiency %');
xlabel('Mean Speeds (ips)');
grid on;
legend(DataName)
end