diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-03 23:56:10 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-04 11:13:14 -0800 |
commit | 6dc247ff784d5fae6ba5721ff4c9683c1749999a (patch) | |
tree | 35b82513bbe864ee720d9ad94e0a54ba5eda38cc /dive.h | |
parent | 75b970f7accc2498289ea646b16d6f412efd1912 (diff) | |
download | subsurface-6dc247ff784d5fae6ba5721ff4c9683c1749999a.tar.gz |
Fix deco calculations to correctly use GF values and add CC support
The old implementation was broken in several ways.
For one thing the GF values are percentages, so they should normally be
0 < GF < 1 (well, some crazy people like to go above that).
With this most of the Bühlmann config constants were wrong.
Furthermore, after we adjust the pressure tolerance based on the gradient
factors, we need to convert this back into a depth (instead of passing
back the unmodified depth - oops).
Finally, this commit adds closed circuit support to the deco calculations.
Major progress and much more useful at this stage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -572,7 +572,7 @@ extern void subsurface_command_line_exit(gint *, gchar ***); #define FRACTION(n,x) ((unsigned)(n)/(x)),((unsigned)(n)%(x)) -extern double add_segment(double pressure, struct gasmix *gasmix, int period_in_seconds); +extern double add_segment(double pressure, struct gasmix *gasmix, int period_in_seconds, double setpoint); extern void clear_deco(double surface_pressure); extern void dump_tissues(void); extern unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressure, struct dive *dive, gboolean smooth); |