This is the official upstream of the Subsurface divelog program
Find a file
Salvador Cuñat 44b55bd1a2 Import Datatrak/WLog files
Sequentially parses a file, expected to be a Datatrak/WLog divelog, and
converts the dive info into Subsurface's dive structure.

As my first DC, back in 90s, was an Aladin Air X, the obvious choice of log
software was DTrak (Win version). After using it for some time we moved to WLog
(shareware software more user friendly than Dtrak, printing capable, and still
better, it runs under wine, which, as linux user, was definitive for me). Then,
some years later, my last Aladin died and I moved to an OSTC, forcing me to
look for a software that support this DC.
I found JDivelog which was capable of import Dtrak logs and used it for some
time until discovered Subsurface existence and devoted to it.

The fact was that importing Dtrak dives in JDivelog and then re-importing them
in Subsurface caused a significant data loss (mainly in the profile events and
alarms) and weird location of some other info in the dive notes (mostly tag
items in the original Dtrak software). This situation can't actually be solved
with tools like divelogs.de which causes similar if no greater data loss.

Although this won't be a core feature for Subsurface, I expect it can be useful
for some other divers as has been for me.

Comments and issues:

Datatrak/Wlog files include a lot of diving data which are not directly
supported in Subsurface, in these cases we choose mostly to use "tags".

The lack of some important info in Datatrak archives (e.g. tank's initial
pressure) forces us to do some arbitrary assumptions (e.g. initial pressure =
200 bar).

There might be archives coming directly from old DOS days, as first versions
of Datatrak run on that OS; they were coded CP437 or CP850, while dive logs
coming from Win versions seems to be coded CP1252. Finally, Wlog seems to use a
mixed confusing style. Program directly converts some of the old encoded chars
to iso8859 but is expected there be some issues with non alphabetic chars, e.g.
"ª".

There are two text fields: "Other activities" and "Dive notes", both limited to
256 char size. We have merged them in Subsurface's "Dive Notes" although the
first one could be "tagged", but we're unsure that the user had filled it in
a tag friendly way.

WLog adds some information to the dive and lets the user to write more than
256 chars notes. This is achieved, while keeping compatibility with DTrak
divelogs, by adding a complementary file named equally as the .log file and
with .add extension where all this info is stored.  We have, still, not worked
with this complementary files.

This work is based on the paper referenced in butracker #194 which has some
errors (e.g. beginning of log and beginning of dive are changed) and a lot of
bytes of unknown meaning. Example.log shows, at least, one more byte than those
referred in the paper for the O2 Aladin computer, this could be a byte referred
to the use of SCR but the lack of an OC dive with O2 computer makes impossible
for us to compare.

The only way we have figured out to distinguish a priori between SCR and non
SCR dives with O2 computers is that the dives are tagged with a "rebreather"
tag. Obviously this is not a very trusty way of doing things. In SCR dives,
the O2% in mix means, probably, the maximum O2% in the circuit, not the O2%
of the EAN mix in the tanks, which would be unknown in this case.

The list of DCs related in bug #194 paper seems incomplete, we have added
one or two from WLog and discarded those which are known to exist but whose
model is unknown, grouping them under the imaginative name of "unknown". The
list can easily be increased in the future if we ever know the models
identifiers.
BTW, in Example.log, 0x00 identifier is used for some DC dives and from my own
divelogs is inferred that 0x00 is used for manually entered dives, this could
easily be an error in Example.log coming from a preproduction DC model.

Example.log which is shipped in datatrak package is included in dives
directory for testing pourposes.

