Fwd: sample UDDF file

Jan Schubert Jan.Schubert at GMX.li
Fri Mar 1 03:38:11 PST 2013


On 01.03.2013 06:43, Linus Torvalds wrote:
> On Thu, Feb 28, 2013 at 9:05 PM, Miika Turkia <miika.turkia at gmail.com> wrote:
>> Dirk: can you shed a bit of light into the format Subsurface is
>> expecting for closed circuit? I did not spot any test dives that would
>> have revealed the expected format for po2.
> It is normally just be a fraction like "0.70" or whatever. Technically
> it *is* a pressure, and could (should?) be expressed in bar, but it
> seems seldom done.

Thx Linus. but what Miika was asking for is more how to translate (which
name/variable?) the <setpo2> to get it processed correctly in subsurface.

> Btw, looking at subsurface, we are very definitely doing things wrong
> when saving. Dirk, this is yours - and your saving of po2 values is
> *horribly* broken. You do this:
>
>    fprintf(f, " po2='%u.%2u bar'", FRACTION(sample->po2, 1000));
>
> which is crap, and results in "0. 0 bar" for a value of zero - which
> would still just happen to parse right. But for a value of "1.080" it
> would print it out as "1.80", so it can be catastropically off.
>
> The numbers should be printed out as "%u.%03u".

Now, this gets really interesting and I've to thank you a lot for
pointing this out Linus!
I've brought up this "feature" some time ago when discussing with Dirk
and claming about peaks in my po2 graph/readings. And I also researched
that there has been values with two and three digits in the resulting
XML but didn't get further in here. Reading your statement this
absolutely makes sense to me and I'd consider this a serious bug from a
users perspective as well. I've seen these peaks especially when
switching from low to high setpoint and back, meaning crossing the
1,000bar line so readings of 1,099 bar gets processed as 1.990bar in fact.

Dirk, this is something which is worth to build a 3.0.2 as well. As we
address technical divers with 3.0 we should state this in the release
notes as well. It would also be possible to autofix the 2 digits po2
readings in the XML, not sure it it is worth to do this...

Thx a lot,
//Jan


More information about the subsurface mailing list