aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
AgeCommit message (Collapse)Author
2012-11-28Count the actual decimal digits for importGravatar Miika Turkia
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-26JDiveLog import fallback for 1 digit numbersGravatar Miika Turkia
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-26Handle seconds in decimal notation (from JDiveLog)Gravatar Miika Turkia
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-24Improvements on JDiveLog importGravatar Miika Turkia
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-10-21Map JDiveLog alarms to Subsurface eventsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-08-18Add weight and suit support for JDiveLog importGravatar Miika Turkia
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-05-12Suunto SDE conversion: add boat name to notes if it existsGravatar Linus Torvalds
This is, I think, the last piece of relevant information that I can find in Szymon's SDE file. Which is not to mean that we get all the conversions right, or that we handle the more complex cases (still no multi-cylinder import, for example). But it should be much better than it used to be. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-12Suunto SDE updates, take 178: add weight and visibility infoGravatar Linus Torvalds
This converts the weight information into subsurface weights, and also adds visibility info (if it exists) into the notes for the dive. More fall-out from me looking at the nasty suunto xml files, now that I have a few that actually have some info that isn't just from the computer download. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-12Fix more Suunto SDM xml conversion problemsGravatar Linus Torvalds
Looking at the XML of the two dives Szymon Kosecki sent out to the subsurface list, I notice that our cylinder size conversion was wrong. It looks like CYLINDERUNITS is what determines whether the cylinder size is in metric (0) or imperial (1) units. Of course, if you gave a cylinder size in cuft and didn't give a working pressure, subsurface will just ignore the size as the random crap it is. We *could* default to a working pressure of 3000 psi, of course. This also picks up the CYLINDERDESCRIPTION value, although neither of Szymon's dives actually had any description. I need more SDE xml files to figure out how multi-cylinder dives look etc, but I think this gets most *simple* SDE files converted almost correctly now. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-11Fix dive notes import from Suundo SDMGravatar Linus Torvalds
The xslt translation didn't add the <notes> tag for the notes, so while it did select the notes from the SDM file, that never made it into the subsurface notes. Also added weather info to the notes, mainly as an example. There are probably other things we could do, but this fixes at least the trivial test-case from Szymon Kosecki. Reported-by: Szymon Kosecki <skosecki@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-12-18Multiple cylinder support for JDiveLog importGravatar Miika Turkia
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-11-21XSLT to import SDM dive logGravatar Miika Turkia
This is tested with Linus' sample data, all basic functionality seems to be working properly. Gas changes are implemented but not tested as there was no samples of those. Multiple cylinders are missing because there was no samples available. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-30XSLT to transform JDiveLog to Subsurface formatGravatar Miika Turkia
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>