%======================================================================
%                    S E T _ C A S T _ P A R A M S . M 
%                    doc: Mon Apr 20 09:03:09 2015
%                    dlm: Mon Nov  5 16:49:21 2018
%                    (c) 2015 A.M. Thurnherr
%                    uE-Info: 66 40 NIL 0 0 72 2 2 4 NIL ofnI
%======================================================================

% processable: [1:124]
%	missing: 

close all; figure(100);
more off;

%processing_version = 1;										% BT & GPS constraints
processing_version = 2;										% all constraints

f.res         = sprintf('V%d/%03d',processing_version,stn);
f.checkpoints = sprintf('checkpoints/%03d',stn);

f.ladcpdo = sprintf('../Data/PD0/%03d/%03dDL000.000',stn,stn);
f.ladcpup = sprintf('../Data/PD0/%03d/%03dUL000.000',stn,stn);

if stn == 1
	f.sadcp = '../Data/SADCP/A.mat';
elseif stn <= 28
	f.sadcp = '../Data/SADCP/B.mat';
elseif stn <= 64
	f.sadcp = '../Data/SADCP/C.mat';
else
	f.sadcp = '../Data/SADCP/D.mat';
end

f.ctd = sprintf('../Data/CTD/24Hz/%03d.1Hz',stn);
    f.ctd_header_lines      = 30;
    f.ctd_fields_per_line   = 12;
    f.ctd_pressure_field    = 2;
    f.ctd_temperature_field = 3;
    f.ctd_salinity_field    = 6;
    f.ctd_time_field        = 1;
    f.ctd_time_base         = 0;

f.nav = f.ctd;              
    f.nav_header_lines      = f.ctd_header_lines;
    f.nav_fields_per_line   = f.ctd_fields_per_line;
    f.nav_time_field        = f.ctd_time_field;
    f.nav_lat_field         = 11;
    f.nav_lon_field         = 12;
    f.nav_time_base         = f.ctd_time_base;    
    
%----------------------------------------------------------------------

ps.fig3_colormap 	= 1;					% defaults
ps.fig3_err_y_axis 	= 1;
ps.sadcpfac			= 1;
p.saveplot	        = [1:6 9:11 12:14 1];	% first plot is sometimes not 01 (Matlab bug)

if stn == 17 || stn == 64					% BT not detected correctly
	p.getdepth		= 1;
	p.btrk_mode		= 2;
end

if processing_version == 1					% disable SADCP constraint for QC
	ps.sadcpfac 	= 0;	
elseif processing_version == 2				% final proessing
	p.saveplot_pdf = [1:6 9:11 13:14 1];
	p.saveplot = [];
end

p.ladcp_station     = stn;
p.checkpoints       = [1]; 

p.cruise_id         = 'I7N';
p.whoami            = 'A.M. Thurnherr';
p.name              = sprintf('%s station #%d (V%d)',p.cruise_id,p.ladcp_station,processing_version);
