mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add a meandepth to the dive structure
This is currently only used in one place (in statistics.c), but it certainly is consistent with the other recent changes to avoid using only the first divecomputer when trying to make statements about a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0755cc522b
commit
c7efcb23a9
3 changed files with 18 additions and 2 deletions
|
|
@ -146,7 +146,7 @@ static void process_dive(struct dive *dp, stats_t *stats)
|
|||
if (!duration)
|
||||
return;
|
||||
stats->avg_depth.mm = (1.0 * old_tt * stats->avg_depth.mm +
|
||||
duration * dp->dc.meandepth.mm) / stats->total_time.seconds;
|
||||
duration * dp->meandepth.mm) / stats->total_time.seconds;
|
||||
if (dp->sac > 2800) { /* less than .1 cuft/min (2800ml/min) is bogus */
|
||||
sac_time = stats->total_sac_time + duration;
|
||||
stats->avg_sac.mliter = (1.0 * stats->total_sac_time * stats->avg_sac.mliter +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue