% sg_calib_constants.m			
% sg156 post-refurb 2024
% Edited 26-Apr-24 by ESDU, SAMS

% basic glider and mission params				
id_str 	=	'156'	;	
mission_title	= 'Ellett Array 11c';
mass 	=	51547	; % in kg
rho0	=	1.0275	; % FM_ignore

% hydrodynamic params & vol_max
% Start of mission: default parameters / from MARS ballasting (for the record, not used by BS3)
volmax = 50723.9; % FM_ignore
hd_a=3.83600000E-03; % FM_ignore
hd_b=1.00780000E-02; % FM_ignore
hd_c=9.85000000E-06; % FM_ignore

% CT sensors cal constants				
calibcomm ='SN 0086 cal 04-Apr-2022';	% SN and cal date. Calibration done at NOC.
t_g 	=	4.2580999E-03 ;
t_h 	=	3.9633553E-04 ;
t_i 	=	-1.2264364E-04  ;
t_j 	=	-2.6987635E-05  ;
c_g 	=	-9.37554754E+00  ;
c_h 	=	9.37665454E-01  ;
c_i 	=	4.97442132E-02  ;
c_j     =	-3.17036384E-03  ;
ctcor 	=	3.2500000E-06	;	
cpcor	=	-9.57000000E-08 ;
sbe_temp_freq_min= 3.3;	% kHz, from cal for temp 1 deg T
sbe_temp_freq_max= 6.5;	% kHz, from cal for temp 32.5 deg T
sbe_cond_freq_min= 2.9;	% kHz, from cal for cond 0 S/m
sbe_cond_freq_max= 8.0;	% kHz, from cal for cond 6.1+ S/m

				
% Aanderaa Optode SN 229 - (NOT fast-foil unit as was pre-2010)
% last factory calibration 2010; checked at Aanderaa2022
comm_oxy_type= 'Optode 4330' ;
calibcomm_optode = 'Optode 4330 SN: 229 Foil ID: 4909E calibrated 28-Apr-2022';

% Unsure what the params below are or where they came from - comment out
% optode_st_calphase = 30.88;  % the mean of the optode calphase column in the selftest eng file
% optode_st_temp = 8.28; % the mean of the optode temperature column in the selftest eng file
% optode_st_slp = 1022.5; % the sea level pressure in air in mbar

optode_PhaseCoef0 = 0;
optode_PhaseCoef1 = 1;
optode_PhaseCoef2 = 0;
optode_PhaseCoef3 = 0;
optode_ConcCoef0 = -2.69727; %-2.02199;
optode_ConcCoef1 = 1.26560; %1.22744;

optode_TempCoef0 = 28.1660; %28.1663;
optode_TempCoef1 = -3.09185e-2; %-0.0309343;
optode_TempCoef2 = 3.03608e-6; %3.0032e-06;
optode_TempCoef3 = -4.50149e-9; %-4.49273e-09;
optode_TempCoef4 = 0;
optode_TempCoef5 = 0;

optode_FoilCoefA0 = -2.822802e-06;
optode_FoilCoefA1 = -6.776306e-06;
optode_FoilCoefA2 = 0.001803907;
optode_FoilCoefA3 = -0.1930332;
optode_FoilCoefA4 = 0.0006291334;
optode_FoilCoefA5 = -2.982824e-07;
optode_FoilCoefA6 = 10.49904;
optode_FoilCoefA7 = -0.0545574;
optode_FoilCoefA8 = 9.2565e-05;
optode_FoilCoefA9 = -4.397045e-07;
optode_FoilCoefA10 = -297.128;
optode_FoilCoefA11 = 2.236731;
optode_FoilCoefA12 = -0.007953454;
optode_FoilCoefA13 = 4.779584e-05;

optode_FoilCoefB0 = 7.511727e-08;
optode_FoilCoefB1 = 3624.938;
optode_FoilCoefB2 = -37.62469;
optode_FoilCoefB3 = 0.2454485;
optode_FoilCoefB4 = -0.003315326;
optode_FoilCoefB5 = 4.75364e-05;
optode_FoilCoefB6 = -4.883913e-07;
optode_FoilCoefB7 = 0;
optode_FoilCoefB8 = 0;
optode_FoilCoefB9 = 0;
optode_FoilCoefB10 = 0;
optode_FoilCoefB11 = 0;
optode_FoilCoefB12 = 0;
optode_FoilCoefB13 = 0;

optode_SVU_enabled = 0;
optode_SVUCoef0 = 0;
optode_SVUCoef1 = 0;
optode_SVUCoef2 = 0;
optode_SVUCoef3 = 0;
optode_SVUCoef4 = 0;
optode_SVUCoef5 = 0;
optode_SVUCoef6 = 0;


% WET Labs BB2FL-VMG SN 512 - calibration 05-Apr-2022
% For blue scattering channel
wlbb2fl_sig470nm_dark_counts = 54;
% wlbb2fl_sig470nm_max_counts = 4095; % not specified on cal sheet
wlbb2fl_sig470nm_resolution_counts = 1.0;
wlbb2fl_sig470nm_scale_factor = 1.912E-05;
% For red scattering channel
wlbb2fl_sig700nm_dark_counts = 49;
% wlbb2fl_sig700nm_max_counts = 4095; % not specified on cal sheet
wlbb2fl_sig700nm_resolution_counts = 1.0;
wlbb2fl_sig700nm_scale_factor = 3.805E-06;
% For chlorophyll fluorescence channel
wlbb2fl_sig695nm_dark_counts = 59;
wlbb2fl_sig695nm_max_counts = 4130;
wlbb2fl_sig695nm_resolution_counts = 2.2;
wlbb2fl_sig695nm_scale_factor = 0.0121;

% end of file
