Incorrect tank info.

Jef Driesen jefdriesen at telenet.be
Thu Aug 23 08:05:05 PDT 2012


On 2012-08-22 21:41, Ďoďo wrote:
>> Can you run the libdivecomputer universal application with the -m 
>> and the -d
>> options (they are enabled by default)? Then have a look at the 
>> output.xml
>> file, and check whether the gas mixes are parsed correctly. If they 
>> are,
>> then there is a bug in subsurface. If not, send me the output.log 
>> and
>> output.bin files, and I'll have a look.
>
> wanted files are attached.

I'm still missing one little piece of data: the 4 byte device version.

To get it, you can patch the libdivecomputer code to print it (it's 
stored in the suunto_d9_device_t struct). Or just run the pre-compiled 
universal or d9 test application from the website, and then run this 
command to get the lines of interest:

$ cat <logfile> | grep 'Read' | grep 'size=8'

http://www.divesoftware.org/libdc/builds/
http://www.divesoftware.org/libdc/tmp/serial.patch (this is the patch 
applied to the pre-compiled apps)

> So it looks as in subsurface and it is just confirming my assumption
> that the problem is that only information
> about gasmix in the tank are used to tag the dive.
> Since my last nitrox dive before "problematic dives" was 31, then 
> even
> I changed computer to AIR,  the information
> about mix was used rather then information about the mode - if
> available of course.
>
> I recalled that my last dive was with N21 - not possible to switch
> Suunto computers back to air before full desaturation.
>
> But information in subsurface is, that it was air. So just based on
> the gasmix the type of dive is obtained. And that's wrong.
> At leas for Suunto :)

Libdivecomputer doesn't use the Suunto dive mode setting, only the 
gasmix settings. So if you set your dive computer to air and the dive 
computer doesn't change the gasmixes to air, then you can indeed end up 
with non-air mixes. I don't have one, so I don't know how it behaves 
exactly in this regard.

BTW, what about the case where you set your gasmix to nitrox, but the 
decompression algorithm to air? That way you use the nitrox for an extra 
safety margin (because the deco algorithm is using air), while the 
actual mix is still used for calculation oxygen toxicity. Or doing just 
the decompression with a richer mix, and keep the dive computer on air. 
Again no idea if the Suunto's support this.

Anyway, I'm not sure what is the best way to take care of this. I find 
the concept of a dive mode setting a bit useless (from the perspective 
of the libdivecomputer api). It's basically redundant with other 
information. The possible dive modes are typically:

  * freedive
  * gauge
  * air
  * nitrox
  * mixed

The freedive mode is very similar to the gauge mode. Usually the main 
difference is that for freedives, time is displayed in seconds rather 
than minutes, and the samplerate is higher. But there is no real 
functional difference that I'm aware of. The only extra info you would 
get is indicating it's a freedive, and not a scuba dive.

The primary purpose of the gauge mode is to disable the decompression 
calculations, and turn your dive computer into an expensive bottom 
timer. We don't support decompression info at all, so in practice there 
is no difference with the normal dive modes either.

The difference between the last three is just the number and the 
content of the gasmixes. If you have the list of gasmixes, you can 
easily tell apart whether it's an air, nitrox or mixed gas dive (or 
trimix, heliox, or whatever you like to call it). There is definitely no 
need for three different modes, when you already have the same info from 
the gasmixes.

Jef


More information about the subsurface mailing list