% Last edited on 30 Oct 15, by ED, SAMS
% sg_calib_constants.m
% values from spreadsheet for easy inclusion of glider params into diveplot.m, etc.
% Updated for mission 3 by ESDU on 25 Jan 17

% basic glider and mission params
id_str='605';
mission_title='Bowmore - Trials pre-mission 3';
mass=53.134;% kg  (from sum on trim sheet)
volmax=52332;% cc  (from ballast worksheet final table)
rho0=1027.7;% kg/m3 (from ballast worksheet for "new" environment)

% initial hydrodynamic model params
hd_a=3.83600000E-03;
hd_b=1.00780000E-02;
hd_c=9.85000000E-06;
therm_expan=7.05000000E-05;
temp_ref=1.50000000E+01;
abs_compress=4.18000000E-06;
pitchbias=0.00000000E+00;

% software limits from cal sheet:
pitch_min_cnts=296;
pitch_max_cnts=3803;
roll_min_cnts=275;
roll_max_cnts=3867;
vbd_min_cnts=546;
vbd_max_cnts=3961;
vbd_cnts_per_cc=-4.076707;

% pump parameters
pump_rate_intercept=1.275;
pump_rate_slope=-0.00015;
pump_power_intercept=17.4033;
pump_power_slope=0.017824;

% CT sensors cal constants
calibcomm=' Serial #: 0228  CAL: 10-Dec-2015';%  Serial # and cal date
t_g=4.40855124E-03;
t_h=6.44779156E-04;
t_i=2.66951913E-05;
t_j=3.36011388E-06;
c_g=-9.63001987E+00;
c_h=1.12764910E+00;
c_i=2.34657211E-03;
c_j=-7.65959907E-05;
cpcor=-9.5700E-08;
ctcor=3.2500E-06;
sbe_cond_freq_min=2.91433000E+00;	% kHz, from cal for 0 salinity
sbe_cond_freq_max=7.83901000E+00;	% kHz, est for greater than 34.9 sal max T
sbe_temp_freq_min=3.43257900E+00;	% kHz, from cal for 1 deg T
sbe_temp_freq_max=6.51603800E+00;	% kHz, from cal for 32.5 deg T

% sbe_cond_freq_min=00;% kHz, from cal for 0 salinity
% sbe_cond_freq_max=10;% kHz, est for greater than 34.9 sal max T
% sbe_temp_freq_min=00;% kHz, from cal for 1 deg T
% sbe_temp_freq_max=10000;% kHz, from cal for 32.5 deg T

%Aanderaa cal Constants
comm_oxy_type=' AA4831 '; % make and model
calibcomm_oxygen=' SN: 288  CAL: 11-Feb-2016 ';%  Serial # and cal date

optode_PhaseCoef0=0.0;
optode_PhaseCoef1=1.0;
optode_PhaseCoef2=0.0;
optode_PhaseCoef3=0.0;

optode_FoilCoefA0 = -2.988314E-06 ; 
optode_FoilCoefA1 = -6.137785E-06 ; 
optode_FoilCoefA2 = 0.001684659 ; 
optode_FoilCoefA3 = -0.1857173 ; 
optode_FoilCoefA4 = 0.0006784399 ; 
optode_FoilCoefA5 = -5.597908E-07 ; 
optode_FoilCoefA6 = 10.40158 ; 
optode_FoilCoefA7 = -0.05986907 ; 
optode_FoilCoefA8 = 0.0001360425 ; 
optode_FoilCoefA9 = -4.776977E-07 ; 
optode_FoilCoefA10 = -303.2937 ; 
optode_FoilCoefA11 = 2.530496 ; 
optode_FoilCoefA12 = -0.01267045 ; 
optode_FoilCoefA13 = 0.0001040454 ; 

optode_FoilCoefB0 = -3.56039E-07 ; 
optode_FoilCoefB1 = 3816.713 ; 
optode_FoilCoefB2 = -44.75507 ; 
optode_FoilCoefB3 = 0.4386164 ; 
optode_FoilCoefB4 = -0.007146342 ; 
optode_FoilCoefB5 = 8.906236E-05 ; 
optode_FoilCoefB6 = -6.343012E-07 ; 
optode_FoilCoefB7 = 0.0 ;
optode_FoilCoefB8 = 0.0 ;
optode_FoilCoefB9 = 0.0 ;
optode_FoilCoefB10 = 0.0 ;
optode_FoilCoefB11 = 0.0 ;
optode_FoilCoefB12 = 0.0 ;
optode_FoilCoefB13 = 0.0 ;

%Wetlab Aft cal Constants - Sensor SN 1337, Cal 19-Aug-2015
%  Chlorophyll cal Constants
WETLabsCalData.Chlorophyll.darkCounts=48;
WETLabsCalData.Chlorophyll.scaleFactor=1.2100E-02;
WETLabsCalData.Chlorophyll.maxOutput=4130;
WETLabsCalData.Chlorophyll.resolution=1.9;
WETLabsCalData.Chlorophyll.calTemperature=21.3;

%CDOM or Scattering cal Constants
WETLabsCalData.CDOM.maxOutput=4130;
WETLabsCalData.CDOM.scaleFactor=0.0901;
WETLabsCalData.CDOM.darkCounts=46;
WETLabsCalData.CDOM.resolution=1.9;
WETLabsCalData.CDOM.calTemperature=21.3;

% Scattering Sensor 700 None
WETLabsCalData.Scatter700.wavelength=700;
WETLabsCalData.Scatter700.scaleFactor=3.052E-06;
WETLabsCalData.Scatter700.darkCounts=37;
WETLabsCalData.Scatter700.resolution=1.7;
