diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2015-10-04 14:42:53 +1100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-04 13:45:32 +0100 |
commit | 26cab605182a30b15473d78adcdc8f62f3f081ab (patch) | |
tree | fa94aafb7b95b7d3876796ce993eb7a1fc895f79 /planner.c | |
parent | b26e516e2aff961a4c7d73cbfae0d202b12d11dc (diff) | |
download | subsurface-26cab605182a30b15473d78adcdc8f62f3f081ab.tar.gz |
Revert "VPM-B restore deco state before calculating next gradient"
This reverts commit 3d8e5b638ad4c1fbb43f6dd5f535bf0b33a51f0b.
Calculating the next gradient should be based on the tissue loading at the end
of the previous iteration, so it was wrong to restore the deco state first.
This has a tiny affect on the calculated profile, and makes one of the tests
fail.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1140,11 +1140,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; |