[PULL REQUEST] VPM-B

Rick Walsh rickmwalsh at gmail.com
Sun Aug 16 15:12:48 PDT 2015


Hi Jan,

On 17 Aug 2015 12:32 am, "Jan Darowski" <jan.darowski at gmail.com> wrote:
>
> Hi,
>
> > I've looked at and tested your latest series of VPM-B commits.  From
what I
> > can see, it looks like it's doing the correct thing, except that
> > first_stop_pressure is reset to zero every iteration, so it then gets
set
> > each stop (rather than just at the first stop) before running the
Boyle's
> > law compensation.  The upshot is that the Boyle's law compensation isn't
> > work as intended and an overly aggressive profile is calculated.
> >
> > The attached patch brings the line that sets first_stop_pressure to zero
> > outside the loop, so it is only run once.  Please have a look at what it
> > does.
> >
>
> Have you checked that it improves the deco time?

Yes, I was comparing against plans generated by the VPM-B Fortran program
(I built it).  I'm on my phone now, but from memory, the total dive time
for a 45m dive was something like 63min (Fortran), compared to 53min
(before my patch) and 61min (after).

> CVA (the "do" loop) runs several simulations of the deco. For each of
> these simulations, first stop can happen to be at the different depth
> (to be specific: later iterations have bigger gradients, first stop
> can be later in time, on lower level). What you have done here, is
> assuming that each simulation has the first stop at the same level as
> the first simulation. I will check it but it doesn't sound like a
> correct solution for me. The problem is, the algorithm isn't precisely
> specified anywhere, so the only criterion of correctness is comparing
> against other implementations... And they differ. Yay!

Sounds like a lovely flustercluck...

I think that currently first_stop is being calculated for each stop (so
isn't actually first_stop) rather than just the first.  That's what it
looked like from my limited running under gdb with a break every time
first_stop is calculated, and printing the depth variable.

To calculate the first stop for every cva iteration we need to be more
clever than what my patch does, but I'm not sure you'll get a very
different resulting plan. From my understanding, cva is significant for
short deco / no deco dives, whereas Boyle's law compensation is significant
for long deco dives.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150817/5e7ef941/attachment.html>


More information about the subsurface mailing list