% LADCP PROCESSING SOFTWARE   5.0
% Martin Visbeck, LDEO, April 2000
% master m-file, copy and edit for each station
%
% applied for OC369
clear
%load gopro

%%%%%%%%%%% User parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

LT_FLAG=1;                         % 1=manual time;2=gopro time
LG_FLAG=1;                         % 1=manual gps; 2=gopro gps
MD_FLAG=1;                         % 1=manual max d; 2=ctd max d

% Filenames
f.ladcpdo='../dn/wh_dn000.000';    % ladcp down file
f.ladcpup='../up/wh_up000.000';    % ladcp up file; leave blank if absent
p.down_sn=1411;                    % down instrument s/n
p.up_sn=1412;                      % up instrument s/n
p.ladcp_station=1;                 % LADCP station number
%f.ctd=['/oden/ctdladcp/'];        % ctd file; '' = use W for depth
%f.nav=['/oden/ctdladcp/'];        % nav file; ''
f.ctd=[' '];                       % ctd file; '' = use W for depth
f.nav=[' '];                       % nav file; ''
f.res='cb66';                     % base filename (without extension)
p.name=f.res;                      % station name

% start, deepest and end depth if W is used to find depth
if MD_FLAG==1
p.zpar=[2 3182.3 2];                 % p.zpar [startdepth, maxdepth (from CTD), enddepth]
elseif MD_FLAG==2
p.zpar=[5 max(dd) 5];  
end

% Parameter 
if LT_FLAG==1
p.time_start=[2002 09 08 08 18 20];% ladcp start down time [yr,mn,da,hr,mn,sc]
p.time_end=  [2002 09 08 10 47 57];% ladcp at surface time
elseif LT_FLAG==2
p.time_start= sdw;                 % ladcp start down time [yr,mn,da,hr,mn,sc]
p.time_end  = suw;                 % ladcp at surface time
end

% time offset if ADCP time was set incorrect
%p.timoff=0;

% start and end GPS position (needs to be quite accurate <20m)
% [degrees N, minutes N, degrees E, minutes E]
% for west and south derees use minus sign on BOTH degree and minute
if LG_FLAG==1
p.poss=[78 29.6136 -155 -47.1847];
p.pose=[78 30.2031 -155 -50.5982];
elseif LT_FLAG==2
p.poss=[ctdlat3(1) sign(ctdlat3(1)).*ctdlat3(2) ctdlat3(3) sign(ctdlat3(3)).*ctdlat3(4)];
p.pose=[ctdlat4(1) sign(ctdlat4(1)).*ctdlat4(2) ctdlat4(3) sign(ctdlat4(3)).*ctdlat4(4)];
end

