Commit graph

245 commits

Author SHA1 Message Date
Miika Turkia
d7a5bae4c8 CSV import: fix imperial conversion for weight
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-31 10:32:17 -07:00
Miika Turkia
02488ba9df CSV import: add XSLT support for DC hw info
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>
2015-07-27 06:34:04 -07:00
Miika Turkia
615f45e58b CSV import: create o2 and diluent cylinders for CCR
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 06:33:57 -07:00
Miika Turkia
2fc54b6855 Add setpoint support on CSV import (XSLT parsing)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-21 07:34:13 -07:00
Anton Lundin
feb15a5498 Set the number of o2 sensors on a CSV import
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-27 14:43:28 -07:00
Anton Lundin
d3d5f88384 Correctly tag a CSV imported CCR dive as CCR
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>
2015-06-27 14:43:19 -07:00
Anton Lundin
4867363ec5 Move model tagging to xslt
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>
2015-06-27 14:43:04 -07:00
Anton Lundin
f04b3bc166 Add support for importing O2 sensors from CSV file
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>
2015-06-27 14:42:05 -07:00
Miika Turkia
95c2c06be4 Clean up MacDive location conversion
We got additional slashes in front of the site if country and/or
location was missing.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-21 08:47:29 -07:00
Miika Turkia
69b4a404b9 Ignore the gas_change alarm on MacDive import
As the gas changes can be parsed more reliably from the gases list, we
just ignore the gas_change events as redundant information.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:17:17 -07:00
Miika Turkia
30a60f34b6 Parse MacDive gas usage from gases list
Gas change events can be parsed properly from the gases list with clear
information on what the gas mixture was.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:17:10 -07:00
Miika Turkia
381f702017 Use function from commonTemplates on MacDive import
Get rid of duplicate function.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:17:03 -07:00
Miika Turkia
55a7715be0 Import tags from MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:16:57 -07:00
Miika Turkia
973713e9db Parse the MacDive gaschange values
Fixes #869

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:16:47 -07:00
Miika Turkia
9cd79776f2 Fix event name for MacDive gas changes
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:16:40 -07:00
Miika Turkia
178fb5152f Add new fields as extra data on MacDive import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:47 -07:00
Miika Turkia
01faebc99b Add entryType as tag on MacDive import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:41 -07:00
Miika Turkia
fdd714435e Have computer data inside divecomputer tag
This includes all the data computer related data within the divecomputer
tag. All the extra noise is just indentation (apart from moving the
divecomputer end tag).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:29 -07:00
Miika Turkia
4f5db4a11f Re-order the MacDive import
Next commit will do indentation so this one will keep it clear of what
actually occurs.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:24 -07:00
Miika Turkia
6cd71882f2 Support for new data format for MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:20 -07:00
Miika Turkia
1559eb590d Use dynamic sample interval on divelogs.de export
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-02 11:25:57 -07:00
Miika Turkia
4f83bb9236 Have the dive duration in variable for further use
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-02 11:25:35 -07:00
Miika Turkia
c21883c419 Select only "meaningful" samples for divelogs.de export
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-30 16:55:39 -07:00
Miika Turkia
3f25f84127 Use variable to track special handling of DCs
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-30 16:55:01 -07:00
Miika Turkia
5ab0cac1ca Set EON Steel sample interval to 10s on
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-04-30 16:54:27 -07:00
Miika Turkia
c80d1879b7 Add suit field for CSV import
Fixes #853

[Dirk Hohndel: fixed test compile]

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24 06:50:50 -07:00
Miika Turkia
86ac7fdf47 Import support for new Seabear format
This add support for Seabear's new import format that is used by H3 and
T1. In the future also the Hudc  should switch to the new format. The
main difference to the old one is that time stamps are no longer
recorded in the samples, but intervali is specified in the header.

The header contains other useful information as well that we should
build support for. E.g. surface pressure, gas mixes, GF, and mode might
be useful additions later on.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23 05:44:06 -07:00
Dirk Hohndel
f1f02941c7 Merge branch 'v4.4-branch' back into master
The manuals all will need a careful read.
The changes to use lsb-release and the PCLinuxOS specific files got lost
because I didn't want to try to rewite this in the middle of a merge.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>

