Merge branch 'Planner'

This commit is contained in:
Dirk Hohndel 2014-05-26 13:28:18 -07:00
commit 9cc8e39d42
12 changed files with 87 additions and 72 deletions

View file

@ -678,7 +678,8 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b
/* We will break out when we hit the surface */
do {
/* Ascend to next stop depth */
assert(deco_allowed_depth(tissue_tolerance, diveplan->surface_pressure / 1000.0, dive, 1) < depth);
if (deco_allowed_depth(tissue_tolerance, diveplan->surface_pressure / 1000.0, dive, 1) < depth)
fprintf(stderr, "user provided way point above ceiling\n");
int deltad = ascend_velocity(depth, avg_depth, bottom_time) * TIMESTEP;
if (ascend_velocity(depth, avg_depth, bottom_time) != last_ascend_rate) {
plan_add_segment(diveplan, clock - previous_point_time, depth, o2, he, po2, false);