diff options
Diffstat (limited to 'deco.c')
-rw-r--r-- | deco.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -210,6 +210,21 @@ double he_factor(int period_in_seconds, int ci) return cache[ci].last_factor; } +bool is_vpmb_ok(double pressure) +{ + int ci; + double gradient; + double gas_tension; + + for (ci = 0; ci < 16; ++ci) { + gas_tension = tissue_n2_sat[ci] + tissue_he_sat[ci] + vpmb_config.other_gases_pressure; + gradient = gas_tension - pressure; + if (gradient > total_gradient[ci]) + return false; + } + return true; +} + void vpmb_start_gradient() { int ci; |