[Dirk Hohndel: some small cleanups, merged with latest master, support
               divesites, remove the pointless memset() before free() calls
	       add to cmake build]

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10 10:03:08 -07:00
.tx
android Turns out the manifest doesn't allow a dash in the name 2015-01-14 10:46:21 +13:00
appdata Replace other references to hohndel.org 2014-11-18 13:13:39 +00:00
dives Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
Documentation merge conflicts 2015-02-22 07:46:28 -08:00
icons Add better icons for the filter dialog 2014-12-31 23:53:28 -08:00
marbledata
packaging Import subsurface-android build script 2015-03-09 12:53:01 -07:00
qt-ui Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
ReleaseNotes Get ready for Subsurface 4.4.1 2015-02-17 13:55:27 -08:00
scripts Merge branch 'v4.4-branch' back into master 2015-02-19 19:44:37 -08:00
tests Add support for more GPS coordinate formats. 2015-02-23 05:37:34 -08:00
theme HTML: Add Max. depth to dive view. 2015-02-28 12:43:17 +01:00
translations Latest translations 2015-02-17 08:59:25 -08:00
xslt Merge branch 'v4.4-branch' back into master 2015-02-19 19:44:37 -08:00
.clang-format
.gitattributes
.gitignore Complement the CMakesList.txt with the latest file inclusions. 2014-08-23 08:07:15 -07:00
android.cpp Create a subsurface_access for Android too 2014-11-21 12:14:30 -08:00
CMakeLists.txt Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
cochran.c Typos: use subscript for pO2 in conchran.c events 2015-01-25 07:13:41 -08:00
cochran.h Eliminate packed struct for Cochran 2014-10-29 09:05:15 -07:00
CodingStyle Adds advice on text strings to style guide 2014-12-17 07:51:57 -08:00
color.h CVS import UI: mark the column names in blue as well 2015-01-07 13:00:16 -08:00
configuredivecomputer.cpp Use correct flag when connecting the progress events to the progress bar 2015-01-22 06:26:57 +12:00
configuredivecomputer.h Connect the progress events to the progress bar 2015-01-21 17:03:24 +12:00
configuredivecomputerthreads.cpp ifdef hw_ostc3_device_config_{read,write} usage 2015-01-26 11:22:08 -08:00
configuredivecomputerthreads.h Add infrastructure to emit progress from threads 2015-01-21 17:03:21 +12:00
datatrak.c Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
datatrak.h Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
deco.c Use SAC from preferences for PSCR oxygen drop 2015-01-20 06:16:15 +12:00
deco.h Tissue saturation plot a la Sherwater Pretel 2014-09-19 21:46:30 -07:00
descriptor3.tsv
device.c
device.h
devicedetails.cpp Define new OSTC3 settings in devicedetails 2014-10-18 15:21:12 -07:00
devicedetails.h Define new OSTC3 settings in devicedetails 2014-10-18 15:21:12 -07:00
display.h Print: add the support to store margins and printer options 2014-11-13 15:05:11 -08:00
dive.c Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
dive.h Add hashes to images 2015-02-27 06:29:44 +01:00
divecomputer.cpp Don't reimplement the clear() method 2015-01-29 14:00:19 -08:00
divecomputer.h Don't reimplement the clear() method 2015-01-29 14:00:19 -08:00
divelist.c Change one more spot in divelist.c from locations to dive sites 2015-02-12 21:30:57 -08:00
divelist.h Deselect dives that are no longer shown as the dive list is filtered 2014-11-12 14:07:07 -08:00
divesite.c divesite.c: use rand() instead of random() 2015-02-14 07:53:13 -08:00
divesite.h Add helper function to detect empty dive sites 2015-02-13 22:53:03 -08:00
divesitehelpers.cpp Move helper functions around 2015-02-23 09:31:08 -08:00
equipment.c Use correct name for oxygen 2015-01-05 13:30:19 -08:00
exif.cpp Break picture handling code from C++ to C. 2014-06-02 23:59:29 -07:00
exif.h Break picture handling code from C++ to C. 2014-06-02 23:59:29 -07:00
file.c Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
file.h Liquivision import fixes 2014-11-07 13:15:44 -08:00
gaspressures.c Check error code of get_cylider_idx_by_use() 2014-11-22 16:22:57 -08:00
gaspressures.h Some gas handling improvements 2014-11-16 20:50:16 +00:00
gettext.h
gettextfromc.cpp Make the cache cache things 2015-01-29 13:37:11 -08:00
gettextfromc.h
git-access.c Fix Ubuntu compilation error. 2015-02-24 11:41:11 +01:00
gpl-2.0.txt
helpers.h Move helper functions around 2015-02-23 09:31:08 -08:00
INSTALL INSTALL: remove the detailed install instructions 2015-02-18 00:17:02 -08:00
libdivecomputer.c Prevent a tank from looking undefined by mistake 2015-02-10 15:03:48 -08:00
libdivecomputer.h Add a private table for downloaded dives 2015-01-09 15:06:25 -08:00
linux.c Add subsurface_access() 2014-11-13 11:58:59 -08:00
liquivision.c Ignore buddy pressures in Liquivision import 2015-03-08 12:55:37 -07:00
load-git.c Add hashes to images 2015-02-27 06:29:44 +01:00
macos.c Add subsurface_access() 2014-11-13 11:58:59 -08:00
main.cpp Remove the ProfileWidget from mainwindow.ui 2015-02-10 10:45:45 -08:00
membuffer.c membuffer: add helper functions to return regular C strings 2015-02-15 06:02:24 -08:00
membuffer.h membuffer: add helper functions to return regular C strings 2015-02-15 06:02:24 -08:00
parse-xml.c Add hashes to images 2015-02-27 06:29:44 +01:00
planner.c Improve gas accounting in the panner 2015-03-09 10:39:50 -07:00
planner.h Planner: correctly free divedatapoints 2014-08-19 15:06:39 -05:00
pref.h Add 'system_default_directory()' helper function 2015-02-15 06:03:13 -08:00
profile.c More descriptive variable in calls to get_dive_gas 2015-01-25 09:56:37 -08:00
profile.h Correcly look at all relevant dive computer structures 2015-01-24 07:07:02 +12:00
qt-gui.cpp qt-gui.cpp: fix imcomplete type error 2015-02-26 11:30:04 +01:00
qt-gui.h
qthelper.cpp UI to learn hashes of local image files 2015-02-27 06:30:49 +01:00
qthelper.h UI to learn hashes of local image files 2015-02-27 06:30:49 +01:00
README Get ready for Subsurface 4.4.1 2015-02-17 13:55:27 -08:00
Readme.testing
Readme.ubuntu Update Readme.ubuntu 2015-01-15 19:48:11 -08:00
satellite.svg
save-git.c Add hashes to images 2015-02-27 06:29:44 +01:00
save-html.c Change from locations to dive sites in save-html and worldmap 2015-02-12 21:30:56 -08:00
save-html.h HTML: Save data with user selected units 2014-10-20 18:04:51 -07:00
save-xml.c Add hashes to images 2015-02-27 06:29:44 +01:00
sha1.c
sha1.h
statistics.c Cylinders which have lesser pressure in the end are used 2015-01-29 07:35:15 -08:00
statistics.h Make gas use statistics be coherent and more complete 2014-08-06 09:14:34 -07:00
strtod.c
subsurface-configure.pri More flexibility when linking statically against libgit2 2015-02-22 08:11:16 -08:00
subsurface-gen-version.pri PRI: include some variables in the version generation 2015-02-15 14:06:48 -08:00
subsurface-icon.svg
subsurface-install.pri Allow overriding makensis program 2014-12-31 08:48:27 -08:00
subsurface.1 Replace other references to hohndel.org 2014-11-18 13:13:39 +00:00
subsurface.desktop Add a trailing ';' to the Keywords in the subsurface.desktop file 2014-12-22 15:55:04 -08:00
subsurface.pro Import Datatrak/WLog files 2015-03-10 10:03:08 -07:00
subsurface.qrc Hook up DiveLog import 2015-02-17 14:07:01 -08:00
subsurfacestartup.c add and use a version.c / version.h pair 2015-02-15 13:26:51 -08:00
subsurfacestartup.h Free strduped prefs before exit 2014-12-18 07:20:10 -08:00
subsurfacesysinfo.cpp Correctly detect more Linux distributions 2015-02-18 07:42:48 -08:00
subsurfacesysinfo.h Fix Subsurface build with Qt 5.4.1 and later 2015-02-15 06:00:52 -08:00
SupportedDivecomputers.html Make SupportedDivecomputer HTML more compact 2014-08-09 12:04:48 -07:00
SupportedDivecomputers.txt Improve generation of list of supported dive computers 2014-08-07 13:53:09 -07:00
terms Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
time.c
TODO.CCR Update todo list for CCR 2014-11-18 13:15:43 +00:00
uemis-downloader.c Change UEMIS infrastructure to use dive sites 2015-02-12 22:45:47 -08:00
uemis.c Change UEMIS infrastructure to use dive sites 2015-02-12 22:45:47 -08:00
uemis.h Change UEMIS infrastructure to use dive sites 2015-02-12 22:45:47 -08:00
units.h Fix picture loading 2014-07-08 12:29:06 -07:00
version.c add and use a version.c / version.h pair 2015-02-15 13:26:51 -08:00
version.h add and use a version.c / version.h pair 2015-02-15 13:26:51 -08:00
webservice.h
windows.c windows.c: small cleaup in the wrapper functions 2014-11-13 12:01:00 -08:00
worldmap-options.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
worldmap-save.c Fix error on HTML worldmap exports. 2015-02-17 08:52:29 -08:00
worldmap-save.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
wreck.jpg

