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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-17 08:14:42 -07:00
parent 9bf6100aa7
commit 3cdd4df8e8

View file

@ -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) /