Ignore samples below the depth threshold for calculating statistics.
This commit is contained in:
parent
0d0c654b27
commit
8425a22dbc
@ -180,6 +180,7 @@ reefnet_sensusultra_parser_get_field (parser_t *abstract, parser_field_type_t ty
|
|||||||
unsigned int size = abstract->size;
|
unsigned int size = abstract->size;
|
||||||
|
|
||||||
unsigned int interval = array_uint16_le (data + 8);
|
unsigned int interval = array_uint16_le (data + 8);
|
||||||
|
unsigned int threshold = array_uint16_le (data + 10);
|
||||||
|
|
||||||
unsigned int maxdepth = 0;
|
unsigned int maxdepth = 0;
|
||||||
unsigned int nsamples = 0;
|
unsigned int nsamples = 0;
|
||||||
@ -188,10 +189,11 @@ reefnet_sensusultra_parser_get_field (parser_t *abstract, parser_field_type_t ty
|
|||||||
memcmp (data + offset, footer, sizeof (footer)) != 0)
|
memcmp (data + offset, footer, sizeof (footer)) != 0)
|
||||||
{
|
{
|
||||||
unsigned int depth = array_uint16_le (data + offset + 2);
|
unsigned int depth = array_uint16_le (data + offset + 2);
|
||||||
if (depth > maxdepth)
|
if (depth >= threshold) {
|
||||||
maxdepth = depth;
|
if (depth > maxdepth)
|
||||||
|
maxdepth = depth;
|
||||||
nsamples++;
|
nsamples++;
|
||||||
|
}
|
||||||
|
|
||||||
offset += 4;
|
offset += 4;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user