subsurface/qt-ui/diveplanner.ui
Robert Helling 9ddef367b5 Improvement for various bits of the planner
Rewrite of the actual planner logic. Now ascend to the next potential stop
depth. There the state is cached and we try to ascend to the next stop
depth. If we hit the ceiling while doing that we go back to the cached
state and wait there for a minute. Then we try again. Then loop.

Converted all depth related variables from unsigned int to int. During
planning, in a time step the current depth can temporarily be negative and
comparisons of a negative int with an unsigned it have not the result I
expected ( (int) -2 < (unsigned int) 3 turns out to be false). And we
don’t really need the 32nd bit that unsigned buys us for depths.

Deco stops are now shown in the same table as manually entered stops in
boldface (I removed the second table to save screen estate).

The gas shown in the table is still misleading as it means the gas used on
the segment leading up to that event.

The update of the profile only works partially upon changes in the list of
available gases.

Treatment of various gases is basically there but needs some more love.

The ascent velocity is now provided by a function that takes the current
depth as argument. Currently it always returns 10m/min but that will later
be variable (and hopefully user configurable).

The profile is not redrawn while deco is computed (avoiding an infinite
recursion).

The table got a new column for the duration of a segment while the old
“duration” column was renamed “Runtime” to reflect what it actually shows.
Currently, only the run time but not the duration are editable.

All deco gases are used from the depth where their pO2 is 1.4bar. This
should become more flexible.

Calculation of the pressure drop in cylinders without configured volumes
is suppressed. This solves a problem with the planner crashing when saving
a dive where not all cylinders had been manually given a volume.

[Short rant break: Treating 0/0 as air bites back at so many places. E.g.
Cylinder data is initialized with memsetting the whole structures to 0.
Then later suddenly this totally unconfigured cylinder is being treated as
it would contain air. Maybe at some point this was a feature. But it lead
to a naughty bug which took me over an hour to resolve. We should
seriously reconsider this choice and better move to 209/0 being air if
changing this everywhere is not too much trouble]

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-17 07:29:44 -07:00

201 lines
5.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DivePlanner</class>
<widget class="QWidget" name="DivePlanner">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>515</width>
<height>591</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="6" column="1">
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>515</width>
<height>591</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<item row="1" column="1">
<widget class="QLineEdit" name="ATMPressure"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Bottom SAC</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>GFHigh</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>SAC on DECO Stop</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="bottomSAC"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="decoStopSAC"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>GFLow</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QSpinBox" name="gflow">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>150</number>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="gfhigh">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>150</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="lastStop">
<property name="text">
<string>Last Stop at 6m</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="TableView" name="cylinderTableWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="TableView" name="tableWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Abort|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QTimeEdit" name="startTime"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Start Time</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>ATM Pressure</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>TableView</class>
<extends>QWidget</extends>
<header>tableview.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>