% ----------------------------------------------------------------------------
% Preprocess CTD and related variables....
%
% 1) Adjust for following time lags:
%
%	a) depth lag
%	b) temperature lag
%	c) conductivity cell lag
%	d) fluorometer lag
%
% 2) Adjust for conductivity cell thermal characteristics
%
% 3) Adjust for vehicle attitude introduced variations of depth
%
% ----------------------------------------------------------------------------
% Create following variables:
%
% ctd_time				(s)
% ctd_pressure   		(dB)
% ctd_depth			(m)
% ctd_temp				(deg C)
% ctd_cond				(?)
% ctd_condcell_temp	(deg C) 
% ctd_salt				(ppt)
% ctd_fluor			(mV)
%
% J. G. Bellingham

ctd_depth =  data(:, m_depth) + 0.40 * sin(data(:, m_pitch));

lagmodelfix;    % computes correct salinity, establishes new time-base.

