mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
VPMB: calculate time of final ascent properly
Commit d15779a
calculates final stop based on stoplevels[2], but if final stop
is 6m/20ft, we should use stoplevels[3]. This fixes it.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
05b4113609
commit
13b909cf82
1 changed files with 1 additions and 1 deletions
|
@ -1060,7 +1060,7 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
|
|||
* otherwise odd things can happen, such as CVA causing the final ascent to start *later*
|
||||
* if the ascent rate is slower, which is completely nonsensical.
|
||||
* Assume final ascent takes 20s, which is the time taken to ascend at 9m/min from 3m */
|
||||
deco_state->deco_time = clock - bottom_time - stoplevels[2] / last_ascend_rate + 20;
|
||||
deco_state->deco_time = clock - bottom_time - stoplevels[stopidx + 1] / last_ascend_rate + 20;
|
||||
} while (!is_final_plan);
|
||||
decostoptable[decostopcounter].depth = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue