mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Pref. to ascent to next stop only when stop is below ceiling
Usually, we try to ascent to the next stop and check if we break the ceiling while doing that. This patch adds a preference value to rather check if the ceiling is above the next stop before attempting to ascent. The difference if off-gasing during the ascent is taken into account. Logically, it does not sound like it could be relevant to ignore that off-gasing but it leads to more conservative schedules and it seems the original Fortran VPM-B implementation does just this. So one could argue it is part of that model (if it makes sense or not), so we should at least give users the possibility to turn this on. Maybe we should even make this the default for VPM-B. This patch just addes the code to have the value in the preferences and the planner to act accordingly. There is no UI for it, yet. To test, you have to set it in the code. There could be a later patch with a UI if people like to have it. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
930e83dfc4
commit
a6ed36fb73
3 changed files with 7 additions and 0 deletions
|
@ -879,6 +879,11 @@ bool trial_ascent(int trial_depth, int stoplevel, int avg_depth, int bottom_time
|
|||
bool clear_to_ascend = true;
|
||||
char *trial_cache = NULL;
|
||||
|
||||
// Don't do a trail ascent but check if the ceiling is above the next stoplevel.
|
||||
// This does not sound like a relevant question but it seems the original VPM-B implementation does that.
|
||||
if (prefs.check_ceiling_before_ascent)
|
||||
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;
|
||||
|
|
1
pref.h
1
pref.h
|
@ -97,6 +97,7 @@ struct preferences {
|
|||
bool display_transitions;
|
||||
bool safetystop;
|
||||
bool switch_at_req_stop;
|
||||
bool check_ceiling_before_ascent;
|
||||
int reserve_gas;
|
||||
int min_switch_duration; // seconds
|
||||
int bottomsac;
|
||||
|
|
|
@ -48,6 +48,7 @@ struct preferences default_prefs = {
|
|||
.doo2breaks = false,
|
||||
.drop_stone_mode = false,
|
||||
.switch_at_req_stop = false,
|
||||
.check_ceiling_before_ascent = false,
|
||||
.min_switch_duration = 60,
|
||||
.last_stop = false,
|
||||
.verbatim_plan = false,
|
||||
|
|
Loading…
Reference in a new issue