summaryrefslogtreecommitdiffstats
path: root/xslt/divelogs-export.xslt
AgeCommit message (Collapse)Author
2015-10-24Divelogs.de export: split location on slashGravatar Miika Turkia
As we join LOCATION with SITE on divelogs.de import using slash (/) as a separator, we might as well split on last slash on export. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-24Divelogs.de import: set default working pressureGravatar Miika Turkia
Let's use the same assumption for working pressure (where not defined) as the origin uses. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12Add importing of working pressure from divelogs.deGravatar Miika Turkia
We were missing the import of cylinders' working pressure when syncing with divelogs.de. This piece of information is required for proper unit conversions when user uses imperial units for displaying the dive information. (Both Subsurface and divelogs.de use metric internally, or at least the export from divelogs.de is in metric.) See #907 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-07New location management for divelogs.de exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02Use dynamic sample interval on divelogs.de exportGravatar Miika Turkia
Rounding always up should give us sensible sample interval as EON Steel adds extra samples. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02Have the dive duration in variable for further useGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30Select only "meaningful" samples for divelogs.de exportGravatar Miika Turkia
The logic to select samples from EON Steel for divelogs.de export is the following: - Ignore sample at time zero, as that is surface, and the second "odd" sample contains information we are interested in - Grab the second sample, first sample with pressure and temperature readings - Grab the third sample - "grand parent" is 0, thus our first interval sample - Grab the samples when the predecessor (or grand parent) is at least 10 seconds away This logic seems to produce reasonable results when exporting EON Steel logs to divelogs.de. Naturally there might be corner cases, that are not taken into account, but this basic logic seems reasonable in normal cases. (Unfortunately analysis is done based on a single dive.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30Use variable to track special handling of DCsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30Set EON Steel sample interval to 10s onGravatar Miika Turkia
This sets the Suunto EON Steel sample interval to 10 seconds when exporting to divelogs.de. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-29Export cylinder information to divelogs.de also if pressure droppedGravatar Miika Turkia
This will export the cylinder information to divelogs.de also if there is a pressure drop of at least 5 bars. (Previously only a gas switch to the gas triggered the export of that particular cylinder.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Export only used cylinders to divelogs.deGravatar Miika Turkia
This attempts to export only used cylinders to divelogs.de. The detection is based only on o2 percentage as per our test dives. However, the new cylinder id would be better, but that does not exist on old dives. Fixes #757 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-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-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-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-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-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>
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-04-09Switch to UTF-8 on .DLD exportGravatar Miika Turkia
Let's use the shiny new UTF-8 encoding on divelogs.de export. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-26Fix end pressure on DLD exportGravatar Miika Turkia
While working on UDDF export I noticed that the grabbing of last sample pressure was not working properly. This will fix it for DLD export. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-14Correct ending pressure for .DLD exportGravatar Miika Turkia
We grab the pressure information from samples, if available. Otherwise, we use information from first cylinder. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-14Fix free form text fields on .DLD uploadGravatar Miika Turkia
We need to have CDATA around text fields to support e.g. Cyrillic alphabet. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-10Convert Subsurface XML to divelogs.de formatGravatar Miika Turkia
The resulting divelogs.de formatted XML is then to be zipped and uploaded to divelogs.de website. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>