diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-17 11:20:10 -1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-19 12:02:30 -0800 |
commit | 8a45a3ffb9e55b29cb7bdd056ba60eb7968e8fcd (patch) | |
tree | 4cf0c76e7249dee752b5ffa1a822952aa7640f5e /parse-xml.c | |
parent | d166e34fed53786000b9afa353e806b918d53714 (diff) | |
download | subsurface-8a45a3ffb9e55b29cb7bdd056ba60eb7968e8fcd.tar.gz |
When merging non-overlapping dives, add surface events in between
Most of the dive computers I have access to don't do the whole surface
event thing at the beginning or the end of the dive, so when you merge
two consecutive dives, you got this odd merged dive where the diver
spent the time in between at a depth of 1.2m or so (whatever the dive
computer "I'm now under water" depth limit happens to be).
Don't do that. Add surface events at the end of the first dive to be
merged, and the beginning of the second one, so that the time in between
dives is properly marked as being at the surface.
The logic for "time in between dives" is a bit iffy - it's "more than 60
seconds with no samples". If somebody has dive computers with samples
more than 60 seconds apart, this will break and we may have to revisit
the logic. But dang, that's some seriously broken sample rate.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
0 files changed, 0 insertions, 0 deletions