This is the official upstream of the Subsurface divelog program
Find a file
Robert C. Helling e38a473a4d Deco artefacts with low GFlow
In a dive, when you choose a very low GFlow (like 5 or 9) and a trimix
with quite some He (12/48 in the example) and descend fast, the ceiling
seems to do strange things in the first minutes of the dive (very very
deep for example or jumping around).

To understand what is going on we have to recall what gradient factors do
in detail: Plain Buehlmann gives you for each tissue a maximal inert gas
pressure that is a straight line when plotted against the ambient
pressure. So for each depth (=ambient pressure) there is a maximally
allowed over-pressure.

The idea of gradient factors is that one does not use all the possible
over-pressure that Buehlmann gives us but only a depth dependent fraction.
GFhigh is the fraction of the possible over-pressure at the surface while
GFlow is the fraction at the first deco stop. In between, the fraction is
linearly interpolated. As the Buehlmann over-pressure is increasing with
depth and typically also the allowed overpressure after applications of
gradient factors increases with depth or said differently: the tissue
saturation has to be lower if the diver wants to ascent.

The main problem is: What is the first stop (where to apply GFlow)? In a
planned dive, we could take the first deco stop, but in a real dive from a
dive computer download it is impossible to say what constitutes a stop and
what is only a slow ascent?

What I have used so far is not exactly the first stop but rather the first
theoretical stop: During all of the dive, I have calculated the ceiling
under the assumption that GFlow applies everywhere (and not just at a
single depth). The deepest of these ceilings I have used as the “first
stop depth”, the depth at which GFlow applies.

Even more, I only wanted to use the information that a diver has during
the dive, so I actually only considered the ceilings in the past (and not
in the future of a given sample).

But this brings with it the problem that early in the dive, in particular
during the descent the lowest ceiling so far is very shallow (as not much
gas has built up in the body so far).

This problem now interferes with a second one: If at the start of the dive
when the all compartments have 790mbar N2 the diver starts breathing a
He-heavy mix (like 12/48) and descents fast the He builds up in the
tissues before the N2 can diffuse out. So right at the start, we already
encounter high tissue loadings.

If now we have a large difference between GFhigh and GFlow but they apply
at very similar depth (the surface and a very shallow depth of the deepest
ceiling (which for a non-decompression dive would be theoretically at
negative depth) so far) it can happen that the linear interpolation as
opposite slope then in the typical case above: The allowed over-pressure
is degreasing with depth, shallower depth do not require lower gas loading
in the tissue (i.e. can be reached after further off-gasing) but but
tolerate higher loadings. In that situation the ceiling disappears (or is
rather a floor).

So far, I got rid of that problem, by stating that the minimum depth for
GFlow was 20m (after all, GFlow is about deep stops, so it should better
not be too shallow). Now the dive reported in ticket #549 takes values to
an extreme in such away that 20m (which is determined by
buehlmann_config.gf_low_position_min in deco.c) was not enough to prevent
this inversion problem (or in a milder form that the interpolation of
gradient factors is in fact an extrapolation with quite extreme values).

This patch that gets rid of the problem for the dive described above but
still it is possible to find (more extreme) parameter choices that lead to
non-realistic ceilings.

Let me close by pointing out that all this is only about the descent, as
it is about too shallow depth for GFlow. So no real deco (i.e. later part
of the dive) is inflicted. This is only about a theoretical ceiling
displayed possibly in the first minutes of a dive. So this is more an
aesthetically than a practical problem.

