From ed11dab7fb4564369339e580511fa7913362b77b Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 13 Sep 2016 21:29:39 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- core/deco.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core') 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); -- cgit v1.2.3-70-g09d2