[PATCH] CCR Import from CSV: Calculate correct nitrogen and helium gas pressures (VERSION 2)

Willem Ferguson willemferguson at zoology.up.ac.za
Mon Nov 3 06:52:36 PST 2014


Calculate correct nitrogen and helium gas pressures for CCR after
import from CSV (Version 2)

Currently the gas pressures stored in structures of pressure are
calculated using the gasmix composition of the currently selected
cylinder. But with CCR dives the default cylinder is the oxygen
cylinder (here, index 0). However, the gas pressures need to
be calculated using gasmix data from cylinder 1 (the diluent
cylinder). This patch allows setting the appropriate cylinder
for calculating the values in the structures of pressure. It
also allows for correctly calculating gas pressures for any
open circuit cylinders (e.g. bailout) that a CCR diver may
use. This is performed as follows:

1) Add two integer variables to the structure definition of dive:
    oxygen_cylinder_index
    diluent_cylinder_index

2) Specifically for imports of Poseidon dives, define these two variables
    within the structure of dive as:
    oxygen_cylinder_index=0
    diluent_cylinder_index=1

3) Where gas partial pressures are calculated, use the integer
    dive->diluent_cylinder_pressure to find the diluent gasmix.

This creates a reasonably flexible, non-hard-coded solution.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Calculate-correct-nitrogen-and-helium-gas-pressures-.patch
Type: text/x-diff
Size: 3271 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141103/722eccdc/attachment.patch>


More information about the subsurface mailing list