From 3d8e5b638ad4c1fbb43f6dd5f535bf0b33a51f0b Mon Sep 17 00:00:00 2001 From: Rick Walsh Date: Thu, 17 Sep 2015 07:18:16 +1000 Subject: [PATCH] VPM-B restore deco state before calculating next gradient The next gradient calculation at the start of the CVA loop should be performed using the tissue loading before starting the iterations, rather than the loading at the end of the previous iteration. Signed-off-by: Rick Walsh Signed-off-by: Dirk Hohndel --- planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner.c b/planner.c index 7bd76ce78..1326f69dd 100644 --- a/planner.c +++ b/planner.c @@ -1142,11 +1142,11 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool //CVA do { is_final_plan = (prefs.deco_mode == BUEHLMANN) || (previous_deco_time - deco_time < 10); // CVA time converges + restore_deco_state(bottom_cache); if (deco_time != 10000000) vpmb_next_gradient(deco_time, diveplan->surface_pressure / 1000.0); previous_deco_time = deco_time; - restore_deco_state(bottom_cache); depth = bottom_depth; gi = bottom_gi;