Graph documentation [was: Re: Meaning of GF settings]

Dirk Hohndel dirk at
Thu Jan 10 07:25:13 PST 2013


thank you so much for the detailed, competent, in-depth explanation
of the science and math involved here. I am amazed to realize that
Subsurface has its own Chief Scientist to help us get things right!

Your patch does two things:
a) it changes the minimum depth taken into account (gf_low_position_min) to 10m
b) it adds the compile time choice of using either of the two interpretations where GFlow should be applied

Is a) a change we really want to make? Looking at the math (and my 
Mathe Diplom was 20 years ago) it seems that this would have a 
negative impact on the deco times for typical shallow dives (i.e., we 
might end up showing a deco obligations on dives that most 
divecomputers wouldn't) - while this is clearly mostly targeted at
deeper divers, I don't want to end up in a situation where we suddenly
seem overly conservative for a 60 minute dive to 12m (because as
we have already seen here on this mailing list, it's possible to make
recreational divers unnecessarily nervous by doing so)

And as for b), would it make sense to make this a UI controlled runtime
setting, or are the variations truly so small that it doesn't matter (I haven't
played with this for my dives, so I can't tell, yet). My gut feeling would be
that for a short, very deep dive switching GFlow to apply to the first ceiling
might once again make deco quite a bit longer.

More comments below

On Jan 10, 2013, at 2:24 AM, Robert C. Helling wrote:
> Let me add a final remark: Deco is an art, not a science. Any algorithm will only give you a rough guide how to run your decompression and hopefully be safe most of the time while not wasting too much time with unneccessary stops. But it is always a very rough approximation of very complex physiological processes in your body that even in principle cannot be perfectly simulated since we do not now the initial conditions of many if the relevant variables (like the exact composition of your blood and the shape of your blood vesses etc).

Completely agree. And I have no interest in trying to match any divecomputer 
completely. This is not a hard science and every year people get bent that
follow their computers. Even those who follow their Suunto :-)

> Thus I would not worry at all if two different models (or implementations) vary in their prediction for your stops by one or even two meters. That said, I find the precision at which the smooth ceiling matches your actual profile and what your dive computer says very very impressive (say from a depth of 50m). I expected much worse. Acutally, I would call that spot on, in particular given that your actual depth during deco stages also has fluctuations of the size of at least one meter. Which, as was mentioned in an earlier email is also the order of magnitude of surface pressure variations due to weather. And those you also do not take into account.

Well - the actual depth fluctuations should be taken into account by both 
his divecomputer and Subsurface - but the sampling rate that his 
divecomputer uses for its deco calculations may be shorter than the one 
it uses when storing samples, and that alone could cause this to be off 
(since people want divecomputers to correctly reflect their max depth 
on a dive they may record the max depth during a sampling interval
while using the correct depth at multiple points during that interval for their
internal deco algorithm - that could easily explain why Subsurface tends
to show slightly longer deco requirements on Jan's rather extreme dives.
But on the other hand for 99.99% of our users this won't make any 
But this leads me straight to the next point.

> The mouse over value ("1m") is actually rounded to integer multiples of meters. If you want more precise values, find the word "Calculated" in profile.c and in the snprintf replace depthvalue by entry->ceiling. Then the ceiling is reported in mm and you will see that at the end of your dive it is even less than a meter I would expect (just don't commit that change).

The reason I decided to give the ceiling in multiples of meters (and sadly of 
ft for imperial users, but I am considering switching this to multiples of 5 ft)
is that you otherwise end up in a 'fake precision' situation. There is no such
thing as 10cm precision of knowing where exactly you risk getting bent. As
discussed earlier, the science isn't that precise, the diving isn't that precise
(your body covers vertical space - even if you are perfectly flat in the water,
and we don't know if the computer shows the deepest, shallowest or 
somewhere in the middle for that; add waves to that and overall movement
of the water body and you'll see that such precision is ridiculous).

So yes, I added the code to plot the smooth ceiling (and I'm glad I did as
it made the bugs in my implementation so much more obvious), but don't
interpret this as a precision that it isn't.

Finally, hey, Robert… would you like to help us implement an alternative
deco algorithm as well? I think there are quite a few people who would be
interested in comparing the profiles between Buehlmann with GF and say
VPM (which I think is the only bubble algorithm that is sufficiently 
documented that we could try an implementation, anyway).

Just wondering if that's a challenge you'd be interested in…

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4130 bytes
Desc: not available
URL: <>

More information about the subsurface mailing list