Somehow the divider lost one zero during copypaste to this XSLT file.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Previous formula didn't handle values of less than 10 correctly.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If pressure field is empty, we do not want to have field separator as
pressure value. This would flood the console with parsing error
messages.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When importing dive details from a CSV file, it is better to treat the
values as manually imported instead of imported from a dive computer.
The original way discarded the temperature values from the details
import if a dive profile was imported and merged to the dive details.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This will convert cylinder size when importing from imperial units. I am
using default working pressure of 3000 PSI that is not precisely
correct, but should be close enough for the most common aluminium
cylinders.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Assume a format containing a dot to be min.sec as defined in DL7
specification.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Seems that testing if BOOKMARK is empty is a bad idea. We end up not
getting any samples, but the ones containing a bookmark. So we need to
switch the logic to testing if BOOKMARK contains something and do those
tasks first and otherwise grab a regular sample.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Seems that DiveManager does not always return the dive duration in
DIVETIMESEC field. In this case we can try to calculate the duration
from sample count and interval.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Need to discard dive site notes on csv export..
miika
From ab23245e2acee32410fa680d0eaab098af69b5c2 Mon Sep 17 00:00:00 2001
From: Miika Turkia <miika.turkia@gmail.com>
Date: Mon, 21 Mar 2016 17:50:28 +0800
Subject: [PATCH] CSV export: discard dive site notes
The new format of divesite management breaks the CSV export as the notes
of divesites are matched.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to match the divesites to suppress extra output that breaks the
XML. This is because the divesites are actually gathered by calling a
template.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The timedepthmode specifies the time in seconds when using si units,
otherwise minutes. This patch implements this support.
Fixes#981
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
According to the specification each proper sample should have depth, so
we can just ignore the empty waypoints.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Grabbing all gas mixes was added for Xdeep default cylinders, and it is
not required for other data sources that have tankdata info in the UDDF
file.
See #958
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
If input is in F, we need to convert it to C on import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Include the DC's hardware name if it was given as parameter on CSV
import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This looks if we're importing any o2 values form the csv file, then its
probably a CCR dive.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of replacing all the empty model tags after a csv to xml
transform with some text, just produce that text in the csv to xml
transform instead.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds support for importing individual O2 sensors from a CSV file,
e.g. an APD log viewer file.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>