mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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>
This commit is contained in:
parent
f2b883865c
commit
159c9eb2c1
1 changed files with 6 additions and 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;
|
||||
|
|
Loading…
Reference in a new issue