% Last edited on 2/5/16 Ross
% Template file for sg_calib_constants.m, Kongsberg Document No. 4000122
% Applies to SG148_trim_sheet_ocean_for_mission_xxx_yyyymmdd.xlsx

% basic glider and mission params
    id_str='148';
    mission_title='sg148 Mission14:';
    mass=52.620;% kg
    volmax=51786;% cc
    rho0=1027.5;% kg/m3

% 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=420;
    pitch_max_cnts=3705;
    roll_min_cnts=160;
    roll_max_cnts=3840;
    vbd_min_cnts=611;
    vbd_max_cnts=3960;
    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;

% % Seabird CT Sail sensor cal constants
% CT Sail sensor cal constants, updated: 02-Jul-2015 Sara S	
    calibcomm ='SN 0141, CAL: 28-Apr-15';
    t_g 	=	4.35629511E-03	;	
    t_h 	=	6.31180686E-04	;	
    t_i 	=	2.41867437E-05	;	
    t_j 	=	2.58844018E-06	;	
    c_g 	=	-9.90023450E+00 ;	
    c_h 	=	1.14089659E+00	;	
    c_i 	=	-1.77708531E-03	;	
    c_j 	=	2.21017683E-04	;	
    cpcor 	=	-9.57000000E-08	;	
    ctcor 	=	3.25000000E-06	;	
    sbe_temp_freq_min =	3.217	; % kHz, from cal for 1 deg T
    sbe_temp_freq_max =	6.175	; % kHz, from cal for 32.5 deg T
    sbe_cond_freq_min =	2.95	; % kHz, from cal for 0 salinity
    sbe_cond_freq_max =	6.0297	; % kHz, est for greater than 32.5 

% % Seabird oxygen cal constants
% SBE 43f, updated 02/07/15 SS				
    comm_oxy_type= 'SBE 43f';
    calibcomm_oxygen = 'SN 0086, CAL: 16-Jan-2015';
    Soc =2.6404E-04	;
    Foffset =-7.9730E+02	;	
    o_a = -3.5973E-03;
    o_b = 2.0399E-04;
    o_c = -2.0090E-06;
    o_e = 3.6000E-02;
    Tau20 = 1.4800E+00;
    PCor = 0;   % used as flag to force usage of new algorithm

% % Aanderaa 3830 cal constants
% Aanderaa Optode Model# 5013 (AA3830), updated 02-Jul-2015 SS 
% O2 Sensing Foil PSt3 Batch 1023
    comm_oxy_type = ' AA3830 ';  
    calibcomm_optode = ' SN 021  CAL: 21-Jan-2015 ';
    optode_PhaseCoef0= -8.33096e+00;
    optode_PhaseCoef1= 1.26929e+00;
    optode_PhaseCoef2= 0.0;
    optode_PhaseCoef3= 0.0;

     optode_PhaseCoef0=-8.330956E+00;
     optode_PhaseCoef1=1.269293E+00;
     optode_PhaseCoef2=0.0;
     optode_PhaseCoef3=0.0;

     optode_C00Coef=4.270193E+03;
     optode_C01Coef=-1.327236E+02;
     optode_C02Coef=2.156297E+00;
     optode_C03Coef=-1.402758E-02;
 
     optode_C10Coef=-2.297296E+02;
     optode_C11Coef=5.742421E+00;
     optode_C12Coef=-6.853578E-02;
     optode_C13Coef=1.886123E-04;
 
     optode_C20Coef=5.064016E+00;
     optode_C21Coef=-9.620849E-02;
     optode_C22Coef=5.221808E-04;
     optode_C23Coef=7.708897E-06;
 
     optode_C30Coef=-5.263322E-02;
     optode_C31Coef=7.154674E-04;
     optode_C32Coef=3.311850E-06;
     optode_C33Coef=-1.861240E-07;
 
     optode_C40Coef=2.109168E-04;
     optode_C41Coef=-1.840878E-06;
     optode_C42Coef=-4.286455E-08;
     optode_C43Coef=1.111203E-09;

%  WETLabs wlbb2fl calibration constants.
% WET Labs BB2FL-VMT SN 1016 (fwd), updated 02-Jul-2015 SS
     WETLabsCalData_wlbb2fl_calinfo = ' SN: BB2FLVMT-1016, CAL: 16-Feb-2015 ';

% Backscattering cal constants - wavelength 470
     WETLabsCalData.wlbb2fl.Scatter470.wavelength=470;
     WETLabsCalData.wlbb2fl.Scatter470.scaleFactor=1.324E-05;
     WETLabsCalData.wlbb2fl.Scatter470.darkCounts=49;
     WETLabsCalData.wlbb2fl.Scatter470.resolution=1.1;
 
% Backscattering cal constants - wavelength 700
     WETLabsCalData.wlbb2fl.Scatter700.wavelength=700;
     WETLabsCalData.wlbb2fl.Scatter700.scaleFactor=3.304E-06;
     WETLabsCalData.wlbb2fl.Scatter700.darkCounts=49;
     WETLabsCalData.wlbb2fl.Scatter700.resolution=1.1;
 
% Chlorophyll cal constants
     WETLabsCalData.wlfl3.Chlorophyll.wavelength=695;
     WETLabsCalData.wlbb2fl.Chlorophyll.darkCounts=47;
     WETLabsCalData.wlbb2fl.Chlorophyll.scaleFactor=1.2900E-02;
     WETLabsCalData.wlbb2fl.Chlorophyll.maxOutput=4130;
     WETLabsCalData.wlbb2fl.Chlorophyll.resolution=1.3;
     WETLabsCalData.wlbb2fl.Chlorophyll.calTemperature=21.0;

% WETLabs wlbbfl2 calibration constants.
% WET Labs BBFL2-VMT SN 402 (aft), updated 02-Jul-2015 SS
     WETLabsCalData_wlbbfl2_calinfo = ' SN: BBFL2VMT-402, CAL: 16-Feb-2015 ';

% Backscattering cal constants - wavelength 650
     WETLabsCalData.wlbbfl2.Scatter532.wavelength=650;
     WETLabsCalData.wlbbfl2.Scatter532.scaleFactor=4.085E-06;
     WETLabsCalData.wlbbfl2.Scatter532.darkCounts=50;
     WETLabsCalData.wlbbfl2.Scatter532.resolution=1.5;
 
% Chlorophyll cal constants
     WETLabsCalData.wlbbfl2.Chlorophyll.wavelength=695;
     WETLabsCalData.wlbbfl2.Chlorophyll.darkCounts=46;
     WETLabsCalData.wlbbfl2.Chlorophyll.scaleFactor=1.1200E-02;
     WETLabsCalData.wlbbfl2.Chlorophyll.maxOutput=4130;
     WETLabsCalData.wlbbfl2.Chlorophyll.resolution=1.0;
     WETLabsCalData.wlbbfl2.Chlorophyll.calTemperature=21.0;

% CDOM cal constants
     WETLabsCalData.wlbbfl2.CDOM.wavelength=460;
     WETLabsCalData.wlbbfl2.CDOM.maxOutput=4124;
     WETLabsCalData.wlbbfl2.CDOM.scaleFactor=1.3350E-02;
     WETLabsCalData.wlbbfl2.CDOM.darkCounts=45;
     WETLabsCalData.wlbbfl2.CDOM.resolution=1.3;
     WETLabsCalData.wlbbfl2.CDOM.calTemperature=21.0;

