diff options
author | Jan Darowski <jan.darowski@gmail.com> | 2015-07-03 23:24:20 +0200 |
---|---|---|
committer | Jan Darowski <jan.darowski@gmail.com> | 2015-07-03 23:24:20 +0200 |
commit | e7aa686f1658e689d215397d4493859829965646 (patch) | |
tree | 61e23882a641700d9eefdc9a9a6c149d82eb2be0 /planner.c | |
parent | fad592e43a26343fdef9cd3e0703be10d9069b20 (diff) | |
download | subsurface-e7aa686f1658e689d215397d4493859829965646.tar.gz |
VPM-B: add vpm-b based deco checking.
Check during the trial_ascent() if existing pressure gradient is
smaller than previously calculated max gradient. If not, ascent
is impossible from the vpm-b's point of view.
Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -836,11 +836,15 @@ bool trial_ascent(int trial_depth, int stoplevel, int avg_depth, int bottom_time tissue_tolerance = add_segment(depth_to_mbar(trial_depth, &displayed_dive) / 1000.0, gasmix, TIMESTEP, po2, &displayed_dive, prefs.decosac); - if (deco_allowed_depth(tissue_tolerance, surface_pressure, &displayed_dive, 1) > trial_depth - deltad) { + if (prefs.deco_mode != VPMB && deco_allowed_depth(tissue_tolerance, surface_pressure, &displayed_dive, 1) > trial_depth - deltad) { /* We should have stopped */ clear_to_ascend = false; break; } + if (prefs.deco_mode == VPMB && (!is_vpmb_ok(depth_to_mbar(trial_depth, &displayed_dive) / 1000.0))){ + clear_to_ascend = false; + break; + } trial_depth -= deltad; } restore_deco_state(trial_cache); |