Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function updateTsgStructWithSmoothVars(hMainFig)
%
% This function is called after change option/parameter from preferenceForm
% or tsg_preference
%
% Input
% -----
% hMainFig ............ Handle to the main user interface
%
% $Id$
% Get the data from the application GUI
% -------------------------------------
tsg = getappdata( hMainFig, 'tsg_data');
% use in tsg-average by tsg.cst.TSG_DT_SMOOTH
% convert this value minute with datenum
% ---------------------------------------------
hour = floor(str2double(tsg.preference.dt_smooth)/60);
min = mod(str2double(tsg.preference.dt_smooth), 60);
smooth = datenum(0, 0, 0, hour, min , 0);
tsg.cst.TSG_DT_SMOOTH = smooth;
% Salinity, in 1 hour interval, should not depart the average for more
% than SAL_STD_MAX standard deviation
% -------------------------------------
tsg.SSPS_STDMAX = str2double(tsg.preference.ssps_stdmax);
% Maximum time difference between tsg data and water sample used to
% compute the difference
% convert this value minute with datenum
% ------------------------------------
hour = floor(str2double(tsg.preference.ws_timediff)/60);
min = mod(str2double(tsg.preference.ws_timediff), 60);
timediff = datenum(0, 0, 0, hour, min , 0);
tsg.cst.TSG_WS_TIMEDIFF = timediff;
% uncomment for debug
% -------------------
tsg.cst
tsg.SSPS_STDMAX
% Save tsg structure
% ------------------
setappdata( hMainFig, 'tsg_data', tsg);
end