diff options
author | Robert C. Helling <helling@atdotde.de> | 2016-10-03 16:38:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-10-03 12:44:16 -0700 |
commit | aa3067c0f8730b2060fb1412f647bb23fc00839d (patch) | |
tree | 98bc1c329454878a819dd7ca5f1210d75b83f643 /core/deco.c | |
parent | b3a0abd84e5c448631b19169d7d7b16a5ed29d99 (diff) | |
download | subsurface-aa3067c0f8730b2060fb1412f647bb23fc00839d.tar.gz |
Compute weighted Buehlmann coefficients for all deco models
... as those are needed for the heatmap and not only
for Buehlmann ceilings.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/deco.c')
-rw-r--r-- | core/deco.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/deco.c b/core/deco.c index 5d4a18c13..09426bd0a 100644 --- a/core/deco.c +++ b/core/deco.c @@ -248,11 +248,13 @@ double tissue_tolerance_calc(const struct dive *dive, double pressure) double lowest_ceiling = 0.0; double tissue_lowest_ceiling[16]; + for (ci = 0; ci < 16; 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]; + } + if (prefs.deco_mode != VPMB) { for (ci = 0; ci < 16; 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]; - /* tolerated = (tissue_inertgas_saturation - buehlmann_inertgas_a) * buehlmann_inertgas_b; */ |