Use only 11 bits for the depth.
When using up to 14 bits for the depth, the resulting values are too large in some cases. Most likely the upper bits are used to store something else. Even with only 11 bits, the resulting depth range (0-204.7m) should still be more than sufficient.
This commit is contained in:
parent
938839e694
commit
4c94460831
@ -162,7 +162,7 @@ cressi_leonardo_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
|
||||
dc_sample_value_t sample = {0};
|
||||
|
||||
unsigned int value = array_uint16_le (data + offset);
|
||||
unsigned int depth = value & 0x3FFF;
|
||||
unsigned int depth = value & 0x07FF;
|
||||
|
||||
// Time (seconds).
|
||||
time += interval;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user