aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
AgeCommit message (Collapse)Author
2014-12-10Fixed airtemperature in UDDF export.Gravatar Martin Long
The XSLT didn't expect the temperature tag to be within the <divecomputer> element in the source, so the selection wasn't finding it. Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Added <leadquantity> to UDDF export, showing weight used.Gravatar Martin Long
Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Split last_name and first_name for buddies in UDDF exportGravatar Martin Long
Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Fix gasdefinitons in UDDF exportGravatar Martin Long
Selection of <cylinder> elements wasn't working where dives are part of a trip. Change the selection so that it will select all cylinders whether or not the dive is part of a trip. Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Prevent UserID from being 'stuffed' into the start of UDDF export.Gravatar Martin Long
Due to there being no xsl template for the userID, it ended up getting inserted at the start of the output. This adds an empty template to map the <settings> element, preventing this erronious insertion. Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Update dive site structure in UDDF export to match UDDF 3.2.0 specification.Gravatar Martin Long
The dive site structure in the UDDF export was using an old structure where each site is simply listed as a <dive_site>. The new structure requires a single <divesite> containing at least one <divebase> - a base location where you are diving from, and at least one <site>. As subsurface only tracks sites, I've created a single divebase to be referenced by all of the sites. Note: although profiles in Subsurface can be grouped into trips, these are groupings of profiles, not sites, and the mapping may not be simple. e.g. on different trips the sames sites may be visited but a different base used. Or, different bases may be used on a single trip. Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Separate out buddies into individual entities when exporting to UDDF.Gravatar Martin Long
Part of a series bringing UDDF export closer to the UDDF standard, as per www.uddf.org. Currently when exporting to UDDF buddy entities are created one-per-unique-combination. This means that a group of buddies on a dive are exported as a single buddy, with the names comma separated. This patch identifies all unique buddies, whether used independently or along with other buddies on a dive. They are then linked independently on each profile. It also uses the UDDF standard <link ref=""> instead of <buddy_ref ref=""> Signed-off-by: Marton Long <martin@longhome.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-07Include some extra information on Shearwater importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-07Samples should be inside divecomputer on Shearwater importGravatar Miika Turkia
Data read from a divecomputer is moved inside the divecomputer tag Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-07Add cylinder support for Shearwater XML importGravatar Miika Turkia
This tries to grab the used cylinders when in open circuit mode. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-07Record ppO2 only when on CCR modeGravatar Miika Turkia
Shearwater describes the current mode with tag currentCircuitSetting, thus we should record the ppO2 only when in CCR mode. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Allow user to select date format on manual CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-24Default dive number on manual CSV importGravatar Miika Turkia
If manual CSV import does not have any dive number, give a default one so that the dives get import and not silently ignored. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-18Replace other references to hohndel.orgGravatar Dirk Hohndel
The only place where I'm not sure if there are unintended sideeffects of changing over to the new domain is QCoreApplication::setOrganizationDomain Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Support timedepth mode on UDCF importGravatar Miika Turkia
Fixes #756 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-06Include po2 on Shearwater importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-29Use bottom temperature on Suunto SDM importsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Export additional tanks to divelogs.deGravatar Miika Turkia
All recorded cylinders are exported to divelogs.de. This potentially includes cylinders that have not been used. The start and end pressure for additional cylinders is taken from the cylinder information. Main tank gets this information from first and last pressure reading or from the cylinder information if samples are not available. This should be ok when there is only one cylinder with pressure sensor, but does not probably work for people having multiple sensors. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Support for importing additional tanksGravatar Miika Turkia
This patch adds support for importing additional cylinders from divelogs.de. This also adds support for He on the import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-28Fix water temperature on Suunto SDM importGravatar Miika Turkia
Seems that Suunto stores temperature value of 0 when there is no temperature reading (I guess). Thus this patch ignores temperature samples that are zero. Otherwise, Subsurface looks into the samples and grabs the lowest number as water temperature. See #720 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-20Import decostop information from UDDF filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-20Import NDL form UDDF filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-16Hack double tank support for export to divelogsGravatar Miika Turkia
If the cylinder description starts with D%d we test if the size in description matches the cylinder size. If the cylinder size is double compared to size in description, we mark the dive as double tank dive to divelogs.de. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>