mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Reset VPM-B state between repetitive dives
This resets the maximum crushing pressures and the maximal ambient pressure between repetitive dives to prevent anomalies that a dive produces a shorter deco when following another one than without. Reported-by: sfuchs@gmx.de Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ec20d36f3c
commit
032c3258ed
3 changed files with 12 additions and 0 deletions
10
core/deco.c
10
core/deco.c
|
@ -559,9 +559,19 @@ void dump_tissues()
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
void clear_vpmb_state() {
|
||||
int ci;
|
||||
for (ci = 0; ci < 16; ci++) {
|
||||
max_n2_crushing_pressure[ci] = 0.0;
|
||||
max_he_crushing_pressure[ci] = 0.0;
|
||||
}
|
||||
max_ambient_pressure = 0;
|
||||
}
|
||||
|
||||
void clear_deco(double surface_pressure)
|
||||
{
|
||||
int ci;
|
||||
clear_vpmb_state();
|
||||
for (ci = 0; ci < 16; ci++) {
|
||||
tissue_n2_sat[ci] = (surface_pressure - ((in_planner() && (decoMode() == VPMB)) ? WV_PRESSURE_SCHREINER : WV_PRESSURE)) * N2_IN_AIR / 1000;
|
||||
tissue_he_sat[ci] = 0.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue