Petrel data problems [was Re: Crash when opening log file]

Jef Driesen jef at libdivecomputer.org
Mon Nov 24 06:16:36 PST 2014


On 23-11-14 16:25, Dirk Hohndel wrote:
> On Sun, Nov 23, 2014 at 11:39:55AM +0100, Henrik Brautaset Aronsen 
> wrote:
>>> 
>>> I did a new fresh import from my Petrel on the latest master and 
>>> saved it.
>>> This time the saved petrel2.xml [1] does not contain the empty 
>>> <cylinder
>>> /> statements.  But id does contain cylinders with something in them, 
>>> even
>>> on gauge dives:
>>> 
>>> <cylinder o2='52.0%' />
>>> <cylinder o2='18.0%' he='45.0%' />
> 
> I haven't used my Petrel in gauge mode (that's one heck of an expensive
> gauge...). It would make sense that it doesn't support any gases in 
> that
> mode, but libdivecomputer doesn't know that the Petrel was in gauge 
> mode
> so it tells us about those gases as they are present in the dive 
> header.
> I am making a lot of assumptions here - but since I know a little bit
> about the Petrel data format I think these are reasonable assumptions.
> 
> Jef, can you confirm this analysis?

Yes, your analysis is correct. I just checked the documentation, and the 
gauge mode isn't mentioned anywhere. So either it's just missing in the 
documentation, or it's not recorded.

The Petrel (and Predator too) is also one of the devices where the dive 
mode is stored in the sample data, and not the dive header. I assume 
that's done because you can switch between OC/CC during the dive. But 
that makes it also rather difficult to tell whether a dive is OC or CC 
(e.g. what should we do if there are mixed samples?). And thus what 
libdivecomputer does is just return all gas mixes.

>>> I tried to do a data dump, but both subsurface and the 
>>> libdivecomputer
>>> dump app doesn't cooperate:
> 
> IIRC, the Petrel doesn't support dumps.
> 
>> Result: Unsupported operation

The Petrel protocol doesn't support memory dumps. The Petrel also 
supports the older Predator protocol. That one supports memory dumps, 
but is only capable of downloading the last 128K of memory.

For protocols without support for memory dumps, I usually dump the 
individual dives, using this patch for the universal app:

http://www.libdivecomputer.org/tmp/universal_dump_dives.patch

Jef


More information about the subsurface mailing list