[PATCH 1/2] Calculate VPM-B ceiling outside of planner

Rick Walsh rickmwalsh at gmail.com
Sun Oct 25 02:44:56 PDT 2015


Thanks for your review and comments Robert,

On 25 October 2015 at 18:31, Robert C. Helling <helling at atdotde.de> wrote:

> Hi Rick,
>
> > On 25 Oct 2015, at 02:07, Rick Walsh <rickmwalsh at gmail.com> wrote:
> >
> > Doing VPM-B calculations for dives outside of the planner has not been
> > possible because real dive data does not record either:
> >       - reference pressure for the Boyle's law compensation (i.e.
> > first_stop_pressure), or
> >       - deco_time for the vpmb_next_gradient function used to do the CVA
> > calculations
> >
>
> This is definitely a step in the right direction. We should be able to use
> VPM also to say something meaningful for existing dives.
>
> We should be able to say something meaningful, but as I think we have both
discovered, working out what is meaningful when it comes to VPM-B is far
more difficult than it at first appears, especially how to handle the CVA
for a real dive.


> > However, we can infer these values to be:
> >       - first_stop_pressure is the deepest ceiling in the dive
> >       - deco_time is dive time remaining
>
> It is just that I need some more convincing that this is the right thing
> to do. I agree that it gives the correct ceiling for planned dives.
>
> You know, the current ceiling im VPM is a somewhat ill defined concept: It
> depends on the allowed tension but that is determined in the CVA (which
> makes no sense for an existing dive). Forget Boyle compensation for a
> moment, then the CVA determines the tension by integrating the tension over
> the decompression time (and adding a surface bit), calling this the volume
> of free (i.e. in bubbles) gas and comparing this to a critical value.
>
> The integration there does not look like one, since the VPM profiles, the
> tension is a constant during deco (ignoring Boyle), so it’s simply tension
> times deco time.
>
> My concern with taking the deco time of the real dive is that it goes in
> the wrong direction: Imagine starting with a dive that follows exactly a
> VPM-B planned profile. Then, as you write, with your code, you get the
> allowed tension and hence the ceiling as in the planner. But now imagine,
> the diver cuts the deco short. Then your code sees a shorter deco time and
> for the product tension * deco time to stay under a critical limit, the
> tension can actually increase which in turn means the ceiling during the
> dive goes up (towards the surface). This to me sounds counter intuitive.
>

You are definitely correct that cutting short a VPM-B planned profile
changes the ceiling at that point.  See the attached example profiles,
planned with VPM-B +2.  The second is a copy of the first, but cut short by
editing the XML file to skip the 6 m and 3 m stops (I hope my imaginary
friend has a recompression chamber nearby).

The question is whether we do the CVA calculation based on the dive the
diver did, or the ascent profile they would have followed according to a
VPM-B plan.

What I have done is a compromise assuming that a reasonable profile was
dived in the first place.  The ceiling is shown as broken if a VPM-B
profile is cut short (see attached), and adding time to the deco stops
shows that the ceiling clears before the final ascent to the surface.

Even with the case of brushing off deco, while the drawn ceiling is shown
as shallower, it isn't crazy, and the ceiling isn't actually theoretically
"broken" until the CVA free gas volume exceeds it's limit, and that
theoretical limit wouldn't be exceeded were our imaginary and brave diver
to follow the ceiling as drawn, up until the point that they break the
drawn ceiling.

To be honest, the usefulness of this is limited for a dive that has
happened.  Basically, it draws a pretty ceiling.  If you have a dive
computer, it will tell you what you what your ceiling is/was.  If you
followed a VPM-B plan, this would show the planned ceiling.  If you meant
to dive a VPM-B plan but didn't follow it, this would show the ceiling as
broken.  It could also be useful for a diver (let's call him Davide) using
ratio deco and with a bottom timer, and wanting to know how it compares to
VPM-B.  From my limited understanding of ratio deco, it is based on
observations of VPM-B profiles, assuming a standard set of gasses.

Also, in the above calculation, only the deco time is supposed to be
> counted. That is is the time in which the there is off-gassing. During the
> dive, when there is on-gassing still going on, taking the remaining dive
> time is certainly wrong.
>

Yes and no.  It definitely doesn't do the CVA considering a planned ascent
from that point.  But in the profile displayed in the planner we do not
account for CVA based on calling the dive early either. In my limited
testing it appears to have negligible effect compared to the ceiling
displayed in the planner.


> I would think, that traditional ceilings as for Buehlmann just don’t make
> sense for VPM.
>

Yes.  We need to make some assumptions about what the CVA means for a real
dive.

>
> There is still something one could call  a ceiling: You know that when
> planning, you can get a red profile when you add a point above the ceiling,
> i.e. when VPM would compute a first stop deeper than where you currently
> are. In that case, you would say you violated a ceiling. So for a real
> dive, you could define a  ceiling at time t as: Take the dive up to that
> point, but then ascent with the ascent velocity to depth d and then let the
> VPMB planner plan the deco from that point. Find the minimal d for which
> that planned deco would not turn the profile red. If you know what I mean.
>
> This is the obvious alternative to what I have done, and I assume dive
computers using VPM-B would do something like this (or attempt to mimic
with some simplified algorithm).  I think the easiest way to achieve this
would be to modify the function calculate_ndl_tts to assume gas changes at
ppO2 = 1.6.  Then we could take deco time as entry->tts_calc.

I think this is a worthwhile approach but see two main issues:
(1) It is computationally expensive for long and deep dives.  At the
moment, we calculate TTS (if enabled) every 30 seconds.  We could partially
address this by calculating TTS every 0.04 * (previous TTS), or something
like that.  I think considering deco gasses will actually make it less
computationally expensive (but harder to code).
(2) It also raises the question of what gasses do we use.  Every one in the
cylinder list?  My Petrel and libdc have an annoying habit of reporting all
gasses programmed into the dive computer, even those that are disabled.  A
better option is to use the gasses that have been used in the entered gas
switches.

One could also try something completely different: After all, VPMB really
> judges a dive based on the free gas volume (computed as the integral as
> above, for real dives the integral is more complicated than a product): Is
> it above or below the critical value. But this is of course a single number
> for a dive and not one per instant of time (like a ceiling). But maybe,
> with some further thought, that could also be turned into something
> plowable (like for example the current bubble volume producing rate).
>
> I like this concept.  I'm not sure how to turn it into something
meaningful (other than the single statistic of "was the free gas volume
more or less than permitted"), but it's worth discussing.


> But right now, some younger members of my family want me to prepare
> breakfast for them. Will write some more later.
>
> TL;DR: I don’t think this patch produces something that is meaningful for
> real dives. I like the code but need more convincing about the philosophy.
>

> Best
> Robert
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151025/b5bd6b59/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vpmb ceiling.pdf
Type: application/pdf
Size: 300265 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20151025/b5bd6b59/attachment-0001.pdf>


More information about the subsurface mailing list