The old code took air and water temperatures primarily from
dive/divetemperature or secondarily if the previous one didn't have
either one of them from divecomputer/temperature. The new code attempts
to take first air temperature from dive/divetemperature or
diveomputer/temperature and then on a separate run the water
temperature from these both. Thus we should be fine if one temperature
is in dive/divetemperature and the other in divecomputer/temperature.
Fixes#2169
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Turns out that the initial quoting implementation discarded the fields
without quoting. This one ensures we should be getting also that data
exported.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Add two missing format-number functions for mean depth in dive list
export and depth in dive profile export.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
In dive list CSV export:
- Move unit "min" from duration field to header
- Move unit "%" from O2 and He fields to header
In dive profile CSV export:
- Add "min" to sample time header
- Add column for sample heart rate
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Let's show the units in CSV header so the actual fields have only the
values. This should be easier to parse with some other programs.
Fixes#472
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
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>
Use tab as separator when exporting dive details to CSV file. This also
replaces tabs and line feeds from notes with spaces.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to have empty field printed for every value on the CSV export.
Hopefully this is enough.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If specific value is not available, we need to have an empty value
instead.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Try to grab pressure information from first DC if it is not manually
entered.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to limit the DCs from which we grab the depths. Otherwise, we
end up with too many depth values.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If temperature is recorded by a DC it must be taken from under the
divecomputer tag. However, this will prefer the manually written value
if such exists.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is intended to export all the details that someone might copy from a
paper logbook. We need a matching import template to make this simple.
This hasn't been well tested, I'm sure it will break when elements and
attributes are missing.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>