<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 05/11/2014 16:01, Robert Helling
wrote:<br>
</div>
<blockquote
cite="mid:53361F22-FA6C-40F2-BFB3-0CD27D6292F3@atdotde.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<br>
<div>
<div>On 05.11.2014, at 08:02, Willem Ferguson <<a
moz-do-not-send="true"
href="mailto:willemferguson@zoology.up.ac.za">willemferguson@zoology.up.ac.za</a>>
wrote:</div>
<div><br>
</div>
Willem,</div>
<div><br class="Apple-interchange-newline">
<blockquote type="cite"><span style="font-family: Menlo-Regular;
font-size: 11px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; float:
none; display: inline !important;">Would you be prepared to
look at the sample dive log in the dives directory? There
are two versions of the same dive, one in CSV, another in
XML. When importing the CSV version, NO nitrogen loading is
shown, however when loading the XML version, nitrogen
loading is indeed shown. Are you in a position at all to say
what causes this?</span></blockquote>
</div>
<div><br>
</div>
Some debugging shows the ceiling calculation was thinking you were
diving pure O2 though out the dive as that is what is contained in
cylinder 0 which is the default starting cylinder. Here is a patch
that makes the diluent cylinder the default starting cylinder
instead.
<div><br>
</div>
<div>Best</div>
<div>Robert</div>
<div><br>
</div>
</blockquote>
Robert, thank you. This really helps. I love it that you use the
code that makes use of enums!<br>
<br>
1) This patch has an unintended consequence: The ending cylinder
pressure for the diluent cylinder (as seen on the equipment tab) is
changed to reflect that of the ending pressure of the oxygen
cylinder. The diluent cylinder index for the Poseidon diluent is the
dreaded and infamous 1. We hardcode the cylinder IDs here while
reading in the dive log because it is very specific to the Poseidon.
In addition, even though these specific two cylinders have already
been assigned to enum values of oxygen and diluent respectively, we
are in the process of setting up the cylinders, so we cannot already
use the functions that use these enum values.<br>
So: dive->cylinder[1].sample_end.mbar for this sample dive has a
value of 141, that of the oxygen cylinder. The correct ending value
for this variable is 137. I have carefully looked around the code
around line 600 in file.c but cannot see the cause of this problem.
Run the code with and without your patch and see the difference.<br>
<br>
2) A question just to improve my understanding of the code. If the
explicit_first_cylinder() result is diluent, does this mean that the
deco requirements are calculated for the gas in the diluent
cylinder? In this case the diluent is air, but the displayed
ceilings do not (at first sight) appear to be shallower than that
for air dives to the quivalent depths. For instance, if I simulate
the sample dive as an air dive using the planner, the dive extended
to 70 min for sufficient deco. So if the ceilings reflect the pn2
values at the various depths as actually calculated at each point on
the profile, why does it matter whether one starts with cylinder 0
or cylinder 1?<br>
<br>
Thank you so much for your time.<br>
Willem<br>
</body>
</html>