mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
5d1bc11ab7
commit
c8eb2dccc5
4 changed files with 136 additions and 129 deletions
2
deco.c
2
deco.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue