diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2017-10-29 17:48:30 +1100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2017-10-30 21:48:15 +0100 |
commit | 68c2b10161fb8bfb7572a058586b33f652aea47c (patch) | |
tree | fa5a866df7f33425aeee657f1d4352832c64f8c3 /core | |
parent | f2535995f0dcf2c6541525fcb09f86f138a2c186 (diff) | |
download | subsurface-68c2b10161fb8bfb7572a058586b33f652aea47c.tar.gz |
VPM-B ceiling: calculate deco_time similar to planned VPM-B dives
When planning a VPM-B dive, the "deco time" ends at surfacing, which is after
ascending after a full-minute deco stop is complete, after ceiling clears. We
should take this into account when calculating the ceiling outside of the
planner.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/profile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/profile.c b/core/profile.c index d62caab93..ce053a67c 100644 --- a/core/profile.c +++ b/core/profile.c @@ -1085,7 +1085,9 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru if (final_tts > 0) deco_time = pi->maxtime + final_tts - time_deep_ceiling; else if (time_clear_ceiling > 0) - deco_time = time_clear_ceiling - time_deep_ceiling; + /* Consistent with planner, deco_time ends after ascending (20-40s @9m/min from 3-6m) + at end of whole minute after clearing ceiling */ + deco_time = ROUND_UP(time_clear_ceiling, 60) + 30 - time_deep_ceiling; vpmb_next_gradient(deco_time, surface_pressure / 1000.0); final_tts = 0; last_ndl_tts_calc_time = 0; |