<div dir="ltr">Robert,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 24 August 2015 at 01:25, Robert C. Helling <span dir="ltr"><<a href="mailto:helling@atdotde.de" target="_blank">helling@atdotde.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Rick,<div><br><div><blockquote type="cite"><span class=""><div>On 22 Aug 2015, at 07:15, Rick Walsh <<a href="mailto:rickmwalsh@gmail.com" target="_blank">rickmwalsh@gmail.com</a>> wrote:</div><br></span><span class=""><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">To show what this actually does to the calculated profiles, I have made a new column on the Google docs spreadsheet Robert set up.<br><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">This gets the calculated profiles noticeably closer to those calculated by other software, except for the multi-level dive (20m for 10min, then drop to 60m for 30min).</div></div></span></blockquote></div><br></div><div>are you sure, you computed the data in the spread sheet with what you actually sent as a patch?</div><div><br></div><div>With you patch I just reproduce the old run times. But when I take the ceiling rather than rounding to the next stop depth (your stupindex gymnastics) I get the runtimes you reported in the table.</div><div><br></div></div></blockquote><div><br></div><div>Short answer:<br>My patch changed the 100 m / 60 min trimix dive total time to be 316 min (as reported in the Google spreadsheet).<br>Commit 41349c29ddc45e7c19fc287f10fa8f6712bcf111 (Prepare global state of VPM-B when starting to plan) changed the total dive time to 319 minutes, but for a couple of shorter dives I tested had no effect.<br>Removing the rounding gymnastics makes it slightly less conservative (but more logical) in at least some cases, but I think it's a coincidence that it also ends up with 316 minute total dive time.<br></div><div><br></div><div>Long answer:<br></div><div>Before sending my patch, I tested the effect of calculating the Boyle's law "first stop" at various places in various methods the code: before the CVA iterations rounding depth to next stop (my patch, and I agree the rounding bit makes little sense but the result appeared to be consistent with other software), before the CVA iterations without rounding, at the start of the CVA loop with the rounding (my initial guess at what would match other software but there's a good reason not to do it inside the CVA loop).  I also tested the effect of changing back the trial ascent function to use the incremental ascent like we do with Buhlmann (very minor effect as a 3m ascent only takes ~20s, depending on ascent rate).<br><br></div><div>When I read your email, I assumed I must have reported the result (at least for that run) from the wrong trial build.  That would have been an easy mistake for me to make as I had 6 instances of Subsurface open at once, each built from slightly different code.<br>But I went back to my local branch (git is great) where I prepared the patch, and sure enough that produced the 316 minute total dive time.  From there, I checked out at each commit until I found where the change occurred.  I know git bisect is the tool designed for this, and I'm sure easy to use, but I haven't worked it out yet, so I did this manually.<br></div><div><br></div><div>As usual, I need to go to work and don't have time to work out how your Prepare global state patch changed the calculation, and whether the new or old behaviour is more correct.<br></div><div><br></div><div>Cheers,<br><br></div><div>Rick<br></div></div></div></div></div>