%% Pres_cal.m : get calibration coefficients for Paroscientific pressure sensor
%% input is pressure sensor serial number 

function [p_u0, p_y1, p_y2, p_y3, p_c1, p_c2, p_c3, p_d1, p_d2, p_t1, p_t2, p_t3, p_t4, p_t5] = ...
    Pres_cal(presserial);

if presserial==77988;
 fprintf('   Pressure sensor SN 77988\n');
 p_u0 = 5.885437;
 p_y1 = -3936.896;
 p_y2 = -14004.80;
 p_y3 = -137037.6;
 p_c1 = -41408.55;
 p_c2 = 330.9607;
 p_c3 = 156028.1;
 p_d1 = 0.0372964;
 p_d2 = 0.000000;
 p_t1 = 30.47370;
 p_t2 = 1.755688;
 p_t3 = 75.22054;
 p_t4 = 232.8958;
 p_t5 = 3498.067;
elseif presserial==87760;
 fprintf('   Pressure sensor SN 87760\n');
 p_u0 = 5.845681;
 p_y1 = -3908.596;
 p_y2 = -14251.85;
 p_y3 = -131253.2;
 p_c1 = -25398.44;
 p_c2 = -127.4508;
 p_c3 = 86232.45;
 p_d1 = 0.0398330;
 p_d2 = 0.000000;
 p_t1 = 30.15069;
 p_t2 = 0.8916040;
 p_t3 = 56.34705;
 p_t4 = 87.40305;
 p_t5 = 2017.63;

else
 fprintf(' !!! Error: Unknown Pressure Sensor Serial Number\n'); return
end
