rebreathers on Subsurface

Willem Ferguson willemferguson at zoology.up.ac.za
Tue May 20 00:09:42 PDT 2014


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.

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.

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.

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.

Is there a more simple way to achieve this?

Kind regards,
willemf







More information about the subsurface mailing list