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

Dirk Hohndel dirk at hohndel.org
Sun Jan 13 09:13:43 PST 2013


Jan Schubert <Jan.Schubert at GMX.li> writes:

> On 01/11/13 15:25, Dirk Hohndel wrote:
>>
>> Here is an interesting piece of code from the dive computer
>> implementation of Buehlmann's algorithm:
>>
>> #define  DIST_FROM_3_MTR         0.28
>>
>> if (mydata.pressure > mydata.surface)
>> {
>>        pressure = 3 * (unsigned int)((mydata.pressure - mydata.surface + DIST_FROM_3_MTR) / 0.3);
>>        mydata.pressure = ((float)pressure)/10 + mydata.surface;
>> }
>>
>> This clearly chops off the last bit of 'tail' in the shallow part. It's
>> not a lot (0.02 bar - about 20cm), but my guess is this helps to shorten
>> especially the last stop.
>
> Dirk, this is code from the DR5!? I can not find anything similar in the
> OSTC code so far. Personally I'm not a big friend of mixing different
> approaches as this might be specific to the calculation from the DR5
> (I've no idea what they do in other parts of the code to justfy such
> things).

Jan. The code that we used to have in deco.c ALL came from the DR5. It
has since been rewritten, of course, but we always started out with the
DR5 code.

But I repeat. Our goal is NOT to mimik or copy one specific dive
computer. It's to implement something that makes sense from an
algorithmic point of view and creates results that people perceive as
useful.

You keep complaining that our code keeps you in the water longer. I show
you how the dive computer in questions works around that. You complain
that I am 'mixing different approaches'. I am not, I am doing exactly
what every dive computer vendor does. You start with an implementation
of the algorithm of choice, then you add fudge factors here and there
until you get profiles that divers will be willing to accept. That's the
whole point of gradient factors. Divers want deeper first stops. So
let's add something that kinda gets us there. Divers don't want 20
minutes at 3m. But since the slower tissues take FOREVER to really go
back to surface pressure, let's let them surface with .02 bar of over
pressure.

Why is this not killing people or bending them? Because the formulas are
pretty coarse over simplistic approximations of what may or may not be
happening in our bodies. And the constants are chosen to give you
massive margins.

> But, as we plan to add other deco calculations as well, why not have the
> abibility to also switch between different implementions for Bühlmann!?
> We have now the version done by Robert, why not have an additional
> version similar to the one from the DR5 and even more ones based on
> other implementations like the OSTC!?
>
> That said, playing around with this I'm not able to get much closer to
> the results calculated by the Predator. Robert, this statement also
> refers to your proposed patch  (which has not made ot to git yet!?).

That is almost certainly because your Predator uses other, likely more
aggressive fudges to get you out of the water quicker.

I'll admit that I am beginning to regret having gone down this path and
having spent a few weeks of my time on implementing this. The target
audience is very small and it's becoming obvious that "if it doesn't
look like what I already have then I don't like it" is going to be a big
problem.

/D


More information about the subsurface mailing list