summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2016-09-13 21:29:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-09-17 13:43:28 -0700
commited11dab7fb4564369339e580511fa7913362b77b (patch)
tree6986c1602238067fd9ff0c46badcbc0f12c98688 /core
parent1b57b6cc174409bb6e2cede77a804254cbeb5fb6 (diff)
downloadsubsurface-ed11dab7fb4564369339e580511fa7913362b77b.tar.gz
Compute total tissue saturation for all deco models
... and not just for Buehlmann. This makes the saturation graphs meaningful for VPM-B. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/deco.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/deco.c b/core/deco.c
index b86376cae..6c3d6dd23 100644
--- a/core/deco.c
+++ b/core/deco.c
@@ -247,7 +247,6 @@ double tissue_tolerance_calc(const struct dive *dive, double pressure)
if (prefs.deco_mode != VPMB) {
for (ci = 0; ci < 16; ci++) {
- tissue_inertgas_saturation[ci] = tissue_n2_sat[ci] + tissue_he_sat[ci];
buehlmann_inertgas_a[ci] = ((buehlmann_N2_a[ci] * tissue_n2_sat[ci]) + (buehlmann_He_a[ci] * tissue_he_sat[ci])) / tissue_inertgas_saturation[ci];
buehlmann_inertgas_b[ci] = ((buehlmann_N2_b[ci] * tissue_n2_sat[ci]) + (buehlmann_He_b[ci] * tissue_he_sat[ci])) / tissue_inertgas_saturation[ci];
@@ -512,6 +511,8 @@ void add_segment(double pressure, const struct gasmix *gasmix, int period_in_sec
tissue_n2_sat[ci] += n2_satmult * pn2_oversat * n2_f;
tissue_he_sat[ci] += he_satmult * phe_oversat * he_f;
+ tissue_inertgas_saturation[ci] = tissue_n2_sat[ci] + tissue_he_sat[ci];
+
}
if(prefs.deco_mode == VPMB)
calc_crushing_pressure(pressure);