This is the README file for Subsurface 4.4.1

Please check the ReleaseNotes.txt for details about new features and
changes since Subsurface 4.4 (and earlier versions).

Subsurface can be found at http://subsurface-divelog.org

Our user forum is at http://subsurface-divelog.org/user-forum/
We also try to respond to questions in the ScubaBoard.com dive software
forum at http://www.scubaboard.com/forums/dive-software/

Report bugs and issues at http://trac.subsurface-divelog.org

License: GPLv2

You can get the sources to the latest development version from the git
repository:

git clone git://git.subsurface-divelog.org/subsurface.git .

You can also browse the sources via gitweb at the same site.

If you want the latest release (instead of the bleeding edge
development version) you can either get this via git or the release tar
ball. After cloning run the following command:

git checkout v4.4.1  (or whatever the last release is)

or download a tar ball from:

http://subsurface-divelog.org/downloads/Subsurface-4.4.1.tgz

Detailed build instructions can be found in the INSTALL file.

Basic Usage:
============

Install and start from the desktop, or you can run it locally from the
build directory:

On Linux:

$ ./subsurface

On Mac:

$ open Subsurface.app

Native builds on Windows are not really supported (the official Windows
installers are both cross-built on Linux).

You can give a data file as command line argument, or (once you have
set this up in the Preferences) Subsurface picks a default file for
you when started from the desktop or without an argument.

