mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: Add option to treat O2 as narcotic
When computing the best mix for a target depth, for helium, one can either require that the partial pressure of N2 is the same as at the target depth or the partial pressure of N2 plus O2. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
43b16f0810
commit
9c8fbe494d
12 changed files with 121 additions and 86 deletions
|
@ -451,6 +451,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
|||
ui.backgasBreaks->setChecked(prefs.doo2breaks);
|
||||
setBailout(false);
|
||||
setBailoutVisibility(false);
|
||||
ui.o2narcotic->setChecked(prefs.o2narcotic);
|
||||
ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
|
||||
ui.switch_at_req_stop->setChecked(prefs.switch_at_req_stop);
|
||||
ui.min_switch_duration->setValue(prefs.min_switch_duration / 60);
|
||||
|
@ -496,6 +497,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
|||
connect(ui.vpmb_conservatism, SIGNAL(valueChanged(int)), plannerModel, SLOT(setVpmbConservatism(int)));
|
||||
connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
|
||||
connect(ui.bailout, SIGNAL(toggled(bool)), this, SLOT(setBailout(bool)));
|
||||
connect(ui.o2narcotic, SIGNAL(toggled(bool)), this, SLOT(setO2narcotic(bool)));
|
||||
connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
|
||||
connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
|
||||
connect(ui.surface_segment, SIGNAL(valueChanged(int)), plannerModel, SLOT(setSurfaceSegment(int)));
|
||||
|
@ -504,6 +506,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
|||
|
||||
connect(ui.bottompo2, SIGNAL(valueChanged(double)), CylindersModel::instance(), SLOT(updateBestMixes()));
|
||||
connect(ui.bestmixEND, SIGNAL(valueChanged(int)), CylindersModel::instance(), SLOT(updateBestMixes()));
|
||||
connect(ui.o2narcotic, SIGNAL(toggled(bool)), CylindersModel::instance(), SLOT(updateBestMixes()));
|
||||
|
||||
connect(modeMapper, SIGNAL(mapped(int)), this, SLOT(disableDecoElements(int)));
|
||||
connect(ui.ascRate75, SIGNAL(valueChanged(int)), this, SLOT(setAscrate75(int)));
|
||||
|
@ -679,6 +682,12 @@ void PlannerSettingsWidget::setBailout(bool dobailout)
|
|||
plannerModel->emitDataChanged();
|
||||
}
|
||||
|
||||
void PlannerSettingsWidget::setO2narcotic(bool o2narcotic)
|
||||
{
|
||||
qPrefDivePlanner::instance()->set_o2narcotic(o2narcotic);
|
||||
plannerModel->emitDataChanged();
|
||||
}
|
||||
|
||||
void PlannerSettingsWidget::setBailoutVisibility(int mode)
|
||||
{
|
||||
ui.bailout->setDisabled(!(mode == CCR || mode == PSCR));
|
||||
|
|
|
@ -86,6 +86,7 @@ slots:
|
|||
void setBestmixEND(int depth);
|
||||
void setBackgasBreaks(bool dobreaks);
|
||||
void setBailout(bool dobailout);
|
||||
void setO2narcotic(bool o2narcotic);
|
||||
void disableDecoElements(int mode);
|
||||
void disableBackgasBreaks(bool enabled);
|
||||
void setDiveMode(int mode);
|
||||
|
|
|
@ -561,6 +561,83 @@
|
|||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="Notes">
|
||||
<property name="title">
|
||||
<string>Notes</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="verbatim_plan">
|
||||
<property name="text">
|
||||
<string>Verbatim dive plan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="display_transitions">
|
||||
<property name="toolTip">
|
||||
<string>In diveplan, list transitions or treat them as implicit</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display transitions in deco</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="display_runtime">
|
||||
<property name="toolTip">
|
||||
<string>In dive plan, show runtime (absolute time) of stops</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display runtime</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="display_duration">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>In dive plan, show duration (relative time) of stops</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display segment duration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="display_variations">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Compute variations of plan (performance cost)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display plan variations</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="decoStopSAC">
|
||||
<property name="suffix">
|
||||
|
@ -581,7 +658,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -594,7 +671,7 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -692,83 +769,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="Notes">
|
||||
<property name="title">
|
||||
<string>Notes</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="verbatim_plan">
|
||||
<property name="text">
|
||||
<string>Verbatim dive plan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="display_transitions">
|
||||
<property name="toolTip">
|
||||
<string>In diveplan, list transitions or treat them as implicit</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display transitions in deco</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="display_runtime">
|
||||
<property name="toolTip">
|
||||
<string>In dive plan, show runtime (absolute time) of stops</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display runtime</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="display_duration">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>In dive plan, show duration (relative time) of stops</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display segment duration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="display_variations">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Compute variations of plan (performance cost)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display plan variations</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="decopO2">
|
||||
<property name="text">
|
||||
|
@ -831,6 +831,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="o2narcotic">
|
||||
<property name="toolTip">
|
||||
<string>Treat oxygen as narcotic when computing best mix</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>O₂ narcotic</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue