Skip to content
Snippets Groups Projects
Commit 984008c1 authored by pierre.rousselot_ird.fr's avatar pierre.rousselot_ird.fr
Browse files

Debug during PIRATA32

parent 09a9156d
No related branches found
No related tags found
No related merge requests found
......@@ -277,12 +277,52 @@ end
%
% subplot showing the transmit voltage of the instruments
%
%Determine voltage
if strcmp(params.down_sn, '23909')
xmv = [72, 91, 110, 128, 146, 165, 183, 201];
xvoltage = [20:5:55];
else
xmv = [72, 91, 110, 128, 146, 165, 183, 201];
xvoltage = [20:5:55];
end
mes_voltage = interp1(xmv, xvoltage, d.xmv(1,:));
%Determine percentage
if strcmp(params.batt_type, '10S3P')
params.lim_inf = 36.8;
voltage = [32, 33.76, 34.61, 35.43, 36.04, 36.47, 36.67, 36.74, 36.77, 36.80, 36.82,...
36.84, 36.85, 36.87, 36.89, 36.95, 37.06, 37.43, 37.75, 37.90, 38.19,...
38.89, 39.45, 40.12, 40.94, 41.90, 42];
percent = [0, 1.6, 2.5, 3.5, 4.5, 5.5, 6.5, 7.4, 8.4, 9.4, 10.4, 11.4, 12.3, 13.3, 14.3,...
15.3, 16.3, 21.1, 30.9, 40.6, 50.4, 60.2, 70.0, 79.7, 89.5, 99.3, 100];
elseif strcmp(params.batt_type, '13S2P')
params.lim_inf = 47.9;
voltage = [54.60, 54.47, 53.22, 52.16, 51.29, 50.56, 49.65, 49.27, 49.08, 48.66, 48.18,...
48.04, 47.96, 47.93, 47.91, 47.89, 47.87, 47.84, 47.80, 47.76, 47.67,...
47.41, 46.85, 46.06, 44.99, 43.89, 41.60];
percent = [100.0, 99.3, 89.5, 79.7, 70.0, 60.2, 50.4, 40.6, 30.9, 21.1, 16.3, 15.3, 14.3,...
13.3, 12.3, 11.4, 10.4, 9.4, 8.4, 7.4, 6.5, 5.5, 4.5, 3.5, 2.5,...
1.6, 0.0];
end
mes_percent = interp1(voltage, percent, mes_voltage(end));
if isfield(d,'xmv')
subplot(816)
plot(d.xmv(1,:))
text(length(d.xmv)/2,mean(d.xmv(1,:)),[' mean: ',...
num2str(fix(values.xmv(1)*10)/10)])
ylabel('X-mit volt down')
plot(mes_voltage)
hold on
plot(params.lim_inf*ones(length(mes_voltage),1),'--r')
hold off
text(length(mes_voltage)/2,mean(mes_voltage),[' mean: ',...
num2str(fix(mean(mes_voltage)*10)/10) 'V (SN' num2str(params.down_sn) ')'])
text(length(mes_voltage)/2,mean(mes_voltage)-2,[' ending rate: ',...
num2str(round(mes_percent*10)/10) '%'], 'Color', 'red')
if mes_voltage <= params.lim_inf
text(length(mes_voltage)/4,mean(mes_voltage),'RECHARGE BATTERY!!!', 'Color', 'red')
text(3*length(mes_voltage)/4,mean(mes_voltage),'RECHARGE BATTERY!!!', 'Color', 'red')
end
ylabel('Voltage [V]')
xlabel('ensemble')
ax = axis;
ax(2) = length(d.z);
......
......@@ -65,13 +65,13 @@ cruise_params;
p.cruise_id = cfg.name_mission;
p.id_mission = cfg.id_mission;
p.pathCTD = cfg.path_processing_CTD;
p.name = upper(cfg.filename_CTD);
p.name = cfg.filename_CTD;
p.correct_year = str2double(cfg.year);
p.down_sn = str2double(cfg.down_serialnumber);
p.up_sn = str2double(cfg.up_serialnumber);
p.dist_up_down = str2double(cfg.dist_up_down);
%cast_params;
files = misc_composefilenames(p,cfg);
files = misc_composefilenames(p,cfg);
disp(p.software);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment