summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-02 16:49:33 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-02 16:49:33 -0700
commit38ccc152140d03b6df1de587a8887663886fff7b (patch)
tree171191137135e3c30ce122c16ca9e64b9821478a
parent81f013f3f131e5f96d36d3524f7e8d13d0147209 (diff)
parenta416847d3b19693c592e77c980f91943e1388a82 (diff)
downloadsubsurface-38ccc152140d03b6df1de587a8887663886fff7b.tar.gz
Merge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface
* 'add-info-stats-page' of git://github.com/dirkhh/subsurface: Exclude obviously bogus SAC values from statistics calculations
-rw-r--r--statistics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/statistics.c b/statistics.c
index 351f2d150..8000309c3 100644
--- a/statistics.c
+++ b/statistics.c
@@ -76,7 +76,7 @@ static void process_all_dives(struct dive *dive, struct dive **prev_dive)
info_stat.max_depth.mm = dp->maxdepth.mm;
info_stat.avg_depth.mm = (1.0 * old_tt * info_stat.avg_depth.mm +
dp->duration.seconds * dp->meandepth.mm) / info_stat.total_time.seconds;
- if (dp->sac > 0) {
+ if (dp->sac > 2800) { /* less than .1 cuft/min (2800ml/min) is bogus */
int old_sac_time = sac_time;
sac_time += dp->duration.seconds;
info_stat.avg_sac.mliter = (1.0 * old_sac_time * info_stat.avg_sac.mliter +