On 23 August 2015 at 18:52, Robert C. Helling <[email protected]> wrote:
> Hi, > > On 23 Aug 2015, at 00:25, Rick Walsh <[email protected]> wrote: > > 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. > > > here is another attempt. This at least computes the correct roots and > avoids the division by zero thanks to some algebraic simplifications. > 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. I played around with this a bit, and not surprisingly, I haven't managed to produce any errors. 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. 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. > > > Patch 2 I sent remains valid. > > 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. > 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. Cheers, Rick
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
