subsurface/qt-ui
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
..
css Fix TableWidget ( equipment ones ) on dark scheme. 2013-12-12 03:26:39 +01:00
marble Resync included header with upstream 2014-01-15 15:49:50 +07:00
profile Deco artefacts with low GFlow 2014-06-25 17:57:21 +08:00
about.cpp Quit Subsurface with about window in front 2014-04-25 10:21:55 -07:00
about.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
about.ui SubsurfaceAbout class cleanup. 2014-02-08 08:00:27 -08:00
completionmodels.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
completionmodels.h Put include guard to every header 2014-02-11 12:37:01 -08:00
divecomputermanagementdialog.cpp Fixing Hotkeys inconsistency for divecomputer/pref/numbering windows 2014-04-25 13:24:39 -07:00
divecomputermanagementdialog.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
divecomputermanagementdialog.ui Make some dialogs modal to MainWindow 2014-03-12 10:14:17 -07:00
divelistview.cpp Fix linked list corruption, move code to C. 2014-06-03 16:39:06 -07:00
divelistview.h Fix crash on adding / removing a dives from add menu 2014-05-28 17:03:47 -07:00
divelogexportdialog.cpp HTML: Overwrite all template files if exist 2014-06-24 21:40:26 +08:00
divelogexportdialog.h HTML: Overwrite all template files if exist 2014-06-24 21:40:26 +08:00
divelogexportdialog.ui HTML: user export options ask for numbering 2014-06-24 21:39:58 +08:00
divelogimportdialog.cpp Ctrl-W and -Q support for GPS, divelogs.de, divecomputer and CVS import 2014-04-25 10:47:44 -07:00
divelogimportdialog.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
divelogimportdialog.ui Fix layout of import CVS 2014-06-11 14:21:09 -07:00
divepicturewidget.cpp Prevent using uninitialized variable 2014-06-13 07:11:06 -07:00
divepicturewidget.h Another futile attempt to keep whitespace consistent 2014-06-03 16:49:56 -07:00
diveplanner.cpp Hook up UI elements for ascent rates to planner 2014-06-25 13:48:44 +08:00
diveplanner.h Hook up UI elements for ascent rates to planner 2014-06-25 13:48:44 +08:00
diveplanner.ui Drop like a stone mode in planner 2014-06-24 17:26:31 +08:00
downloadfromdivecomputer.cpp Rework slot to quiet down Qt5 warning 2014-05-26 06:25:00 -07:00
downloadfromdivecomputer.h Rework slot to quiet down Qt5 warning 2014-05-26 06:25:00 -07:00
downloadfromdivecomputer.ui Enable libdivecomputer log or dump from the UI 2013-12-24 16:26:00 -08:00
globe.cpp Globe: do a better job detecting double clicks and setting GPS coordinates 2014-06-11 09:31:01 -07:00
globe.h Globe: do a better job detecting double clicks and setting GPS coordinates 2014-06-11 09:31:01 -07:00
graphicsview-common.cpp Make heartrate grid less confusing 2014-04-28 12:45:42 -07:00
graphicsview-common.h Make heartrate grid less confusing 2014-04-28 12:45:42 -07:00
groupedlineedit.cpp Much, much smarter way of finding the Tags 2014-05-27 20:03:29 -07:00
groupedlineedit.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
kmessagewidget.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
kmessagewidget.h Another small tweak to whitespace tool 2014-03-05 13:02:23 -08:00
maintab.cpp Added the new Date Widget on the MainTab. 2014-06-20 15:41:42 -07:00
maintab.h Added the new Date Widget on the MainTab. 2014-06-20 15:41:42 -07:00
maintab.ui Added focus handling to the Date Picker. 2014-06-20 15:41:53 -07:00
mainwindow.cpp Fix NO_PRINTING building again 2014-06-24 17:18:58 +08:00
mainwindow.h Start a user survey dialog 2014-06-13 14:03:51 -07:00
mainwindow.ui Planner: don't show the planner panes by default 2014-06-12 09:51:10 -07:00
modeldelegates.cpp Change the Star Widget to use QImage instead of QPixmap 2014-06-20 15:43:10 -07:00
modeldelegates.h Better handling of mouse on the delegates ( Equipment Edition ) 2014-04-25 07:19:18 -07:00
models.cpp Be more consistent in partial pressure naming 2014-06-23 06:48:54 +08:00
models.h Planner: Re-enable using the new profile. 2014-05-26 13:17:32 -07:00
plannerSettings.ui Hook up UI elements for ascent rates to planner 2014-06-25 13:48:44 +08:00
preferences.cpp Add ability to reset the settings 2014-06-25 17:46:51 +08:00
preferences.h Add ability to reset the settings 2014-06-25 17:46:51 +08:00
preferences.ui Add ability to reset the settings 2014-06-25 17:46:51 +08:00
printdialog.cpp Print dialog: make Ctrl-Q and Ctlr-W work 2014-04-25 10:27:44 -07:00
printdialog.h Remove printing when building for Android 2014-03-27 10:42:07 -07:00
printlayout.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
printlayout.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
printoptions.cpp Print: adjustments to PrintDialog 2013-11-30 18:56:25 +02:00
printoptions.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
printoptions.ui UI adjustments in Print Dialog Window 2014-04-16 12:17:49 -07:00
renumber.ui Make some dialogs modal to MainWindow 2014-03-12 10:14:17 -07:00
shiftimagetimes.ui Fix layout on the Shift-Image-Time import dialog 2014-06-01 15:43:43 -07:00
shifttimes.ui Add current time and adjusted time to gui when adjusting dive's timestamp 2014-03-21 21:26:09 -07:00
simplewidgets.cpp Listen to EnabledChange to gray out the DatePicker 2014-06-20 15:43:13 -07:00
simplewidgets.h Listen to EnabledChange to gray out the DatePicker 2014-06-20 15:43:13 -07:00
starwidget.cpp Change the Star Widget to use QImage instead of QPixmap 2014-06-20 15:43:10 -07:00
starwidget.h Change the Star Widget to use QImage instead of QPixmap 2014-06-20 15:43:10 -07:00
subsurfacewebservices.cpp Look around DCs dive time for automatically fixed positions. 2014-06-24 21:59:18 +08:00
subsurfacewebservices.h Implementing export dialog 2014-05-21 03:31:43 +09:00
tableview.cpp Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tableview.h Massive automated whitespace cleanup 2014-02-27 20:09:57 -08:00
tableview.ui Remove more unused windowTitle properties 2013-11-29 11:02:15 -08:00
tagwidget.cpp Remove some unused variables 2014-06-01 15:41:12 -07:00
tagwidget.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
updatemanager.cpp Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
updatemanager.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
usermanual.cpp Make sure Windows can find the user manual 2014-06-09 13:42:16 -07:00
usermanual.h Gratuitous whitespace changes 2014-05-22 11:40:22 -07:00
usermanual.ui Close search panel by button click 2014-02-10 07:12:35 -08:00
usersurvey.cpp User survey: small updates 2014-06-14 14:35:17 -07:00
usersurvey.h Start a user survey dialog 2014-06-13 14:03:51 -07:00
usersurvey.ui User survey: small updates 2014-06-14 14:35:17 -07:00
webservices.ui Add option to save userid in data files 2014-04-14 09:40:30 -07:00