summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-11-10 12:23:13 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-10 12:28:59 +0100
commit07de22a5d0d5b6aa189ea9a59951dc82fc031ba0 (patch)
tree0545982d996326b3b94e519ba213cb76d15eec0d /equipment.c
parente29a43681049ef30eb5129f140a1ed0936a9b516 (diff)
downloadsubsurface-07de22a5d0d5b6aa189ea9a59951dc82fc031ba0.tar.gz
Try to find optimal dive sample merge offset
When we merge dives where the samples have come from different dive computers, the samples may be offset from each other due to the dive computers not having decided that the dive starts at quite the same time. For example, some dive computers may take a while to wake up when submerged, or there may be differences in exactly when the dive computer decides that a dive has started. Different computers tend to have different depths that they consider the start of a real dive. So when we merge two dives, look for differences in the sample data, and search for the sample time offset that minimizes the differences (logic: minimize the sum-of-square of the depth differences over a two-minute window at the start of the dive). This still doesn't really result in perfect merges, since different computers will give slightly different values anyway, but it improves the dive merging noticeably. To the point that this seems to have found a bug in our Uemis data import (it looks like the Uemis importer does an incorrect saltwater pressure conversion, and the data is actually in centimeter, not in pressure). So there is room for improvement, but this is at least a reasonable approximation and starting point. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'equipment.c')
0 files changed, 0 insertions, 0 deletions