diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-08-18 09:07:50 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-18 06:40:45 -0700 |
commit | 159c9eb2c1c19dfbf650f2b0cc28e0ef1f45c964 (patch) | |
tree | ac8643c9a19a5abf4ed7224c82d436c9ac48ef76 /planner.c | |
parent | f2b883865c78b2f9c28a93d50de97077b6b6d51c (diff) | |
download | subsurface-159c9eb2c1c19dfbf650f2b0cc28e0ef1f45c964.tar.gz |
Compare ceiling to next stop rather than try to ascent for VPM-B
For VPM-B, to stay within the reference implementation, to decide if we
need to stop we check if the current ceiling is above the next stop depth
rather than trying to ascent and check if we violate a ceiling. This
leads to more conservative profiles.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -879,6 +879,12 @@ bool trial_ascent(int trial_depth, int stoplevel, int avg_depth, int bottom_time bool clear_to_ascend = true; char *trial_cache = NULL; + // For VPM-B it is not relevant if we would violate a ceiling during ascent to the next stop but + // if the next stop is below the ceiling at the start of the ascent (thus the offgasing during + // the ascent is ignored. + if (prefs.deco_mode == VPMB) + return (deco_allowed_depth(tissue_tolerance, surface_pressure, &displayed_dive, 1) <= stoplevel); + cache_deco_state(tissue_tolerance, &trial_cache); while (trial_depth > stoplevel) { int deltad = ascent_velocity(trial_depth, avg_depth, bottom_time) * TIMESTEP; |