On 11 Nov 2014, at 21:32, Willem Ferguson <[email protected]> wrote:
Willem,
>
> Oxygen sensor data:
> sample.sensor[0]
> sample.sensor[1]
> sample.sensor[2]
> sample.setpoint
All deco and ceiling calculations have to know at some point the ppO2 to
determine the breathing gas. If there is sensor data, great, then use the value
from that (using voting logic) otherwise the set point is the best guess
(assuming the rebreather works as designed). The current code (at least before
your patch) uses the variable sample.setpoint as this best effort value for
ppO2 (admittedly the name might not be optimal). So even, when use user had a
set point, this variable eventually gets overwritten by the sensor data.
So with your patch, that makes a distinction, the sensor data does not reach
the deco/ceiling calculations anymore. It is not sufficient to set the
variables when reading from files, you also have to make sure, that the values
reach other points in code where they are expected.
Also note that code at different places tests for CCR character of that segment
(as we said, CCR is a property of a segment, not the dive as in bail out)
against 0. This (or a replacement) has to work after you separate set point and
sensor data.
There are several ways I see possible to achieve this (all involve Qt Creator
functions):
1) You refactor/rename the old sample.setpoint back to sample.ppo2 and make
sure it gets initialised properly from sensor data (as done in
fill_o2_values()) and lacking that set point information. (simpler I guess)
2) You go through the list of “Find usages” of sample.setpoint and update the
code there accordingly.
This patch as it is breaks stuff.
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
print "Just another Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
stupid .sig\n"; http://www.atdotde.de
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
