% sg_calib_constants.m
% establishes glider calibration constants

% This fils is an example and MUST be changed apprpriately for your
% own glider.

id_str = '145';

mission_title ='CMORE upwelling';

calibcomm = 'SBE s/n 0076, calibration 19 Nov 2007';

t_g =  4.36820909e-03 ;
t_h =  6.36458379e-04 ;
t_i =  2.57280253e-05 ; 
t_j =  2.88127784e-06 ;

% Minimum and maximum frequencies (kHz) for reasonable
%  oceanographic values of temperature from SBE calibration
%  for C/T s/n 041

sbe_temp_freq_min = 3.214274; % kHz
sbe_temp_freq_max = 6.081845; % kHz

c_g = -1.01920169e+01 ;
c_h =  1.15435308e+00 ;
c_i = -1.71792182e-03 ;
c_j =  2.19448371e-04 ;

% Minimum and maximum frequencies (kHz) for reasonable
%  oceanographic values of conductivity SBE calibration
%  for C/T s/n 041

sbe_cond_freq_min = 2.98792; % kHz
sbe_cond_freq_max = 7.95840; % kHz

cpcor = -9.57e-08 ;
ctcor =  3.25e-06 ;

calibcomm_oxygen = '0128';

Soc = 2.2507e-4;
Foffset = -773.4773;
o_a = -1.6190e-3;
o_b = 2.3871e-4;
o_c = -4.1929e-6;
o_e = 0.036;

%mass = 52.564; % from sum on trim sheet
mass = 52.088;  % scale weight from spreadsheet
volmax = 51713; % from ballast worksheet final table

hd_a = 0.003836;
hd_b = 0.010078;
hd_c = 9.8541e-6;

rho0 = 1027.5;

pitch_min_cnts = 429;
pitch_max_cnts = 3741;
roll_min_cnts = 183;
roll_max_cnts = 3940;
vbd_min_cnts = 500;
vbd_max_cnts = 3982;
vbd_cnts_per_cc = -4.0767;


pitchbias = 0.;

pump_rate_intercept = 1.275;
pump_rate_slope = -0.00015;
pump_power_intercept = 17.4033;
pump_power_slope = 0.017824;

