Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TSG QC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
US191
TSG QC
Commits
10cc99e6
Commit
10cc99e6
authored
Jun 3, 2010
by
jacques.grelet_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
correct some initialisation of <var_QC (use of NaN not allowed for QC, use code BAD instead
parent
bbe92237
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tsg_io/readTsgDataAstrolabe.m
+26
-26
26 additions, 26 deletions
tsg_io/readTsgDataAstrolabe.m
tsg_util/tsg_initialisation.m
+11
-11
11 additions, 11 deletions
tsg_util/tsg_initialisation.m
tsg_util/updateTsgStruct.m
+18
-18
18 additions, 18 deletions
tsg_util/updateTsgStruct.m
with
55 additions
and
55 deletions
tsg_io/readTsgDataAstrolabe.m
+
26
−
26
View file @
10cc99e6
...
@@ -23,9 +23,10 @@ nbFieldNames = length( tsgNames );
...
@@ -23,9 +23,10 @@ nbFieldNames = length( tsgNames );
% Get NO_CONTROL, GOOD, PROBABLY_BAD codes
% Get NO_CONTROL, GOOD, PROBABLY_BAD codes
% ----------------------------------------
% ----------------------------------------
NO_CONTROL
=
tsg
.
qc
.
hash
.
NO_CONTROL
.
code
;
%NO_CONTROL = int8(tsg.qc.hash.NO_CONTROL.code);
GOOD
=
tsg
.
qc
.
hash
.
GOOD
.
code
;
GOOD
=
int8
(
tsg
.
qc
.
hash
.
GOOD
.
code
);
PROBABLY_BAD
=
tsg
.
qc
.
hash
.
PROBABLY_BAD
.
code
;
PROBABLY_BAD
=
int8
(
tsg
.
qc
.
hash
.
PROBABLY_BAD
.
code
);
BAD
=
int8
(
tsg
.
qc
.
hash
.
BAD
.
code
);
% Display read file info on console
% Display read file info on console
% ---------------------------------
% ---------------------------------
...
@@ -128,9 +129,9 @@ mm = repmat(NaN, [nn 1]);
...
@@ -128,9 +129,9 @@ mm = repmat(NaN, [nn 1]);
yy
=
repmat
(
NaN
,
[
nn
1
]);
yy
=
repmat
(
NaN
,
[
nn
1
]);
for
it
=
1
:
nn
for
it
=
1
:
nn
ddmmyy_str
=
sprintf
(
'%06d'
,
ddmmyy
(
it
));
ddmmyy_str
=
sprintf
(
'%06d'
,
ddmmyy
(
it
));
dd
(
it
)
=
str2num
(
ddmmyy_str
(:,
1
:
2
));
dd
(
it
)
=
str2num
(
ddmmyy_str
(:,
1
:
2
));
%#ok<ST2NM>
mm
(
it
)
=
str2num
(
ddmmyy_str
(:,
3
:
4
));
mm
(
it
)
=
str2num
(
ddmmyy_str
(:,
3
:
4
));
%#ok<ST2NM>
yy
(
it
)
=
2000
+
str2num
(
ddmmyy_str
(:,
5
:
6
));
yy
(
it
)
=
2000
+
str2num
(
ddmmyy_str
(:,
5
:
6
));
%#ok<ST2NM>
end
end
% Warning: for post-2000 files only!
% Warning: for post-2000 files only!
...
@@ -179,19 +180,18 @@ miss=-90;
...
@@ -179,19 +180,18 @@ miss=-90;
% -------------------------------------------------------
% -------------------------------------------------------
if
~
isempty
(
tsg
.
SSTP
)
if
~
isempty
(
tsg
.
SSTP
)
tsg
.
SSTP
(
tsg
.
SSTP
<
miss
)
=
nan
;
tsg
.
SSTP
(
tsg
.
SSTP
<
miss
)
=
NaN
;
tsg
.
SSTP_QC
(
isnan
(
tsg
.
SSTP
))
=
nan
;
tsg
.
SSTP_QC
=
castByteQC
(
GOOD
,
tsg
.
DAYD
)
;
tsg
.
SSTP_QC
=
repmat
(
GOOD
,[
length
(
tsg
.
DAYD
)
1
])
;
tsg
.
SSTP_QC
(
isnan
(
tsg
.
SSTP
))
=
BAD
;
end
end
tsg
.
SSPS_QC
=
repmat
(
PROBABLY_BAD
,[
length
(
tsg
.
DAYD
)
1
]);
tsg
.
SSPS_QC
=
castByteQC
(
PROBABLY_BAD
,
tsg
.
DAYD
);
tsg
.
SSPS_ADJUSTED_QC
=
repmat
(
GOOD
,[
length
(
tsg
.
DAYD
)
1
]);
tsg
.
SSPS_ADJUSTED_QC
=
castByteQC
(
GOOD
,
tsg
.
DAYD
);
tsg
.
SSPS
(
tsg
.
SSPS
<
miss
)
=
nan
;
tsg
.
SSPS
(
tsg
.
SSPS
<
miss
)
=
NaN
;
tsg
.
SSJT
(
tsg
.
SSJT
<
miss
)
=
nan
;
tsg
.
SSJT
(
tsg
.
SSJT
<
miss
)
=
NaN
;
tsg
.
SSPS_ADJUSTED
(
tsg
.
SSPS_ADJUSTED
<
miss
)
=
nan
;
tsg
.
SSPS_ADJUSTED
(
tsg
.
SSPS_ADJUSTED
<
miss
)
=
NaN
;
tsg
.
SSPS_QC
(
isnan
(
tsg
.
SSPS
))
=
nan
;
tsg
.
SSPS_QC
(
isnan
(
tsg
.
SSPS
))
=
BAD
;
tsg
.
SSPS_ADJUSTED_QC
(
isnan
(
tsg
.
SSPS
))
=
nan
;
tsg
.
SSPS_ADJUSTED_QC
(
isnan
(
tsg
.
SSPS
))
=
BAD
;
% populate tsg.file structure
% populate tsg.file structure
% ---------------------------
% ---------------------------
...
...
This diff is collapsed.
Click to expand it.
tsg_util/tsg_initialisation.m
+
11
−
11
View file @
10cc99e6
...
@@ -126,18 +126,18 @@ tsg.report.badvelocity = 0; % Records deleted because of bad velocity
...
@@ -126,18 +126,18 @@ tsg.report.badvelocity = 0; % Records deleted because of bad velocity
% Quality flags reference table, see GOSUD, DATA FORMAT TSG V1.6, table 4
% Quality flags reference table, see GOSUD, DATA FORMAT TSG V1.6, table 4
% -----------------------------------------------------------------------
% -----------------------------------------------------------------------
% Code Meaning
% Code
Key
Meaning
%
%
% 0 No QC was performed
% 0
NO_CONTROL
No QC was performed
% 1 Good data
% 1
GOOD
Good data
% 2 Probably good data
% 2
PROBABLY_GOOD
Probably good data
% 3 Bad data that are potentially correctable
% 3
PROBABLY_BAD
Bad data that are potentially correctable
% 4 Bad data
% 4
BAD
Bad data
% 5 Value changed
% 5
VALUE_CHANGED
Value changed
% 6 Data acquired in harbour
% 6
HARBOUR
Data acquired in harbour
% 7 Not used
% 7
NOT_USED
Not used
% 8 Interpolated value
% 8
INTERPOLATED_VALUE
Interpolated value
% 9 Missing value
% 9
MISSING_VALUE
Missing value
% Quality definition, we use an instance of dynaload object
% Quality definition, we use an instance of dynaload object
% ---------------------------------------------------------
% ---------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
tsg_util/updateTsgStruct.m
+
18
−
18
View file @
10cc99e6
...
@@ -20,8 +20,7 @@ shipVelocity( hMainFig );
...
@@ -20,8 +20,7 @@ shipVelocity( hMainFig );
% -------------------------------------
% -------------------------------------
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
nPARA
=
3
;
PARA
=
{
'SSPS'
,
'SSJT'
,
'SSTP'
};
PARA
=
[
'SSPS'
;
'SSJT'
;
'SSTP'
];
% Get NO_CONTROL and INTERPOLATED_VALUE codes
% Get NO_CONTROL and INTERPOLATED_VALUE codes
% a modifier !!!!!!!!!!!!!
% a modifier !!!!!!!!!!!!!
...
@@ -42,7 +41,8 @@ if ~isempty(tsg.indcross)
...
@@ -42,7 +41,8 @@ if ~isempty(tsg.indcross)
tsg
.
loncross
=
sign
(
dlon
(
tsg
.
indcross
))
*
360
;
tsg
.
loncross
=
sign
(
dlon
(
tsg
.
indcross
))
*
360
;
tsg
.
indcross
=
deflon
(
tsg
.
indcross
);
tsg
.
indcross
=
deflon
(
tsg
.
indcross
);
for
i
=
1
:
length
(
tsg
.
indcross
)
for
i
=
1
:
length
(
tsg
.
indcross
)
tsg
.
LONX
(
tsg
.
indcross
(
i
)
+
1
:
end
)
=
tsg
.
LONX
(
tsg
.
indcross
(
i
)
+
1
:
end
)
-
tsg
.
loncross
(
i
);
tsg
.
LONX
(
tsg
.
indcross
(
i
)
+
1
:
end
)
=
...
tsg
.
LONX
(
tsg
.
indcross
(
i
)
+
1
:
end
)
-
tsg
.
loncross
(
i
);
end
end
end
end
tsg
.
lonplus
=
0
;
tsg
.
lonplus
=
0
;
...
@@ -69,23 +69,23 @@ tsg.DATE_END = [date(1:8) date(10:15)];
...
@@ -69,23 +69,23 @@ tsg.DATE_END = [date(1:8) date(10:15)];
% Variables must exists
% Variables must exists
% ---------------------
% ---------------------
for
i
=
1
:
n
PARA
for
para
=
PARA
para
1
=
PARA
(
i
,:
);
para
=
char
(
para
);
if
~
isempty
(
tsg
.
(
para
1
)
)
&&
isempty
(
tsg
.
([
para
1
'_QC'
])
)
if
~
isempty
(
tsg
.
(
para
)
)
&&
isempty
(
tsg
.
([
para
'_QC'
])
)
% If QC variables are emptied, fill them with NO_CONTROL code value
% If QC variables are emptied, fill them with NO_CONTROL code value
% -----------------------------------------------------------------
% -----------------------------------------------------------------
tsg
.
([
para
1
'_QC'
])
=
castByteQC
(
NO_CONTROL
,
tsg
.
DAYD
);
tsg
.
([
para
'_QC'
])
=
castByteQC
(
NO_CONTROL
,
tsg
.
DAYD
);
end
end
if
~
isempty
(
tsg
.
(
para
1
)
)
&&
isempty
(
tsg
.
([
para
1
'_ADJUSTED_QC'
])
)
if
~
isempty
(
tsg
.
(
para
)
)
&&
isempty
(
tsg
.
([
para
'_ADJUSTED_QC'
])
)
% If QC variables are emptied, fill them with NO_CONTROL code value
% If QC variables are emptied, fill them with NO_CONTROL code value
% -----------------------------------------------------------------
% -----------------------------------------------------------------
tsg
.
([
para
1
'_ADJUSTED_QC'
])
=
castByteQC
(
NO_CONTROL
,
tsg
.
DAYD
);
tsg
.
([
para
'_ADJUSTED_QC'
])
=
castByteQC
(
NO_CONTROL
,
tsg
.
DAYD
);
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment