Commit graph

12 commits

Author SHA1 Message Date
Miika Turkia
4297d931a3 Identify converted files as imported
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-08 10:17:33 -08:00
Miika Turkia
9f6b8ca89a Translate comma to colon on XML import
Translate decimal commas on XML import to decimal points. (As detected
from available sample files using Linus' debug printing.)

Also check for empty values on MacDive temperature import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-07 11:58:57 -08:00
Miika Turkia
48de523f15 JDiveLog import - add ndl=0 when on deco
This patch will add ndl='0:00 min' attribute on all the samples that
have stoptime or stopdepth set when importing from JDiveLog. This hack
ensures that dive computer's deco ceiling is shown.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-22 20:16:48 -08:00
Miika Turkia
f6bd9d1a14 Convert deco info from JDiveLog to Subsurface
This patch correctly converts the available deco data from JDiveLog files.
In order for this to work correctly the next patch from Linus is needed as
well.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-12-19 20:04:22 -10:00
Miika Turkia
7259cf5bb6 Count the actual decimal digits for import
Apply the decimal time conversion hack for JDiveLog import if there are
less than 2 digits in the decimal part (and value is less than 60).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-28 20:49:44 -07:00
Miika Turkia
2ee26caba4 JDiveLog import fallback for 1 digit numbers
Use the decimal time format fallback also for one digit numbers as
Linus suggested. Thus 1.1 min would result in 1 min 6 sec.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-26 21:46:04 -07:00
Miika Turkia
e544ca5f6a Handle seconds in decimal notation (from JDiveLog)
This is a hack to convert time stored in decimal notation to proper
seconds. When using metric units the default way of JDiveLog to store
seconds is to have the amount of seconds after decimal point (1.20 is 1
minute 20 seconds). In some odd case it is reportedly possible that the
seconds are actually 100 based, thus we need to convert that to seconds
(1.33333 will become 1 minute 20 seconds).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-26 11:14:58 -08:00
Miika Turkia
27f7e58493 Improvements on JDiveLog import
If dive computer does not record the sample interval, but records time
stamps on the samples, we use those.

A couple of corner cases fixed that were noticed in new log samples.
Also fixes when importing dives logged in imperial units.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-24 09:00:56 -08:00
Miika Turkia
25ddf1caee Map JDiveLog alarms to Subsurface events
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-21 20:46:50 -07:00
Miika Turkia
413065dcdc Add weight and suit support for JDiveLog import
Use the suit and weightsystem support of Subsurface when importing
divelogs from JDiveLog. (They were previously included in the notes
field as support for these fields was missing from Subsurface.)

After import the weightsystem is undefined and weight unit is the
default of Subsurface. Unfortunately the weight field in JDiveLog is
text field and might contain pounds and kilograms mixed in seemingly
random order. Thus 2 pounds of weight might be transformed to 2 kg.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-08-18 09:53:32 -07:00
Miika Turkia
d1d17c543c Multiple cylinder support for JDiveLog import
Support for multiple cylinders and gas change events when Importing
JDiveLog logs to Subsurface. This is tested with manually crafted data
and not real data (originating from dive computer).

NOTE: Subsurface does not handle importing multiple cylinders
correctly but imports only the first cylinder. However, manually
converting data to a file and opening that in Subsurface works
correctly.
 (xsltproc jdivelog2subsurface.xslt jdivelog-gas.jlb > gas.xml)

Some minor tweaking on importing JDiveLog specific fields to notes
fields in Subsurface is also included.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-12-18 11:56:26 -08:00
Miika Turkia
84e6f200f6 XSLT to transform JDiveLog to Subsurface format
XSLT file to transfer dive logs from JDiveLog format to Subsurface
format. It can be used on command line with the following syntax:
	xsltproc <divelog.jlb> > <divelog.xml>

Basic functionality such as depth readings and dive information is
currently supported. However, this is only tested in metric units.

What is currently missing is at least tank changes and tank pressure (as
no sample data was available).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-30 11:35:23 -07:00