If you have a dive computer supported by libdivecomputer, you can just
select "Import from Divecomputer" from the "Import" menu, select which
dive computer you have (and where it is connected if you need to), and
hit "OK".

The latest list of supported dive computers can be found in the file
SupportedDivecomputers.txt.

Much more detailed end user instructions can be found from inside
Subsurface by selecting Help (typically F1). When building from source
this is also available as Documentation/user-manual.html. The
documentation for the latest release is also available on-line
http://subsurface-divelog.org/documentation/


Contributing:
=============

There is a mailing list for developers: subsurface@subsurface-divelog.org
Go to http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
to subscribe.

If you want to contribute code, please either send signed-off patches or
a pull request with signed-off commits.  If you don't sign off on them,
we will not accept them. This means adding a line that says
"Signed-off-by: Name <email>" at the end of each commit, indicating that
you wrote the code and have the right to pass it on as an open source
patch.

See: http://developercertificate.org/

Also, please write good git commit messages.  A good commit message
looks like this:

	Header line: explain the commit in one line (use the imperative)

	Body of commit message is a few lines of text, explaining things
	in more detail, possibly giving some background about the issue
	being fixed, etc etc.

	The body of the commit message can be several paragraphs, and
	please do proper word-wrap and keep columns shorter than about
	74 characters or so. That way "git log" will show things
	nicely even when it's indented.

	Make sure you explain your solution and why you're doing what you're
	doing, as opposed to describing what you're doing. Reviewers and your
	future self can read the patch, but might not understand why a
	particular solution was implemented.

	Reported-by: whoever-reported-it
	Signed-off-by: Your Name <youremail@yourhost.com>

where that header line really should be meaningful, and really should be
just one line.  That header line is what is shown by tools like gitk and
shortlog, and should summarize the change in one readable line of text,
independently of the longer explanation. Please use verbs in the
imperative in the commit message, as in "Fix bug that...", "Add
file/feature ...", or "Make Subsurface..."


A bit of Subsurface history:
============================

In fall of 2011, when a forced lull in kernel development gave him an
opportunity to start on a new endeavor, Linus Torvalds decided to tackle
his frustration with the lack of decent divelog software on Linux.

Subsurface is the result of the work of him and a team of developers since
then. It now supports Linux, Windows and MacOS and allows data import from
a large number of dive computers and several existing divelog programs. It
provides advanced visualization of the key information provided by a
modern dive computer and allows the user to track a wide variety of data
about their diving.

In fall of 2012 Dirk Hohndel took over as maintainer of Subsurface.