<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 23 August 2015 at 18:52, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<span class=""><div><br><div><blockquote type="cite"><div>On 23 Aug 2015, at 00:25, Rick Walsh <<a href="mailto:rickmwalsh@gmail.com" target="_blank">rickmwalsh@gmail.com</a>> wrote:</div><br><div><p dir="ltr" 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">Note that to my knowledge this only occurs calculating the ceiling for profile.c, not when calculating the plan.  Yes, I'm repeating myself but that could save hours of debugging.</p><br></div></blockquote></div><br></div></span><div>here is another attempt. This at least computes the correct roots and avoids the division by zero thanks to some algebraic simplifications.</div></div></blockquote><div><br></div><div>Very nice formulae there.  It's been a while since I was a student, which was the last time I had to solve "difficult" equations.  I had a feeling trigonometry was useful somehow in avoiding needing complex numbers, but couldn't remember how.<br><br></div>I played around with this a bit, and not surprisingly, I haven't managed to produce any errors.<br><br></div><div class="gmail_quote">Could we use this method again in calc_inner_pressure?  If I weren't about to go to bed, I'd see if I could simplify that function similarly.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">For some reason that wasn't obvious, I couldn't apply your patch directly to the master, but the changes were trivial to make by hand.<br></div><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div><div><br></div><div>Patch 2 I sent remains valid.</div><div><br></div><div>This definitely deals with the symptoms. But there might still be a problem with the profile ceiling calculations as when calculating the 60min@100m dive there is a ceiling violation shown. This needs some further care. Will do this later.</div></div></blockquote><div><br></div><div>Yes, there are very small ceiling violations in some cases I've tried.  If you can't devise a precise method to calculate a gradient that agrees exactly with the planned dive, we could relax the definition of a ceiling violation to excuse small (e.g. 0.3 m) violations.<br><br></div><div>Cheers,<br><br></div><div>Rick<br></div></div><br></div></div>