summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-08-31 22:15:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-31 15:15:19 -0700
commitd9306125d97a90b3e589fe263ae08e12b7327773 (patch)
tree0cb823330a63b837b238e15d5754f7dab9cc4c9d /planner.c
parent3a7109e44ef49fb654af3d04d0b9a132c30eb34b (diff)
downloadsubsurface-d9306125d97a90b3e589fe263ae08e12b7327773.tar.gz
Do the Boyle compensation when the gradient is needed
and not some time before and store the result in a global variable. This stores only the bottom gradients and computes the Boyle compensation when computing the allowed ambient pressure. As the Boyle compensation needs a reference ambient pressure, to find the ceiling, we have to iterate this computation until the reference pressure is close enough to the ceiling. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/planner.c b/planner.c
index a0231a3ae..468fd6d3e 100644
--- a/planner.c
+++ b/planner.c
@@ -1172,9 +1172,6 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
previous_point_time = clock;
stopping = true;
- // Boyles Law compensation
- boyles_law(depth_to_mbar(stoplevels[stopidx], &displayed_dive) / 1000.0);
-
/* Check we need to change cylinder.
* We might not if the cylinder was chosen by the user
* or user has selected only to switch only at required stops.
@@ -1224,9 +1221,6 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
plan_add_segment(diveplan, clock - previous_point_time, depth, gas, po2, false);
previous_point_time = clock;
stopping = true;
-
- // Boyles Law compensation
- boyles_law(depth_to_mbar(stoplevels[stopidx], &displayed_dive) / 1000.0);
}
/* Are we waiting to switch gas?