[PATCH] Cylinder pressure interpolation and end pressure display for CCR

Willem Ferguson willemferguson at zoology.up.ac.za
Sat Nov 8 04:34:27 PST 2014


Two patches attached to enhance CCR data processing:

(1) Subject: [PATCH] Correct the adjustment of cylinder end pressures 
for CCR

In order to effect deco calculations for CCR, value of first_cylinder in
dive.c is forced to the cylinder index of the diluent cylinder. This
causes a malfunction in the assignment of end pressures of CCR dives
(function fixup_pressures() in dive.c). This patch does two things:
1) It modifies fixup_pressures() to be compatible with calling
    parameters for processing CCR dives.
2) Function fixup_dive_dc() in dive.c is changed to provide for
    an alternative processing path in the case of CCR dives.
Because of the correct initialisation of cylinder end pressures for
CCR dives, the value displayed for the diluent cylinder end pressure
in the Equipment tab is correct.

Signed-off-by: willem ferguson <willemferguson at zoology.up.ac.za>

(2) Subject: [PATCH] Adapt cylinder pressure interpolation for CCR

This patch is necessitated by the change in code that now,
for CCR dives, causes explicit_first_cylinder() in dive.c to force
the first cylinder to be the diluent cylinder. There is now a need
to change the assignment of cylinder index values so that the three
cases:
a) Oxygen cylinder
b) Diluent cylinder
c) Open-circuit cylinder
are treated correctly in the code that interpolates the cylinder
pressures. This is achieved as follows:
1) in file.c, for Poseidon input, ensure that the cylinder index is
     hard-coded by setting sample->sensor to 0.
2) For the three cases above, ensure that function
     populate_pressure_information() in gaspressures.c assigns the
     correct cylinder indices. This is performed by using a small
     lookup-table, rather than using complex if--else constructs.
3) For the function fill_missing_tank_pressures() in gaspressures.c
     provide the appropriate cylinder index, depending on which of
     the three cases mentioned above.
The descriptive comments for these functions have heen edited.

Signed-off-by: willem ferguson <willemferguson at zoology.up.ac.za>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Correct-the-adjustment-of-cylinder-end-pressures-for.patch
Type: text/x-diff
Size: 3189 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141108/4130914f/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Adapt-cylinder-pressure-interpolation-for-CCR.patch
Type: text/x-diff
Size: 10986 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141108/4130914f/attachment-0003.patch>


More information about the subsurface mailing list