Start to describe DM5 sampleBlob

Currently the best guess of sampleBlob format. Unfortunately there seems
to be some version of DM that stores the temperature in different
location that I have not been able to figure out yet. Note that some
version of DM does not utilize sampleBlob but specific blobs for each
value (temperature, pressure, ...).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2018-04-07 07:41:04 +03:00 committed by Dirk Hohndel
parent b257b7a027
commit 06a2f36a62

View file

@ -425,6 +425,17 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
cur_dive->dc.surface_pressure.mbar = (atoi(data[14]) / 100);
interval = data[16] ? atoi(data[16]) : 0;
/*
* sampleBlob[0] version number, indicates the size of one sample
*
* Following ones describe single sample, bugs in interpretation of the binary blob are likely:
*
* sampleBlob[3] depth
* sampleBlob[7-9] pressure
* sampleBlob[11] temperature - either full Celsius or float, might be different field for some version of DM
*/
sampleBlob = (unsigned const char *)data[24];
if (sampleBlob) {