Fixes #549

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25 17:57:21 +08:00
.tx Add simple glossary 2013-12-29 10:34:12 -08:00
android Add missed xml-end tag in AndroidManifest 2014-06-25 16:50:40 +08:00
appdata Make the appdata file validate 2014-01-24 07:36:25 -08:00
dives Add beginning of pretend CCR XML file 2014-06-11 19:03:30 -07:00
Documentation Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
icons Added a background for the ShowDate widget. 2014-06-20 15:41:28 -07:00
marbledata Add a CMake based buildsystem for the tests. 2014-04-14 11:49:49 -07:00
packaging HTML export: fix packaging of theme dir 2014-06-08 07:54:11 -07:00
qt-ui Deco artefacts with low GFlow 2014-06-25 17:57:21 +08:00
scripts Small tweaks to our whitespace handling 2014-05-22 11:20:04 -07:00
tests Moved code around to make possible to compile the C part alone. 2014-04-17 08:46:29 -07:00
theme HTML: Wide Javascript code cleaning 2014-06-24 21:40:15 +08:00
translations Latest translation from Transifex 2014-05-07 21:25:53 -07:00
xslt Marginal optimization of UDDF import 2014-05-05 09:00:26 -07:00
.clang-format Small tweaks to our whitespace handling 2014-05-22 11:20:04 -07:00
.gitattributes Ignore some files when archiving. 2013-05-12 07:25:47 -07:00
.gitignore Template for subsurface android package 2014-06-25 13:50:21 +08:00
android.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
CMakeLists.txt Fixed compilation for CMake. 2014-06-20 15:41:32 -07:00
cochran.c Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
CodingStyle CodingStyle "to" "too" typo 2014-05-10 09:41:17 -07:00
color.h Make heartrate grid less confusing 2014-04-28 12:45:42 -07:00
deco.c Deco artefacts with low GFlow 2014-06-25 17:57:21 +08:00
deco.h Put include guard to every header 2014-02-11 12:37:01 -08:00
descriptor3.tsv Add structured file with list of supported dive computers 2013-12-13 16:26:01 -08:00
device.c Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
device.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
display.h Divecomputer download: try to offer only those devices that make sense 2014-05-19 20:12:55 +09:00
dive.c Allow the user to delete a dive computer from a dive 2014-06-11 13:56:33 -07:00
dive.h Use __typeof__ instead of typeof in the header 2014-06-18 04:44:53 -07:00
divecomputer.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
divecomputer.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
divelist.c Deco artefacts with low GFlow 2014-06-25 17:57:21 +08:00
divelist.h Dive list: move trip merging logic into divelist.c 2014-05-24 14:03:36 -07:00
equipment.c Add ALU7 to common cylinders 2014-06-25 16:57:23 +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 Convert other users of showError() to the new world order 2014-03-14 12:36:06 -07:00
file.h Put include guard to every header 2014-02-11 12:37:01 -08:00
gettext.h Add comment for "below floor" event 2013-11-29 11:27:41 -08:00
gettextfromc.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
gettextfromc.h Explicitly include needed include file 2014-04-29 22:35:34 -07:00
gpl-2.0.txt Add a copy of the GPL v2 to the project 2011-09-26 11:18:28 -07:00
helpers.h Add gas consumption statistic for selected dives 2014-06-09 22:48:21 -07:00
INSTALL Update cross building for Windows on Linux 2014-03-07 16:33:00 -08:00
libdivecomputer.c Don't silently ignore suspcious data from libdivecomputer 2014-06-11 07:15:40 -07:00
libdivecomputer.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
linux.c Download from dive computer: Fix the broken selection of devices 2014-05-19 20:12:58 +09:00
load-git.c CCR code: Change to sample structure 2014-06-03 17:05:25 -07:00
macos.c Download from dive computer: Fix the broken selection of devices 2014-05-19 20:12:58 +09:00
main.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
membuffer.c HTML: Better quoting to the export strings 2014-06-06 10:08:09 -07:00
membuffer.h HTML: Better quoting to the export strings 2014-06-06 10:08:09 -07:00
parse-xml.c Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
planner.c Hook up UI elements for ascent rates to planner 2014-06-25 13:48:44 +08:00
planner.h Disclaimer included in the printed diveplan 2014-06-04 14:45:54 -07:00
pref.h Hook up UI elements for ascent rates to planner 2014-06-25 13:48:44 +08:00
profile.c Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
profile.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
qt-gui.cpp Fix tank size display 2014-06-12 15:39:42 -07:00
qt-gui.h Main: separate the QApplication and UI creation 2014-03-19 09:37:49 -07:00
qthelper.cpp Minor code readability improvement 2014-06-10 13:38:51 -07:00
qthelper.h Rewrite dive edit logic 2014-06-02 23:38:36 -07:00
README Getting ready for 4.1 2014-05-07 21:35:40 -07:00
Readme.testing Information on writing test cases 2014-04-15 11:03:38 -07:00
ReleaseNotes.txt Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
satellite.svg Satellite icon diet 2013-01-22 22:25:03 -08:00
save-git.c CCR code: Change to sample structure 2014-06-03 17:05:25 -07:00
save-html.c HTML: Add export list only option 2014-06-24 21:39:10 +08:00
save-html.h HTML: Add export list only option 2014-06-24 21:39:10 +08:00
save-xml.c Picture handling: switch to stronger typed offset 2014-06-09 09:38:50 -07:00
sha1.c Another small tweak to whitespace tool 2014-03-05 13:02:23 -08:00
sha1.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
statistics.c Remove is_air() and convert its users to gasmix 2014-06-01 20:57:11 -07:00
statistics.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
strtod.c Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
subsurface-configure.pri Make system detection compile on Mac 2014-06-14 13:29:13 -07:00
subsurface-gen-version.pri Fix building in git shallow clones 2014-01-21 11:35:31 -08:00
subsurface-icon.svg Rename subsurface.svg to subsurface-icon.svg 2013-02-02 21:27:15 +01:00
subsurface-install.pri Template for subsurface android package 2014-06-25 13:50:21 +08:00
subsurface.1 Tweaking man page to better reflect current status 2013-12-14 20:19:58 -08:00
subsurface.desktop The Subsurface icon has been renamed, the .desktop must be adjusted. 2013-02-14 09:57:13 -08:00
subsurface.pro Template for subsurface android package 2014-06-25 13:50:21 +08:00
subsurface.qrc Added a Partly Functional Date Picker widget. 2014-06-20 15:41:38 -07:00
subsurfacestartup.c Hook up UI elements for ascent rates to planner 2014-06-25 13:48:44 +08:00
subsurfacestartup.h Put include guard to every header 2014-02-11 12:37:01 -08:00
subsurfacesysinfo.cpp Fixed compilation for CMake. 2014-06-20 15:41:32 -07:00
subsurfacesysinfo.h Clean up SubsurfaceSysInfo by inheriting QSysInfo 2014-06-18 04:55:23 -07:00
SupportedDivecomputers.html Make the SupportedDivecomputers.html match web site 2013-12-15 08:16:06 -08:00
SupportedDivecomputers.txt Convert structure list of supported dive computers to txt / html 2013-12-13 16:44:51 -08:00
terms Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
time.c Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
uemis-downloader.c Migrate code to for_each_dive and for_each_dc 2014-05-20 11:51:40 +09:00
uemis.c Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
uemis.h Uemis GPS location tracking seems backwards 2014-03-08 16:55:25 -08:00
units.h CCR code: Change to sample structure 2014-06-03 17:05:25 -07:00
webservice.h Put include guard to every header 2014-02-11 12:37:01 -08:00
windows.c windows.c: prevent a warning due to #define _WIN32_WINNT... 2014-06-09 16:55:05 -07:00
worldmap-options.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
worldmap-save.c HTML: Report saving to file errors. 2014-06-15 09:17:45 -07:00
worldmap-save.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
wreck.jpg Include images in profile 2014-02-06 11:29:23 -08:00

This is the README file for Subsurface 4.1

This is mainly a bug fix release, but there are rather significant changes
under the hood. Check the ReleaseNotes.txt for details.

License: GPLv2

Subsurface can be found at http://subsurface.hohndel.org

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

git clone git://subsurface.hohndel.org/subsurface.git .

You can also browse the sources via gitweb at git.hohndel.org

If you want the latest release (instead of the bleeding edge
development version) you can either get this via

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

if you have already cloned the git repository as shown above or you
can get a tar ball from

http://subsurface.hohndel.org/downloads/Subsurface-4.1.tgz


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

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

$ ./subsurface

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


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

There is a mailing list for developers: subsurface@hohndel.org
Go to http://lists.hohndel.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