mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
VPM-B: Calculate crushing pressure on descent
By calculating crushing pressure after the manually entered phase, we were doing it wrong for multi-level dives. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7d09f418f8
commit
2d45e587ba
1 changed files with 3 additions and 1 deletions
|
@ -110,6 +110,9 @@ double interpolate_transition(struct dive *dive, duration_t t0, duration_t t1, d
|
|||
int depth = interpolate(d0.mm, d1.mm, j - t0.seconds, t1.seconds - t0.seconds);
|
||||
tissue_tolerance = add_segment(depth_to_mbar(depth, dive) / 1000.0, gasmix, 1, po2.mbar, dive, prefs.bottomsac);
|
||||
}
|
||||
if (d1.mm > d0.mm)
|
||||
calc_crushing_pressure(depth_to_mbar(d1.mm, &displayed_dive) / 1000.0);
|
||||
|
||||
return tissue_tolerance;
|
||||
}
|
||||
|
||||
|
@ -997,7 +1000,6 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
create_dive_from_plan(diveplan, is_planner);
|
||||
return(false);
|
||||
}
|
||||
calc_crushing_pressure(depth_to_mbar(depth, &displayed_dive) / 1000.0);
|
||||
nuclear_regeneration(clock);
|
||||
clear_deco(displayed_dive.surface_pressure.mbar / 1000.0);
|
||||
vpmb_start_gradient();
|
||||
|
|
Loading…
Add table
Reference in a new issue