close all

result = readmatrix("2025_12_03_16_23_RUN1_ADC.csv");
%result = result(14430:end, : );
result(:,14) = result(:,14)./2;
time = result(:,1);

temp = 0.000111 .* result(:,4:9)  + 2.31991;

pressure = result(:,10:17).*(0.000015)-6.565;

load_cell = result(:,2:3);
weight = -1.166759307845543e-04 .* 0.5.*(load_cell(:,1) + load_cell(:,2)) + 4.971416323340051e+02;

figure()
scatter(time,weight,10)
title("load cell in Kg")
xlabel("Time in ms")
ylabel("KG")

for x = 1:7
    figure()
    scatter(time,pressure(:,x),10)
    title(sprintf("Pressure channel %d",x))
    xlabel("Time in ms")
    ylabel("Pressure")
end

for x = 1:6
    figure()
    scatter(time,temp(:,x),10)
    title(sprintf("temperature channel %d",x))
    xlabel("Time in ms")
    ylabel("Temprature in C")
end
