From 3cdd4df8e8df98b20d60ee01988b69e47a855b60 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 17 Jul 2014 08:14:42 -0700 Subject: [PATCH] Statistics: change our notion of "bogus SAC rate" With a pSCR it is entirely possible to have a SAC rate below 2.8l/min. Since we still don't want to include SAC rates of 0 let's change the cutoff to 0.1l/min. Fixes #624 Signed-off-by: Dirk Hohndel --- statistics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/statistics.c b/statistics.c index 2f149113d..6b7983098 100644 --- a/statistics.c +++ b/statistics.c @@ -68,7 +68,7 @@ static void process_dive(struct dive *dp, stats_t *stats) stats->avg_depth.mm = (1.0 * old_tt * stats->avg_depth.mm + duration * dp->meandepth.mm) / stats->total_time.seconds; - if (dp->sac > 2800) { /* less than .1 cuft/min (2800ml/min) is bogus */ + if (dp->sac > 100) { /* less than .1 l/min is bogus, even with a pSCR */ sac_time = stats->total_sac_time + duration; stats->avg_sac.mliter = (1.0 * stats->total_sac_time * stats->avg_sac.mliter + duration * dp->sac) /