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

Robert Helling helling at atdotde.de
Mon Mar 31 04:04:48 PDT 2014


On 30.03.2014, at 23:58, Dirk Hohndel <dirk at hohndel.org> wrote:

> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Show-EAD-END-only-for-trimix-nitrox-dives-respective.patch
Type: application/octet-stream
Size: 3507 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140331/2d276c04/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Exchange-EAD-and-END-to-align-our-language-with-the-.patch
Type: application/octet-stream
Size: 2269 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140331/2d276c04/attachment-0001.obj>
-------------- next part --------------


Hi,

here are two patches. The first I kindof announced on IRC: The depth value taking into account both O2 and N2 is to rate how narced you are and only makes sense for trimix dives (as for nitrox dives it always equals the real depth). The other, just comparing ppN2 can be used when nitrox diving to figure out deco as one can computed it as an air dive when one uses this depth instead of the real depth. This makes no sense for trimix as the he contribution to deco is ignored. The first patch therefore displays these values only for trimix/nitrox dives respectively where they apply. None is shown for air dives as this is equal to the actual depth for air dives.

The second patch reverses the names for EAD and END. After a night’s sleep I came to the conclusion that only this makes sense from the words and the comment, Jan and myself were confused and apparently we managed to confuse Dirk as well. Thanks for spotting this. If you don’t agree don’t apply the second patch.

Best
Robert



-- 
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140331/2d276c04/attachment.sig>


More information about the subsurface mailing list