[PATCH] Convert deco info from JDiveLog to Subsurface

Dirk Hohndel dirk at hohndel.org
Sun Dec 16 17:59:46 PST 2012


Linus Torvalds <torvalds at linux-foundation.org> writes:

> On Sun, Dec 16, 2012 at 1:18 PM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
>>
>> Looking a bit closer, subsurface actually _parses_ the data
>> incorrectly - loading the file and then re-saving it causes bogus
>> data. Dirk?
>
> Oh, nope, that's not it.
>
> It's the xml translation after all.
>
> Miika's xslt file doesn't translate the insane time format, so we end
> up with stuff like
>
>   ndl="170.0 min"
>
> and then subsurface parses that as "170 seconds", because it expects
> the minute format to be "170:00".

Yep.

> But that's not all. The reason the ceiling doesn't show up for some
> dives seems to be another (unrelated) xslt translation error. The
> first sample of the last dive in Jan's list ends up looking like this
> (after changing the time parsing with a quick hack):
>
>   <sample time='0:00 min' depth='0.0 m' ndl='240:00 min'
> stoptime='7:00 min' stopdepth='3.0 m' />
>
> ie the first sample has both a 4 hour NDL time, but then it *also* has
> a 3m ceiling with a 7-minute stop.
>
> The actual jdivelog file has something like this:
>
>   ...
>   <T>450.0</T>
>   <D>72.91</D>
>   <TEMPERATURE>281.45</TEMPERATURE>
>   <DECOINFO tfs="1.0">3.0</DECOINFO>
>   <ALARM>DECO</ALARM>
>    ...
>
> without any NDL information at all. It *looks* like that NDL
> information came from the previous dive. So the xslt seems to bleed
> info from in between one dive to another.

That's not good.

Miika, I held back on applying your patch and am hoping for an updated
one that fixes these two issues...

Thanks

/D


More information about the subsurface mailing list