mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Only consider non-zero average depth for statistics
Upon importing dives, the average depth can be undefined which we store as 0. This zero should not contribute when computing the average depth for the (yearly) statistics, only dives with average depth set now contribute. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2d69f8c9d0
commit
20e211d337
2 changed files with 10 additions and 5 deletions
|
|
@ -16,6 +16,8 @@ typedef struct
|
|||
{
|
||||
int period;
|
||||
duration_t total_time;
|
||||
/* total time of dives with non-zero average depth */
|
||||
duration_t total_average_depth_time;
|
||||
/* avg_time is simply total_time / nr -- let's not keep this */
|
||||
duration_t shortest_time;
|
||||
duration_t longest_time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue