On 13-09-14 11:49, Jef Driesen wrote:
On 12-09-14 08:55, Willem Ferguson wrote:
Secondly Subsurface sees some very funny values being read, as is
obvious from the xml dive log. For instance, on the last dive, it sees
cylinder pressures as well as a gas mixture that should not come from
the DC as it is a) not air-integrated and b) nitrox was disabled for
that dive. The temperature values are crazy. The depth profiles profile
look about right.
This is most likely a bug in the libdivecomputer parser. Unfortunately these
kinds of parser bugs happen all the time for oceanic devices, because they use a
slightly different data format for each device. To fix this, we just need to
find the difference and add yet another device specific change in the atom2
parser.
Does the attached libdivecomputer patch fixes the problem? (After applying the
patch, you'll need to re-download the dives to notice the change.)
Jef
>From 693bfa391605346013f4b6d0ad134ee48506c61b Mon Sep 17 00:00:00 2001
From: Jef Driesen <[email protected]>
Date: Sat, 13 Sep 2014 13:20:16 +0200
Subject: [PATCH] Fix the Tusa Zen header size and pressure.
For the Tusa Zen, the header is 16 bytes smaller. With this change, the
gasmixes and the intial temperature are now parsed correctly.
The tank pressure samples have also been disabled manually, because this
is a non-air integrated model that doesn't seem to set the initial tank
pressure to the magic value 10000.
---
src/oceanic_atom2_parser.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c
index 00c52e9..beed0a8 100644
--- a/src/oceanic_atom2_parser.c
+++ b/src/oceanic_atom2_parser.c
@@ -47,6 +47,7 @@
#define ELEMENT2 0x4357
#define VEO20 0x4359
#define VEO30 0x435A
+#define ZEN 0x4441
#define ZENAIR 0x4442
#define ATMOSAI2 0x4443
#define PROPLUS21 0x4444
@@ -287,7 +288,7 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns
parser->model == VEO20 || parser->model == VEO30 ||
parser->model == OCS || parser->model == PROPLUS3 ||
parser->model == A300 || parser->model == MANTA ||
- parser->model == INSIGHT2) {
+ parser->model == INSIGHT2 || parser->model == ZEN) {
headersize -= PAGESIZE;
} else if (parser->model == VT4 || parser->model == VT41) {
headersize += PAGESIZE;
@@ -391,7 +392,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
parser->model == VEO20 || parser->model == VEO30 ||
parser->model == OCS || parser->model == PROPLUS3 ||
parser->model == A300 || parser->model == MANTA ||
- parser->model == INSIGHT2) {
+ parser->model == INSIGHT2 || parser->model == ZEN) {
headersize -= PAGESIZE;
} else if (parser->model == VT4 || parser->model == VT41) {
headersize += PAGESIZE;
@@ -440,7 +441,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
unsigned int have_temperature = 1, have_pressure = 1;
if (parser->model == VEO30 || parser->model == OCS ||
parser->model == ELEMENT2 || parser->model == VEO20 ||
- parser->model == A300) {
+ parser->model == A300 || parser->model == ZEN) {
have_pressure = 0;
} else if (parser->model == F10) {
have_temperature = 0;
--
1.9.1
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface