possible O2 PP display bug

Dirk Hohndel dirk at hohndel.org
Sat Mar 2 11:21:59 PST 2013


I think the right answer is

a) let's make SURE that this gets fixed if people click "force download of all dives"
b) release 3.0.2 this weekend

This should only affect people with a Shearwater computer that is connected to pO2 sensors.
So let's keep the window small and just get them a simple fix.

/D

On Mar 2, 2013, at 10:16 AM, Linus Torvalds wrote:

> On Sat, Mar 2, 2013 at 10:07 AM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
>> 
>> In particular, the *first* time a pO2 of 0.009 was saved, it was saved
>> as "0. 9 bar". Then, when you load that, and re-save it, what do you
>> get?
>> 
>> You don't get "0. 9 bar" again. No. You get "0. 0 bar", because the
>> "9" in "0. 9" was never parsed due to the space.
> 
> The important part here is that the above argument (and the same
> argument about "1.020") is true *without* the changes to subsurface.
> IOW, purely with the old code. So no amount of new code can fix it,
> because the old code would corrupt values all on its own, and you have
> no way to tell.
> 
> The "1.200" that the old code saved could have been "1.200" from the
> beginning. Or it could have been "1.020" originally.  There really is
> no way to tell.
> 
> Of course, you could guess. Not based on the pattern of the digits in
> the values (since the string is "1.200" in either case), but simply
> based on the pattern of values. If you see odd spikes, you know the
> data is bad, and then you can try to fix it up. But that isn't about
> parsing the values any more, that's about data-mining and recognizing
> that certain values may be corrupt.
> 
> So you could have some fancy data mining algorithm which says:
> 
> - any mbar value that is not divisible by 10 is known to be good. If
> we see a "1.101" (1101 mbar), we know it was always 1.101.
> 
> - any mbar value of the type "x.000" migth have been "x.00?"
> 
> - any mbar value of the type "x.yz0" might have been "x.0yz"
> 
> Using that knowledge, and looking for discontinuities, you might be
> able to reconstruct things. Maybe there are other patterns too.
> 
> But quite frankly, I suspect you're better off doing a re-download.
> Just check the "prefer downloaded" checkbox. If your dive computer is
> fancy and supports po2 data, I'm pretty sure it has enough memory to
> remember a lot of old dives.
> 
>              Linus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4130 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130302/a0844601/attachment.bin>


More information about the subsurface mailing list