possible O2 PP display bug

Linus Torvalds torvalds at linux-foundation.org
Sat Mar 2 13:01:10 PST 2013


On Sat, Mar 2, 2013 at 12:01 PM, Jan Schubert <Jan.Schubert at gmx.li> wrote:
>
> FWIIW, the same dive saved with 3.0.1 where things looks much easier to
> me...

No, they have exactly the same data in both. It's three decimal digits
in all the 3.0.1, which is just a sign of "it was saved with two
digits at some point, but then re-loaded (and saved) and the original
0.0xy values have become 0.xy0 values".

What *can* matter is if a dive has only been saved exactly once
directly after being downloaded from the dive computer. And for that
case, and that case only, we can fix things up without errors. But the
only way to know that happened is of you see patterns like "[0-9]\.
[1-9] bar" in the XML file.  At that point, you can actually tell.

And there the "[1-9]" part is really important. Not [0-9]. That's the
thing that shows "this particular dive has only been saved once,
because it still has the thousandths part".

So that could be a magic marker for "we could re-create the data from
this". But your XML files no longer have that marker (if they ever
did).

But yes, the value-based approach would work for you. These ones:

  <sample time='71:00 min' depth='7.1 m' po2='1.11 bar' />
  <sample time='71:10 min' depth='6.9 m' po2='1.8 bar' />
  <sample time='71:20 min' depth='6.6 m' po2='1.6 bar' />
  <sample time='71:30 min' depth='5.9 m' po2='1.1 bar' />
  <sample time='71:40 min' depth='5.4 m' po2='0.97 bar' />

really should be:

  <sample time='71:00 min' depth='7.1 m' po2='1.11 bar' />
  <sample time='71:10 min' depth='6.9 m' po2='1.08 bar' />
  <sample time='71:20 min' depth='6.6 m' po2='1.06 bar' />
  <sample time='71:30 min' depth='5.9 m' po2='1.01 bar' />
  <sample time='71:40 min' depth='5.4 m' po2='0.97 bar' />

and the spike is gone. Whether those three are the only corrupted
ones, I don't know. There's one "1.4 bar" at the beginning that might
possibly be a "1.04", but both values are roughly equally far off
(1.11 and 1.25 around it - the 1.04 one is closer, but it's around a
fairly steep increase from 0.73 bar _and_ you're descending, so taking
the depth change into account maybe the 1.4 is closer).

               Linus


More information about the subsurface mailing list