summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-08-27 14:13:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-27 07:03:41 -0700
commitfe00abc77472f7142cd5acfe1f0dff9de99de015 (patch)
tree9d890e44bf26dc65cc02f893ddc92f040c7d792a /planner.c
parent80e7213582c203a128270a0e2e8fcc850eede063 (diff)
downloadsubsurface-fe00abc77472f7142cd5acfe1f0dff9de99de015.tar.gz
Compute first stop pressure for each round of CVA
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, 6 insertions, 0 deletions
diff --git a/planner.c b/planner.c
index 5afc11771..1dda2f4fe 100644
--- a/planner.c
+++ b/planner.c
@@ -1143,6 +1143,12 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
breaktime = -1;
breakcylinder = 0;
o2time = 0;
+ first_stop_pressure.mbar = depth_to_mbar(deco_allowed_depth(tissue_tolerance,
+ diveplan->surface_pressure / 1000.0,
+ &displayed_dive,
+ 1),
+ &displayed_dive);
+
last_ascend_rate = ascent_velocity(depth, avg_depth, bottom_time);
if ((current_cylinder = get_gasidx(&displayed_dive, &gas)) == -1) {
report_error(translate("gettextFromC", "Can't find gas %s"), gasname(&gas));