[PATCH] Interpolate depth for samples that have no depth

Linus Torvalds torvalds at linux-foundation.org
Sat Oct 24 20:44:40 PDT 2015



On Sun, 25 Oct 2015, Linus Torvalds wrote:
> 
> Just as an example of the kind of change this causes, here's an extract of 
> diff of the git save format for the same dive from the EON Steel before 
> and after this change:

Actually, here's a better example:

  70:43 1.93m 54.39bar
- 70:50 1.93m
- 70:51 1.93m
- 70:52 1.93m
+ 70:50 1.335m
+ 70:51 1.25m
+ 70:52 1.165m
  70:53 1.08m 54.29bar

that's at the end of a dive, coming up to the surface, and I think it's 
due to the EON Steel being chatty due to surface events etc. So you have 
three events that happen in between the two samples, and the old code 
would give them all the same depth of 1.93m.

Which means that we basically saw a jump of three feet - from 1.93m to 
1.08m in one second (70:52 to 70:53) and would color that red as being a 
very quick ascent.

Now, with the depth interpolation for non-depth samples, we have just that 
8cm movement in that one second, which is rather more reasonable.

Of course, in all of these cases we could just as well have thrown the 
empty samples away entirely, but as mentioned that has its own set of 
nasty complexities too, and would still require the "-1" depth and the 
interpretation in case you had real non-depth data in there.

                 Linus


More information about the subsurface mailing list