<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 05/11/2014 20:55, Robert C. Helling
wrote:<br>
</div>
<blockquote
cite="mid:709B10A7-A65F-47B7-A2B6-6663EB505005@atdotde.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<br>
<div>
<div>On 05 Nov 2014, at 17:37, 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:
CourierNewPSMT; font-size: 13px; 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; background-color: rgb(255,
255, 255); float: none; display: inline !important;">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.</span><br
style="font-family: CourierNewPSMT; font-size: 13px;
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;">
<span style="font-family: CourierNewPSMT; font-size: 13px;
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;
background-color: rgb(255, 255, 255); float: none; display:
inline !important;">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.</span><br
style="font-family: CourierNewPSMT; font-size: 13px;
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;">
</blockquote>
</div>
<div><br>
</div>
my suspicion is that something fishy is going on in gas
pressures.c in
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment-->populate_pressure_information<!--EndFragment--></pre>
<div>and the functions called from there. Right now, I am not able
to follow the logic with diluent handling there but maybe, since
you wrote that, you can more easily debug this (figure out when
the different gases are actually used) than me.</div>
<div><br>
</div>
<div>BTW, I think the prototypes should be in header files and not
in profile.c</div>
<div><br>
</div>
<div>Best</div>
<div>Robert</div>
</blockquote>
Thanks for the comment, Robert. There is a debug function in
profile.c called debug_print_profiledata() that prints out the final
results of everything to do with cylinder pressures (and o2 partial
pressures) and the output produced there is correct. The start and
end pressures of the cylinders are accurate, as they should be. By
this I am not saying that the error is not there, but the problem is
not systemic. I am continuing to check there....<br>
Kind regards,<br>
willem<br>
<br>
</body>
</html>