% sg_calib_constants.m
% values for basestation calculations, diveplot.m, etc.
% last edited 27-Mar-09 by F.Stahr for ocean/delivery

% establishes glider calibration constants
% basic glider and mission params

id_str = '148';
mission_title ='C-More Traps ALOHA ';

% CT sensors cal constants
%calibcomm = 'SBE s/n 0075, calibration 24 Sep 2007';
calibcomm ='SN 0075 cal 29-Nov-08';	% SN and cal date

t_g =  4.39881639e-03 ;
t_h =  6.41443301e-04 ;
t_i =  2.63985750e-05 ; 
t_j =  2.90438825e-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.01031496e+01 ;
c_h =  1.14537193e+00 ;
c_i = -1.45617235e-03 ;
c_j =  2.01499046e-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.5	; % kHz, from cal for 0 salinity
sbe_cond_freq_max =	8.5	; % kHz, est for greater than 32.5 
sbe_temp_freq_min =	2.5	; % kHz, from cal for 1 deg T
sbe_temp_freq_max =	7.2	; % kHz, from cal for 32.5 deg T

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

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

% SBE oxygen cal constants				
comm_oxy_type= 'SBE 43f';
calibcomm_oxygen =	'SN 0086, 24-Jan-09'; % SN and cal date
%calibcomm_oxygen = '0086, calibration 20 Jul 2007';

Soc = 2.0915e-04;
Foffset = -773.19;
%Boc	=	0.0	;
%Tcor	=	0.0	;	
%Pcor	=	0.0	;	
% other type of parameters from SBE oxygen
o_a = -1.9749e-3;
o_b = 2.0669e-4;
o_c = -3.6111e-6;
o_e = 0.036;
PCor = 0;   % used as flag to force usage of new algorithm

% Aanderaa Optode SN 021 - model 5013
% O2 Sensing Foil PSt3 Batch 1707
optode_C00Coef =  5.32650e+03; 
optode_C01Coef = -1.92117e+02;
optode_C02Coef =  4.14357e+00;
optode_C03Coef = -3.78695e-02;
optode_C10Coef = -2.92068e+02; 
optode_C11Coef =  9.71993e+00;
optode_C12Coef = -2.14295e-01;
optode_C13Coef =  2.00778e-03;
optode_C20Coef =  6.47595e+00;
optode_C21Coef = -1.98080e-01;
optode_C22Coef =  4.49940e-03;
optode_C23Coef = -4.30530e-05;
optode_C30Coef = -6.69288e-02;
optode_C31Coef =  1.88066e-03;
optode_C32Coef = -4.42348e-05;
optode_C33Coef =  4.28382e-07;
optode_C40Coef =  2.65042e-04;
optode_C41Coef = -6.83185e-06;
optode_C42Coef =  1.67071e-07;
optode_C43Coef = -1.61989e-09;

% Wetlabs 
% this glider also carries WET Labs BB2F-VMG SN 398
wlbb2f_chl_dark = 33;           % counts
wlbb2f_chl_scale = 0.0145;      % mirco_g/l/count
wlbb2f_700_dark = 16;           % counts
wlbb2f_700_scale = 3.510e-6;    % counts
wlbb2f_470_dark = 50;           % counts
wlbb2f_470_scale = 1.290e-5;    % counts

% this glider also carries WET Labs BB2FL-VMT SN 402
wlbbfl2_650_dark = 44;          % counts
wlbbfl2_650_scale = 3.574e-6;   % (m^{-1}sr^{-1})/counts
wlbbfl2_chl_dark = 43;          % counts
wlbbfl2_chl_scale = 0.0107;     % micro_g/l/count
wlbbfl2_cdom_dark = 41;         % count
wlbbfl2_cdom_scale = 0.0790;    % ppb/count

%mass 	=	52.072	; % in kg, into Port Susan
mass	=	52.499	; % from post-PS ballasting
%volmax =	51568	; % in cc, from ballast worksheet pre-PS
%volmax		51647	; % from post-PS regressions
volmax  =       51685   ; % projection for ocean ballast

% initial hydrodynamic model params				
hd_a = 0.003836;
hd_b = 0.010078;
hd_c = 9.8541e-6;

rho0 = 1027.5;  % in kg/m3, for Port Susan
therm_expan = 70.5e-6;    % SG thermal expansion coeff [/degree C]
temp_ref = 15;  % reference temperature for SG thermal expansion calculation
abs_compress = 4.18e-6;  % SG vehicle compressibility
pitchbias = 0;	% pitch reference in regressions

pitch_min_cnts = 420;
pitch_max_cnts = 3705;
roll_min_cnts = 160;
roll_max_cnts = 3940;
vbd_min_cnts = 511;
vbd_max_cnts = 3949;
vbd_cnts_per_cc = -4.0767;

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

% end of file
