From JDiveLog to Subsurface

Miika Turkia miika.turkia at gmail.com
Mon Nov 7 00:18:29 EST 2011


On Sun, Nov 6, 2011 at 7:51 PM, Linus Torvalds <
torvalds at linux-foundation.org> wrote:

> On Sun, Nov 6, 2011 at 3:31 AM, Miika Turkia <miika.turkia at gmail.com>
> wrote:
> >
> > BTW what is the logic of cylinder sizes in there? (I currently mark sizes
> > less than 20 to be liters and others I put no units and subsurface seems
> to
> > translate them to liters)
>
>  But the native subsurface import never gas input_units.volume set to
> CUFT, so if you translate some other XML into native subsurface XML,
> then you need to always translate into liters in your xslt transform.
>
> The transform is fairly simple, see the sanitize_cylinder_type()
> function in parse-xml.c. You translate the cuft to liters, then you
> divide by the pressure in atmospheres. Which is how a 80cuft tank at
> 3000 psi becomes:
>
>   80 cuft in cuft = 2265 liter
>   3000 psi = 204 atm
>   2265 / 204 = 11.1 l
>
> Isn't that lovely?


Insane!

Here are patches for the SDM import with XSLT. Now the cylinder size should
be working as intended (size is in liters if work pressure is 0, otherwise
I do the math). Metric mode and multi cylinder still remains a mystery due
to lack of samples.

miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20111107/027dacf5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-XSLT-to-import-SDM-dive-log.patch
Type: text/x-patch
Size: 9924 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20111107/027dacf5/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Support-for-multiple-XSLT-files.patch
Type: text/x-patch
Size: 1452 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20111107/027dacf5/attachment-0003.bin>


More information about the subsurface mailing list