mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Collect per tank SAC rate
This is a bit painful, but we basically walk the samples and pick the valid tank from the events. And then we do a simple discrete integration to figure out the mean depth per tank and duration per tank. And then we assemble all that into per tank statistics. Strangely the value calculated here seems slightly higher than one would expect from the overall SAC rate. This inconsistency should be investigated a bit further, but my guess it it's based on the assumption that the DC provided mean depth is possibly more accurate than what we can calculate from the profile. Fixes #284 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
36cb50fb37
commit
0ca12c3601
4 changed files with 65 additions and 3 deletions
1
dive.h
1
dive.h
|
@ -661,6 +661,7 @@ extern void copy_samples(struct dive *s, struct dive *d);
|
|||
extern void fill_default_cylinder(cylinder_t *cyl);
|
||||
extern void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int time, int idx);
|
||||
extern void add_event(struct divecomputer *dc, int time, int type, int flags, int value, const char *name);
|
||||
extern void per_cylinder_mean_depth(struct dive *dive, struct divecomputer *dc, int *mean, int *duration);
|
||||
|
||||
/* UI related protopypes */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue