[PATCH] Don't calculate with NaN when on 100% o2

Dirk Hohndel dirk at hohndel.org
Sun Mar 30 14:58:39 PDT 2014


On Sun, 2014-03-30 at 23:52 +0200, Robert C. Helling wrote:
> On 30 Mar 2014, at 23:07, Dirk Hohndel <dirk at hohndel.org> wrote:
> > 
> > Tried to talk to you on IRC, but let's repeat here:
> > 
> > +		entry->ead = (entry->depth + 10000) * (1000 - fhe) / 1000.0 - 10000;
> > +		entry->end = (entry->depth + 10000) * (1000 - fo2 - fhe) / (double)N2_IN_AIR - 10000;
> > 
> > That first one is the definition of END, the second one the definition
> > of EAD. What am I missing?
> > 
> > /D
> 
> Dirk,
> 
> now I am confused. I have to admit, I had not heard about the distinction of the two before (I had only used the “the depth that has the the same partial pressure of N2 when using air” whatever that is called).
> 
> Do you agree with the two comments before those lines (that I did not touch):
> 
>  		 * EAD takes O2 + N2 (air) into account
>  		 * END just uses N2 */
> 
> 
> Those are in agreement with
> http://lists.hohndel.org/pipermail/subsurface/2013-January/002411.html

It's fitting to quote Jan on the anniversary of his final dive (well,
yesterday)...

> Maybe it is too late at night for me but it still seems to me that
> 
> +		entry->ead = (entry->depth + 10000) * (1000 - fhe) / 1000.0 - 10000;
> +		entry->end = (entry->depth + 10000) * (1000 - fo2 - fhe) / (double)N2_IN_AIR - 10000;
> 
> exactliy represents that.

So yes, apparently we went with the more logical and slightly less
standard definition of EAD and END. So your patch is correct and I was
confused.

/D



More information about the subsurface mailing list