mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
VPM-B ceiling outside of planner: over-estimate deco_time on first iteration
This means the iterations converge from an over-estimate, consistent with planning VPM-B dives Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
eb62ced8a1
commit
f2535995f0
1 changed files with 4 additions and 2 deletions
|
@ -1028,9 +1028,11 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
|||
if (first_iteration) {
|
||||
nuclear_regeneration(t1);
|
||||
vpmb_start_gradient();
|
||||
/* For CVA calculations, start by guessing deco time = dive time remaining */
|
||||
/* For CVA calculations, deco time = dive time remaining is a good guess,
|
||||
but we want to over-estimate deco_time for the first iteration so it
|
||||
converges correctly, so add 30min*/
|
||||
if (!in_planner())
|
||||
deco_time = pi->maxtime - t1;
|
||||
deco_time = pi->maxtime - t1 + 1800;
|
||||
vpmb_next_gradient(deco_time, surface_pressure / 1000.0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue