% set parameters used for logging and calculations
% first field is the same as the raw logging directory (eg. os38)
% second field is the ping type (in case of interleaved pings)
%% parsed  manually or by running
%  cruise_proc; params = get_params(allparams, 'os38', 'nb');


%%  OS38 processing parameters
h_align = 119.6;  % 125.0 - 7.15 - (-1.72) (from btcaluv.out)
ducer_depth  = 6;

%---------------------------------
%% OS38, BB pings
% processing  sources:
os38.bb.h_align      = h_align;
os38.bb.ducer_depth = ducer_depth;
os38.bb.velscale     = 1.0;


% os38.bb.editcfg.weakprof_numbins = 2;

%---------------------------------
%% OS38, NB pings
% processing  sources:
os38.nb.h_align      = h_align;
os38.nb.ducer_depth  = ducer_depth;
os38.nb.velscale     = 1.0;

%os38.nb.editcfg.weakprof_numbins = 1;    % default

%-------------------------------------------------------


%%%% NBP NB150 processing parameters

% processing  sources:
nb150.nb.h_align      = 45.4;   %% 45.00 - (-.4); %% 45 - btcaluv.out 
nb150.nb.ducer_depth  = 6;
nb150.nb.beamangle    = 30;


%%%%%%%%%%%% soundspeed correction 
%% applied to ensemble average
%%
%% set velocity scale factor:
%%
%% obsolete: (still works, but deprecated)
%%------------
%%   wh300.bb.velscale = 2.0;
%%
%% newer method:
%  -----------
%  option       what it does
%
% 'calculate'   (calc from thermistor temperature and salinity (below)
%     []         (don't change anything; i.e. use the original 1536 constant)
%   1536        (or some other constant -- use this constant
%               
%                (At some later date we could add soundspeed input directly

nb150.nb.velscale.soundspeed = 'calculate'; 
nb150.nb.velscale.salinity   = 35;         %% if 'calculate', use this S
nb150.nb.velscale.scalefactor = 1.02;      %% also apply this scale factor


allparams = struct('os38', os38, 'nb150', nb150);

