summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2015-06-20 11:01:09 +1000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-21 15:29:22 -0700
commit48aa0bdfd0450b6a51b4f2aa18f65b91b8b361b0 (patch)
tree53af813e0deca51171296732791dd25192bc059c
parent6f03aeaf0870da7f440f3bcca87c1c52bf98f568 (diff)
downloadsubsurface-48aa0bdfd0450b6a51b4f2aa18f65b91b8b361b0.tar.gz
Planner: change timestep to 2 seconds
Change the timestep used to calculate tissue pressures and ascents from 3 seconds to 2 seconds. But whats wrong with using 3 seconds? Deco stops are at 3 m (10') intervals, and our ascent rate is usually 9 m/min (30'/min), or at least multiples of 3 m/min (10'/min). Hence time to ascend from one stop to the next stop is 20s (or any factor of 60). Using 3s increments, we round our ascent interval up to 21 s, which leads to messy durations and runtimes. But what about me? I like SI units and whole decimals. Don't worry, 2s timesteps fit nicely when using 10 m/min ascent rate (18 s between stops). [Dirk Hohndel: edited the commit message to fix minute/second confusion] Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--planner.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/planner.c b/planner.c
index be6986679..58b230a56 100644
--- a/planner.c
+++ b/planner.c
@@ -14,7 +14,7 @@
#include "gettext.h"
#include "libdivecomputer/parser.h"
-#define TIMESTEP 3 /* second */
+#define TIMESTEP 2 /* second */
#define DECOTIMESTEP 60 /* seconds. Unit of deco stop times */
int decostoplevels[] = { 0, 3000, 6000, 9000, 12000, 15000, 18000, 21000, 24000, 27000,