summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/planner.c b/planner.c
index 3168f0ff9..13a9a489a 100644
--- a/planner.c
+++ b/planner.c
@@ -687,13 +687,18 @@ int ascend_velocity(int depth, int avg_depth, int bottom_time)
/* As an example (and possibly reasonable default) this is the Tech 1 provedure according
* to http://www.globalunderwaterexplorers.org/files/Standards_and_Procedures/SOP_Manual_Ver2.0.2.pdf */
- if (depth <= 6000)
- return 1000 / 60;
-
- if (depth * 4 > avg_depth * 3)
- return 9000 / 60;
- else
- return 6000 / 60;
+ if (depth * 4 > avg_depth * 3) {
+ return prefs.ascrate75;
+ } else {
+ if (depth * 2 > avg_depth) {
+ return prefs.ascrate50;
+ } else {
+ if (depth > 6000)
+ return prefs.ascratestops;
+ else
+ return prefs.ascratelast6m;
+ }
+ }
}
void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, struct dive *master_dive, bool add_deco, bool show_disclaimer)