Handling of cylinder pressure data within a dive.

Jef Driesen jef at libdivecomputer.org
Mon May 5 04:35:56 PDT 2014


On 2014-05-01 19:07, Linus Torvalds wrote:
> On Thu, May 1, 2014 at 10:00 AM, Willem Ferguson
> <willemferguson at zoology.up.ac.za> wrote:
>> 
>> If I understand it correctly, the existing sample structure can 
>> therefore
>> handle multiple cylinders, even if two of them discharge 
>> simultaneously.
> 
> Well, in theory, and in a limited way (you'd have to have the
> pressures in alternating samples). In practice, we really suck at it,
> and cannot draw the end result of true concurrent cases sanely anyway.
> 
> So you understand everything correctly, but to _really_ support
> multiple different samples we would need to do lots of work. Including
> to the profile drawing, but I really think we should change the whole
> sample representation too. I don't quite know exactly what _to_,
> though. The "cylinder index and sensor value" thing works reasonably
> well for explicit gas changes in open circuit, but even there it isn't
> perfect.
> 
> It's possible that we should make the whole pressure thing an array,
> instead of a index/value pair. Or some linked list.

Libdivecomputer supports multiple tank sensors per sample. You simply 
get multiple values, each with a different tank id. So essentially it's 
an array (or list).

But in practice, I don't think I have ever received data from a device 
that actually records multiple tank pressure (from a different sensor) 
per sample. Most devices which support multiple tank sensors have only 
one sensor active at the same time (or more precisely one sensor gets 
written to the dive log). Data from all other sensors are paused.

There may be devices out there that don't do this, but as far as I know 
I don't have such data in my archive. If anyone can provide such data 
that would be great!

Jef


More information about the subsurface mailing list