[PATCH 2/2] Add initial rudimentary no-fly time calculation

Dirk Hohndel dirk at hohndel.org
Fri Feb 8 11:59:20 PST 2013


"Robert C. Helling" <helling at lmu.de> writes:
>
> [swearword]. I couldn't leave it alone and spend my whole afternoon on it. 

Trust me, I know this feeling so much better than you can imagine in
your wildest dreams.

> I did some analytical calculations to find expressions for maximal tissue 
> loadings at flying pressure, computed the derivative w.r.t. gf_low, 
> convinced myself that it is negative...wrote some debugging code (see 
> attachment, but don't use, it produces tons of printout).
>
> Then I found the problem: tissue_tolerance_calc() assumes to find the 
> surface pressure as
>
> double surface = dive->dc.surface_pressure.mbar / 1000.0;
>
> Except that seems not to be set, at least it always reads a 0.0. Where 
> should that be set? Shall we always set it to 1013mbar or do we do 
> something better?

It should be set for every divecomputer to either the value that the
computer reported or to 1013. That apparently fails for some reason, so
the easiest way is to replace it right there with

double surface - dive->dc.surface_pressure.mbar ? dive->dc.surface_pressure.mbar / 1000.0 : 1.013;

/D


More information about the subsurface mailing list