"README.md" did not exist on "bbe922379af5e76f044431bd60da731414756e0b"
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
function minSpeedQC(hMainFig)
%
% This function is called after option/preferences menu has been activated
% and flag salinity data where ship speed < min as HARBOUR if test is on
%
% Input
% -----
% hMainFig ............ Handle to the main user interface
%
% problem: the QC flag counter in 'Validation Codes' window
% is not updated after the test is applied
%
% Get the data from the application GUI
% -------------------------------------
tsg = getappdata( hMainFig, 'tsg_data');
% Get HARBOUR code value
% ----------------------
harbourCode = tsg.qc.hash.HARBOUR.code;
% get preference choice for ship speed test
% -----------------------------------------
test = tsg.preference.ship_speed_test;
if (test==2)
speed_min_string = tsg.preference.ship_speed_min_string;
speed_min_choice = tsg.preference.ship_speed_min;
speed_min=str2double(speed_min_string(speed_min_choice));
% Set salinity QC to HARBOUR for ship speed < speed_min
% -----------------------------------------------------
ind = find(tsg.SPDC < speed_min);
if ~isempty( ind )
tsg.SSPS_QC(ind) = castByteQC( harbourCode, ind );
end
end
% Save tsg structure
% ------------------
setappdata( hMainFig, 'tsg_data', tsg);
end