deco code rewrite

Dirk Hohndel dirk at hohndel.org
Thu Dec 6 07:15:12 PST 2012


On Dec 6, 2012, at 4:59 AM, Jef Driesen wrote:

> On 2012-12-05 23:47, Dirk Hohndel wrote:
>> Fundamentally we are of course missing CC support (as that was a
>> rebreather dive, correct?). That is something that you and I should
>> discuss in more detail to understand how we should add this to
>> Subsurface.
> 
> Keep me CC'ed on that discussion!

I think I'll do that here on the list so everyone gets to see it…

From my discussions with Jan so far I think the first thing that we will need is the setpoints from the dive computer. This is basically the setting that tells the us what the "constant pO2" is that the diver is diving with. Depending on the model of dive computer there are either a number of pre-defined setpoints (that's what the OSTC does) or they can be changed in increments during the dive (Shearwater).

If we get those and the gas mix of the dilutant we can do correct partial pressure graphs (and can do deco calculations, once that code has been added).

So maybe this is something we could still add for libdivecomputer 0.3? I think the easiest way to extend the current libdivecomputer design to deal with this is to model these as events:

if the diver is in CC mode (or enters CC mode), then send a DC_EVENT_SETPOINT on the first sample that gives us the current setpoint.
if the dive computer reports a change in setpoint, then send another DC_EVENT_SETPOINT event.
value should simply be the pO2 (since the current design uses floating point we can simply use a double with the correct value)

Does that work?

Jan, is there something else we need to add right now?

/D




More information about the subsurface mailing list