<p dir="ltr">Hi Jan,</p>
<p dir="ltr">On 17 Aug 2015 12:32 am, "Jan Darowski" <<a href="mailto:jan.darowski@gmail.com">jan.darowski@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> > I've looked at and tested your latest series of VPM-B commits.  From what I<br>
> > can see, it looks like it's doing the correct thing, except that<br>
> > first_stop_pressure is reset to zero every iteration, so it then gets set<br>
> > each stop (rather than just at the first stop) before running the Boyle's<br>
> > law compensation.  The upshot is that the Boyle's law compensation isn't<br>
> > work as intended and an overly aggressive profile is calculated.<br>
> ><br>
> > The attached patch brings the line that sets first_stop_pressure to zero<br>
> > outside the loop, so it is only run once.  Please have a look at what it<br>
> > does.<br>
> ><br>
><br>
> Have you checked that it improves the deco time?</p>
<p dir="ltr">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).</p>
<p dir="ltr">> CVA (the "do" loop) runs several simulations of the deco. For each of<br>
> these simulations, first stop can happen to be at the different depth<br>
> (to be specific: later iterations have bigger gradients, first stop<br>
> can be later in time, on lower level). What you have done here, is<br>
> assuming that each simulation has the first stop at the same level as<br>
> the first simulation. I will check it but it doesn't sound like a<br>
> correct solution for me. The problem is, the algorithm isn't precisely<br>
> specified anywhere, so the only criterion of correctness is comparing<br>
> against other implementations... And they differ. Yay!</p>
<p dir="ltr">Sounds like a lovely flustercluck...</p>
<p dir="ltr">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.</p>
<p dir="ltr">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.</p>
<p dir="ltr">Rick</p>