diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-05 10:06:14 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-05 10:06:14 -0800 |
commit | 641c0d252b8f4d303dfed3359004cab46853d6f7 (patch) | |
tree | 124d5275812e9e41db590cfee42b7b1b049fd55f /deco.c | |
parent | 635f190302cc3b00fb4daedd4fced940fcee7349 (diff) | |
download | subsurface-641c0d252b8f4d303dfed3359004cab46853d6f7.tar.gz |
Fix bug in smooth ceiling mode
The ceiling calculations for the gradient factors still had a 3m increment
hardcoded. This is now also conditional on the smooth parameter.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r-- | deco.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -247,7 +247,10 @@ unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressur below_gradient_limit = (new_gradient_factor < actual_gradient_limit(&mydata)); while(!below_gradient_limit) { - mydata.pressure += PRESSURE_CHANGE_3M; + if (!smooth) + mydata.pressure += PRESSURE_CHANGE_3M; + else + mydata.pressure += PRESSURE_CHANGE_3M / 30; /* 4in / 10cm instead */ new_gradient_factor = gradient_factor_calculation(&mydata); below_gradient_limit = (new_gradient_factor < actual_gradient_limit(&mydata)); } |