rebreathers on Subsurface

Dirk Hohndel dirk at hohndel.org
Tue May 20 00:29:15 PDT 2014


On Tue, May 20, 2014 at 09:09:42AM +0200, Willem Ferguson wrote:
> I have been quite busy over the last week or so looking at the existing code
> base and doing changes required in order to incorporate rebreathers. I came
> accross a few things that I had not considered at all. One important issue
> is identifying the cylinders that are being used at a particular point in
> time.

Correct. And and important factor here is "how do dive computers report
this". I think Jef commented on this a little while ago - no one appears
to have seen a dive computer that actually can report data on two
cylinders. Do you have data from CCR divers that shows how this is done?

> Currently the plot_data structure contains a variable cylinderindex,
> identifyling which cylinder is being used at a particular point in time. The
> assumption is that there is a nice temporal sequence of cylinder use,
> allowing cylinderindex to be appropriately updated every time a change in
> cylinder takes place.

That is certainly how dive computers do it - and that's also how we have
modeled things.

> When using rebreather equipment, two cylinders are used simultaneously, so
> the cylinderindex variable is rather useless for indicating which cylinders
> are being used at a point in time. So there appears to be a need for an
> approach that is more flexible, allowing a representation of multi-cylinder
> usage.
> 
> An approach may be to have primitive events such as "connect" and
> "disconnect". An event that marks a cylinder change should then actually
> insert two events, possibly separated by a second in time, a disconnect and
> a connect. This would allow for more than one cylinder to be connected at a
> particular point in time. Once one can scan the linked list of events, one
> can determine exactly when each cylinder has been used, and then calculate
> the appropriate interpolations of cylinder pressure, gas composition and
> partial pressures as the dive proceeds.

You're getting lost here.
a) while I can see that CCR divers might be interested in two cylinders at
a time, who would ever want more than that? So wouldn't it make more sense
to have a "secondary_cylinderindex" for the dilutent?
b) gas composition and partial pressures don't depend on cylinder
pressures at all - they have nothing to do with any of this. They depend
on the pO2 settings of the rebreather and the current depth.
c) whatever we do, we will NOT make the common case for 99% of the divers
more complicated / convoluted. I said this before, I'm open to adding
features for CCR divers but ONLY if they don't negatively impact OC
divers. And two events, disconnect and connect? Nope, not happening.

I'll consider tracking a secondary cylinder. If we have a clean design to
do so.

> Another point. I think the existing code provides for good agreement between
> the order of cylinders in the equipment tab (or, more precisely, in the dive
> structure) and cylinder order in the plot_info structure. However, one needs
> to think of potential situations that can destroy this agreement. I think
> this would mostly relate to the way the dc reports cylinder pressures and
> how the user manually adds cylinders after the dive.

Please explain more what you think could destroy this relationship? Right
now we have the frustrating reality that most dive computers cannot deal
with multiple cylinders using the same gas (and some don't even allow you
to enter more than one cylinder with the same gas) because they don't
report switches between cylinders but switches between gases. We adopted
that model from libdivecomputer and therefore have some flexibility
regarding the association of a pressure graph with the corresponding
cylinder, but I would actually like to modify this specifically in order
for people to have more than one cylinder with the same gas and to switch
between them (this is a common request we get from side mount divers, for
example). So whatever new design we come up with needs to keep that
direction in mind as well.

My thinking would be to have each cylinder get a (per dive) unique ID
assigned and then reference that ID in gas switches. Obviously today that
unique ID could be the sequential number in the cylinders array - if you
believe that that won't work, please explain why and how you think we
should arrange things.


/D


More information about the subsurface mailing list