diff options
author | Robert Helling <helling@atdotde.de> | 2013-05-30 20:56:00 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-31 05:18:25 +0900 |
commit | 344a429e4811c60b9b12ef225c2b5b8d31d8534b (patch) | |
tree | a5fd22433415c35ab3495bbc2e3c823099fd546c /deco.c | |
parent | 77880b7a0797cef0fac0650ce0321e3aa8b702f4 (diff) | |
download | subsurface-344a429e4811c60b9b12ef225c2b5b8d31d8534b.tar.gz |
Show ceilings for individual tissues
I think that displaying tissue loadings either as pressure or as
percentages is not very intuitive but that it makes much more sense when
translated to ceiling depths.
This change enables just that for the 16 tissues in our calculated ceiling
and visualizes this in the profile graph.
There is a checkbox in the preferences to turn this on. If enabled, all
tissues having non-trivial ceilings are also shown in the info box.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r-- | deco.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -83,6 +83,9 @@ int ci_pointing_to_guiding_tissue; double gf_low_pressure_this_dive; #define TISSUE_ARRAY_SZ sizeof(tissue_n2_sat) +double tolerated_by_tissue[16]; + + static double tissue_tolerance_calc(const struct dive *dive) { int ci = -1; @@ -117,6 +120,8 @@ static double tissue_tolerance_calc(const struct dive *dive) (1.0 - buehlmann_inertgas_b)*(gf_low * gf_low_pressure_this_dive - gf_high * surface) + buehlmann_inertgas_b * (gf_low_pressure_this_dive - surface)); + tolerated_by_tissue[ci] = tolerated; + if (tolerated > ret_tolerance_limit_ambient_pressure) { ci_pointing_to_guiding_tissue = ci; |