aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
AgeCommit message (Collapse)Author
2014-08-05Remove wrong unit from CNS in UDDF importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-28CSV import: add min:sec format supportGravatar Miika Turkia
On CSV import the time can be represented with seconds, min:sec or hour:min:sec. This patch adds support for the min:sec format that was missing. See #662 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-28Fix for sample interval on Divelogs.de exportGravatar Miika Turkia
Logic when to use default sample interval was mixed. Fixes #657 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-23Tune the unit test on DivingLog importGravatar Miika Turkia
At least in some cases the maximum sample depth can be more than recorded maximum depth on DivingLog XML export. Thus the maximum depth is doubled for unit detection. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Set proper gas type on UDDF importGravatar Miika Turkia
Use type 25 on UDDF import when the gas mix contains some helium. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-16Index used cylinder properly on divelogs.de exportGravatar Miika Turkia
The wrong O2 percentage was due to not referring to the correct cylinder but grabbing any o2 value in any cylinder. While fixing this, I noticed that also end pressure was missing the cylinder selection, so fixing that as well. Fixes #626 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-15Try to detect first cylinder on divelogs.de exportGravatar Miika Turkia
Most dive computers start always with the first cylinder (and if not, they give a gas switch in the first few seconds). Trying to follow this principle on divelogs.de export. The bug 626 sounds like a bit different case so a sample XML log would be needed to ensure that use case gets fixed. See #626 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11Add support for decimal comma on UDDF importGravatar Miika Turkia
Gas changes generated by Xdeep can contain mix information with decimal comma instead of decimal point. Thus we need to convert the comma to point before performing mathematical operations on it. Fixes #612 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11Add image support to UDDF exportGravatar Miika Turkia
This patch adds image support to UDDF export. As far as I can tell from the UDDF specification, the images can only be added to notes field, so that is what we do here. (buddy and owner can also have image tags, but that is irrelevant for Subsurface currently.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10Add support for importing pressure from CSV filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09Add support for importing TTS from CSV filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09Add support for importing NDL from CSV filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-05Marginal optimization of UDDF importGravatar Miika Turkia
This speeds up Aquadivelog imports marginally by doing lookup to used equipments only instead of all equipment ever used. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-02Optimize UDDF exportGravatar Miika Turkia
Writing the samples/waypoints to UDDF export in a totally new way. Previously the preparations for approximating waypoints was done for every sample, now only for the events. A few days ago it took 36 seconds for my test set of 8 dives to export to UDDF. This optimization round took it down from 0m4.745s to 0m0.253s. Fixes #508 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30Improve header wording for CSV exportGravatar Miika Turkia
Duration is better term than time for the length of the dive. Also remove the repetitive word dive from some of the header fields. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-29Properly identify siblings on UDDF exportGravatar Miika Turkia
UDDF export used all samples in the export when detecting previous sample. This resulted in a very slow processing as we had to go through massive amount of data for each event that's time was to be approximated. The detection of previous sample was also erroneous resulting in incorrect depth samples for the events in some occasions. This patch should address these issues. And along with patch that included pressure data on import this will fix the bug #499. Well, the performance after the patch is still not stellar, but still quite a difference with such a small change. The sample set of 8 dives (with one event each) takes now less than 5 seconds instead of the original 36 seconds (measured by doing the conversion with xsltproc). Fixes #499 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-27Include pressure data on UDDF importGravatar Miika Turkia
Importing pressure samples on UDDF import was missing. This patch adds that bit of information to our import. See #499 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-26Quote header line properly on CSV exportGravatar Miika Turkia
Let's make the export consistent by quoting the header line the same way the sample rows are quoted. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-10No negative depth on divelogs.de exportGravatar Miika Turkia
Crafting depth samples produced a negative depth for the last sample. This patch checks that negative last sample is ignored. (This occurred when last manual sample is not full minutes.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-10Create synthetic depth samples for manual divesGravatar Miika Turkia
This patch creates artificial depth samples for manually entered dives every 60 seconds. This is used for export to divelogs.de. Fixes #486 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-03Reefnet Sensus dataloggers report in mbar (CSV import)Gravatar Jan Mulder
Sensus dataloggers report depth in (absolute) millibar. This simple fix corrects the CSV import. The depth is now computed correctly. Signed-off-by: Jan Mulder <jlmulder@planet.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02XSLT to export dive log in CSVGravatar Miika Turkia
This implements divelog export into CSV format. This currently supports only metric units and lacks user interface. See #434 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Fix missing air temp on divelogs.de exportGravatar Miika Turkia
Fixes #439 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-15Add unit support for CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-08Add support for Shearwater Desktop XML logsGravatar Miika Turkia
Fixes #342 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25XSLT for importing manually kept CSV divesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Fix importing CSV files with empty valuesGravatar Miika Turkia
Empty values included the rest of the line in the value, instead of leaving it empty. This patch leaves empty values empty. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-17XSLT for parsing Sensus Ultra CSV exportGravatar Miika Turkia
Sensus divides temperature in one or two fields (depending on locale), so it cannot be parsed with our generic CSV import XSLT. And e.g. depth is in millimeters. This supports only importing of single dive at a time. Multiple dives would be in same file with first column being dive number. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16Grab also the last column in CSV when requestedGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16Use timeField variable on CSV importGravatar Miika Turkia
We want to skip duplicate lines on CSV import. For this we need to use time field, that is not necessarily the first field of the input. This patch uses the configured time field instead of first one. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-14Include support for semicolon separated CSV filesGravatar Rodrigo Severo
Oceanic's Geo's companion software, OceanLog, when exporting as txt produces log files with the dives samples as semicolon separated CSV files. Signed-off-by: Rodrigo Severo <rodrigo@fabricadeideias.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Remove unnecessary cylinder generation on UDDFGravatar Miika Turkia
Nowadays cylinder tags are generated based on actual usage. This includes all the required information on cylinders. Therefore generating incomplete cylinder tags from all listed cylinders is not needed anymore. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Cylinder support improved on UDDF importGravatar Miika Turkia
This patch adds support for cylinders for UDDF version 3.2.1. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Support for multiple cylinders on UDDF exportGravatar Miika Turkia
Adding support for multiple cylinders on UDDF export. This also adds a cylinder reference to the tankdata to enable mix lookups. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Generate UDDF waypoints for in-between eventsGravatar Miika Turkia
This patch generates a waypoint for events occurring between profile samples. It approximates the depth of the crafted waypoint linearly between the recorded sample depths. Fixes #385 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Add depth conversions to XSLTGravatar Miika Turkia
Convert depth to and from mm. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Including alarms and bookmarks on UDDF importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-25UDDF export: save events occurring between samplesGravatar Miika Turkia
UDDF export saved events only if they occurred at exactly same time as a profile sample. This patch will include events between samples as well. This assumes that profile samples are recorded in even intervals. Fixes #385 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Include O2 percentage in DivingLog importGravatar Miika Turkia
Seems there is a different way to state O2 percentage in DivingLog. This patch includes that format along with the previously seen one. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Try to detect whether DivingLog's samples are m/fGravatar Miika Turkia
Seems that we can detect the unit of samples from DivingLog import when comparing the maximum dive depth to the maximum recorded sample depth. If sample is bigger, it is recorded in imperial. Of course this relies on the assumption that the max depth of dive is recorded in metric unit, but that seems to be the case, at least in the sample received. It really does not make any sense to have both units in use for one dive without any info on the unit used. But since that is the case, let's try to cope with it. Fixes #316 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24We need to use include statement on XSLT nowadaysGravatar Miika Turkia
After change to include XSLT files in resources, the import quit working (even though the files and templates were found properly). This patch uses include statement instead as it seems to work in our case. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Allow comma separated CSV filesGravatar Dirk Hohndel
The separator selector in the CSV import dialog was unused. This passes the value into the xslt and adds ',' as possible value. I'm sure this could be done much better (pass the actual character instead of the index), but I couldn't get that to work and this does seem to do the trick. Also added a test dive to test this feature. Fixes #321 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25Tidy up csv to xml xsltGravatar Anton Lundin
Use if around the attribute, instead if a choose inside. Its less horrible on the eyes. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25Add the missed csv-field stopdepthGravatar Anton Lundin
I managed to mess up and grab parts of my unfinished otu field code and squash it into the wrong patch. Here is the code for stopdepth, and now the code sets the in_deco flag to. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Add optional support for stopdepth import from csvGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Add optional support for cns import from csv filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Add optional support for po2 import from csv filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Make temperature optional in csv importGravatar Anton Lundin
This adds a checkbox to be able to import csv files without temperature. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Improve UDDF export to include more dive dataGravatar Miika Turkia
Basic information like buddy, location and visibility is included in UDDF export. Also attempt to grab temperature information from both temperature and divetemperature tags. This partially fixes bug #224. However, at least divemaster and tags are not exported (as the UDDF spec either does not have these or has hidden the information of these fields somewhere between so many seemingly unnecessary other fields). See #224 Signed-off-by: Miika Turkia <miika.turkia@nixu.fi> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Improve UDDF importGravatar Miika Turkia
Some improvements on importing different versions of UDDF logs. Also include rating, gps coordinates and gas mixture in the import. Signed-off-by: Miika Turkia <miika.turkia@nixu.fi> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>