diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-08-19 23:14:00 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-20 07:28:00 -0700 |
commit | 0bb65a17cb77084a345f12581b5b39f4dafcae4a (patch) | |
tree | 51cbce1e73959117fd43f174c97c19413227fa2a /profile.c | |
parent | 2a5073113927f5ab5e6f38a7ac6382bd44e7ad5b (diff) | |
download | subsurface-0bb65a17cb77084a345f12581b5b39f4dafcae4a.tar.gz |
Use boyle_compensation in profile
otherwise VPM-B planned profiles seem to violate the ceiling. This needs
the first_stop_pressure to be available also in the profile, so I made
it global in planner.c
Important lesson: If you want to use deco_allowed_depth on a tissue_tolerance
that comes from a VPM-B planned dive, you have to call boyles_law() before
add_segment()!
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -853,6 +853,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru time_stepsize = t1 - t0; for (j = t0 + time_stepsize; j <= t1; j += time_stepsize) { int depth = interpolate(entry[-1].depth, entry[0].depth, j - t0, t1 - t0); + boyles_law(depth_to_mbar(entry->depth, &displayed_dive) / 1000.0); double min_pressure = add_segment(depth_to_mbar(depth, dive) / 1000.0, &dive->cylinder[entry->cylinderindex].gasmix, time_stepsize, entry->o2pressure.mbar, dive, entry->sac); tissue_tolerance = min_pressure; |