% Last edited on March 21, 2014 ELC
% sg_calib_constants.m
% values from spreadsheet for easy inclusion of glider params into diveplot.m, etc.

% basic glider and mission params
id_str='604';
mission_title='Trials April 2016 SAMS';
mass=53.6654;% kg  (from sum on trim sheet)
volmax=52861;% cc  (from ballast worksheet final table)
rho0=1027.700;% 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=156;
pitch_max_cnts=3851;
roll_min_cnts=171;
roll_max_cnts=3823;
vbd_min_cnts=500;
vbd_max_cnts=3957;
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 #: 0224  CAL: 03-Oct-2015';%  Serial # and cal date
t_g=4.41588080E-03;
t_h=6.48109015E-04;
t_i=2.68671662E-05;
t_j=3.41078691E-06;
c_g=-9.56147845E+00;
c_h=1.110882393E+00;
c_i=-8.56193288E-04;
c_j=1.52714571E-04;
cpcor=-9.5700E-08;
ctcor=3.2500E-06;
sbe_cond_freq_min=2.93809000E+00;% kHz, from cal for 0 salinity
sbe_cond_freq_max=7.93178000E+00;% kHz, est for greater than 34.9 sal max T
sbe_temp_freq_min=3.45210100E+00;% kHz, from cal for 1 deg T
sbe_temp_freq_max=6.53122900E+00;% kHz, from cal for 32.5 deg T

%Aanderaa cal Constants
comm_oxy_type='AA4831'; % make and model
calibcomm_oxygen=' SN: 327  CAL: 13-Feb-2014 ';%  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 791, cal 02-Feb-2014
%  Chlorophyll cal Constants
WETLabsCalData.Chlorophyll.darkCounts=48;
WETLabsCalData.Chlorophyll.scaleFactor=0.0122;
WETLabsCalData.Chlorophyll.maxOutput=4130;
WETLabsCalData.Chlorophyll.resolution=1;
WETLabsCalData.Chlorophyll.calTemperature=22;


%CDOM or Scattering cal Constants
WETLabsCalData.CDOM.maxOutput=4130;
WETLabsCalData.CDOM.scaleFactor=0.082;
WETLabsCalData.CDOM.darkCounts=44;
WETLabsCalData.CDOM.resolution=1;
WETLabsCalData.CDOM.calTemperature=22;

% Scattering Sensor 700 None
WETLabsCalData.Scatter700.wavelength=650;
WETLabsCalData.Scatter700.scaleFactor=3.941E-06;
WETLabsCalData.Scatter700.darkCounts=47;
WETLabsCalData.Scatter700.resolution=1.4;
