1
0
Fork 0

Allow setting VC for on-final start

This commit is contained in:
James Turner 2018-06-28 16:42:38 +01:00
parent aa61c55168
commit 1a7f513fb1
3 changed files with 37 additions and 1 deletions

View file

@ -1031,6 +1031,10 @@ void LocationController::onCollectConfig()
m_config->setArg("glideslope", std::string("3.0"));
m_config->setArg("offset-distance", QString::number(m_offsetNm));
m_config->setArg("on-ground", std::string("false"));
if (m_speedEnabled) {
m_config->setArg("vc", QString::number(m_airspeedKnots));
}
}
} else if (m_airportLocation->type() == FGPositioned::HELIPORT) {
m_config->setArg("runway", QString::fromStdString(m_detailLocation->ident()));

View file

@ -161,6 +161,8 @@ Item {
// no offset for helipads
visible: !isHeliport
readonly property bool enableOnFinal: runwayRadio.selected && _location.onFinal
ToggleSwitch {
id: onFinalToggle
label: qsTr("On final approach at ")
@ -183,12 +185,40 @@ Item {
live: true
anchors.verticalCenter: parent.verticalCenter
enabled: runwayRadio.selected && onFinalToggle.checked
enabled: parent.enableOnFinal
}
StyledText {
text: qsTr(" from the threshold")
anchors.verticalCenter: parent.verticalCenter
enabled: parent.enableOnFinal
}
Item {
// padding
width: Style.strutSize
height: 1
}
ToggleSwitch {
id: airspeedToggle
enabled: parent.enableOnFinal
checked: _location.speedEnabled
onCheckedChanged: _location.speedEnabled = checked;
anchors.verticalCenter: parent.verticalCenter
}
IntegerSpinbox {
label: qsTr("Airspeed:")
suffix: "kts"
min: 0
max: 10000 // more for spaceships?
step: 5
maxDigits: 5
enabled: _location.speedEnabled && parent.enableOnFinal
value: _location.airspeedKnots
onCommit: _location.airspeedKnots = newValue
anchors.verticalCenter: parent.verticalCenter
}
}
@ -196,6 +226,7 @@ Item {
x: Style.strutSize
// no localizer for helipads
visible: !isHeliport
enabled:runwayRadio.selected
// enable if selected runway has ILS
label: qsTr("Tune navigation radio (NAV1) to runway localizer")

View file

@ -3,6 +3,7 @@ import QtQuick 2.4
import "."
Text {
id: root
font.pixelSize: Style.baseFontPixelSize
property bool enabled: true