diff options
author | willem ferguson <willemferguson@zoology.up.ac.za> | 2014-10-13 21:19:21 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-13 23:15:41 +0200 |
commit | c8eb2dccc5acbd11388373bf70edb2f4e73d2323 (patch) | |
tree | f978624e58c084a9db092603ed26c828c0124248 /deco.c | |
parent | 5d1bc11ab75eee9f2f79d2cd40132ec1885ee1a6 (diff) | |
download | subsurface-c8eb2dccc5acbd11388373bf70edb2f4e73d2323.tar.gz |
CCR patch: Reorganise the oxygen partial pressure calculations
This patch responds to the side effects that the CCR code has had with
respect to ceilings in OC dives and dive plans. Dive ceilings are now
calculated correctly again.
The following were performed:
1) remove the oxygen sensor and setpoint fields from the gas_pressures
structure.
2) Re-insert setpoint and oxygen sensor fields in the plot_data structure.
3) Remove the algorithm that reads the o2 sensor data and calculates the
pressures.po2 value from function fill_pressures() in dive.c and save
it as a separate function calc_ccr_po2() in profile.c.
4) Activate calc_ccr_po2 from function fill_pressures() in profile.c.
5) Move the relative position of the call to fill_pressures() within the
function create_polt_info_new() in profile.c.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r-- | deco.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -190,7 +190,7 @@ double add_segment(double pressure, const struct gasmix *gasmix, int period_in_s int fo2 = get_o2(gasmix), fhe = get_he(gasmix); struct gas_pressures pressures; - fill_pressures(&pressures, pressure, gasmix, (double) ccpo2 / 1000.0, &(dive->dc)); + fill_pressures(&pressures, pressure, gasmix, (double) ccpo2 / 1000.0); if (buehlmann_config.gf_low_at_maxdepth && pressure > gf_low_pressure_this_dive) gf_low_pressure_this_dive = pressure; |