Conflicts:
	Documentation/50-pot/subsurface-manual.pot
	Documentation/fr/po/subsurface-manual.fr.po
	Documentation/user-manual.txt
	Documentation/user-manual_es.txt
	Documentation/user-manual_fr.html.git
	Documentation/user-manual_fr.txt
	Documentation/user-manual_ru.html.git
	Documentation/user-manual_ru.txt
	file.c
	qthelper.cpp
	subsurface.pro
	subsurfacesysinfo.cpp
	xslt/DiveLog.xslt
2015-02-19 19:44:37 -08:00
Miika Turkia
554b652d25 DiveLog import: Only include weight when available
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:11:03 -08:00
Miika Turkia
541ec4fcac Add some extra data for DiveLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:10:54 -08:00
Miika Turkia
b87eb78192 Add serial number to DiveLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:10:38 -08:00
Miika Turkia
f7365015ff Include Boat in DiveLog import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-18 11:10:32 -08:00
Miika Turkia
265128451f Add visibility and weather to dive notes
This adds a bit more information to dive notes on DiveLog import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 14:07:25 -08:00
Miika Turkia
169fb32484 Add time to DiveLog import
I originally thought about converting the time as well, but my fingers
were too slow and memory too short to actually do that :D

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 14:07:22 -08:00
Miika Turkia
3aaa995fc9 XSLT to import MacDive logs
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 14:06:55 -08:00
Miika Turkia
371feac82f Add visibility and weather to dive notes
This adds a bit more information to dive notes on DiveLog import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 12:29:00 -08:00
Miika Turkia
4f26240b55 Add time to DiveLog import
I originally thought about converting the time as well, but my fingers
were too slow and memory too short to actually do that :D

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 12:28:56 -08:00
Miika Turkia
3f070eadd1 XSLT to import MacDive logs
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 12:28:17 -08:00
Martin Long
dca78fe6fc UDDF Export: Moved equipmentused to informationbeforedive section as per updated spec
Signed-off-by: Martin Long <martin@longhome.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11 16:15:28 -08:00
Martin Long
9b6c546244 UDDF Export: Moved tankdata before samples, as expected in xsd definition.
Signed-off-by: Martin Long <martin@longhome.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11 16:15:19 -08:00
Miika Turkia
737b5bdd5c Count the UDDF samples in different namespaces
Since UDDF import uses different namespaces, we need to count the
temperature samples in all of them to get temperature readings from
waypoints.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-01 07:09:59 -08:00
Miika Turkia
7a6b91a67e Should use the common GetFieldByIndex on import
Should have removed the getFieldByIndex template from these files when
it was moved to commonTemplates. Otherwise these imports wont work.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31 10:14:31 -08:00
Miika Turkia
1b48b19d0b Export cylinder information to divelogs.de also if pressure dropped
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>
2015-01-29 09:38:47 -08:00
Miika Turkia
81c0f39fa7 Use the get field template from common templates
Implementation of getFieldByIndex on this file does not support
quotation so lets use a template that is developed further.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26 09:25:36 -08:00
Miika Turkia
793758c483 Move getFieldByIndex template to common templates
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26 09:25:29 -08:00
Miika Turkia
99d95c3436 Update header to use sample wording on CSV export
The profile export now uses Sample time, etc. on profile export as that
is the naming we use on import as well.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26 09:25:21 -08:00
Miika Turkia
7c43ca9035 Support for AM/PM time format on manual CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25 12:02:13 -08:00
Miika Turkia
d57ffa8e58 Import quoted strings from the end of line properly
We need a special case to import tags on our own CSV export as there is
no field separator at the end of the line.

See #814

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25 07:24:12 -08:00
Miika Turkia
3b8643af4f Fix detection of numeric field
Discarding header lines was faulty as the test whether dive number was
numeric did not work properly.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24 14:51:24 -08:00
Miika Turkia
8e75243a5b Improve detection of continuation lines in CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24 14:51:00 -08:00