2002-12-22 20:22:11 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<PropertyList>
|
2004-05-12 15:37:17 +00:00
|
|
|
<name>location-in-air</name>
|
|
|
|
<layout>vbox</layout>
|
2006-03-08 10:50:14 +00:00
|
|
|
<halign>left</halign>
|
|
|
|
|
|
|
|
<nasal>
|
|
|
|
<open>
|
2011-08-22 18:01:55 +00:00
|
|
|
var p = props.globals.getNode("/sim/gui/dialogs/location-in-air/", 1);
|
2020-06-05 10:39:06 +00:00
|
|
|
|
|
|
|
if (getprop("/sim/presets/carrier") != nil and getprop("/sim/presets/carrier") != ""){
|
|
|
|
setprop("/sim/gui/dialogs/location-in-air/carrier-active",1);
|
|
|
|
setprop("/sim/gui/dialogs/location-in-air/airport",0);
|
|
|
|
} else {
|
|
|
|
setprop("/sim/gui/dialogs/location-in-air/carrier-active",0);
|
|
|
|
setprop("/sim/gui/dialogs/location-in-air/airport",1);
|
|
|
|
}
|
|
|
|
|
2020-04-18 17:10:17 +00:00
|
|
|
var dlg_root = cmdarg();
|
2011-08-22 18:01:55 +00:00
|
|
|
var mode = {
|
2006-03-22 22:08:15 +00:00
|
|
|
airport: p.getNode("airport", 1),
|
|
|
|
lonlat: p.getNode("lonlat", 1),
|
|
|
|
vor: p.getNode("vor", 1),
|
|
|
|
ndb: p.getNode("ndb", 1),
|
|
|
|
fix: p.getNode("fix", 1),
|
2020-04-09 21:40:58 +00:00
|
|
|
carrier: p.getNode("carrier-active", 1),
|
2006-03-08 10:50:14 +00:00
|
|
|
};
|
|
|
|
|
2011-08-22 18:01:55 +00:00
|
|
|
var set_radio = func(m) {
|
|
|
|
foreach (var k; keys(mode)) {
|
2006-03-08 10:50:14 +00:00
|
|
|
mode[k].setBoolValue(m == k);
|
|
|
|
}
|
2020-04-18 17:10:17 +00:00
|
|
|
};
|
2006-03-08 10:50:14 +00:00
|
|
|
|
2011-08-22 18:01:55 +00:00
|
|
|
var initialized = 0;
|
|
|
|
foreach (var k; keys(mode)) {
|
2006-03-08 10:50:14 +00:00
|
|
|
if (mode[k].getType() == "NONE") {
|
|
|
|
mode[k].setBoolValue(0);
|
|
|
|
}
|
|
|
|
initialized += mode[k].getBoolValue();
|
|
|
|
}
|
|
|
|
if (!initialized) {
|
|
|
|
set_radio("airport");
|
|
|
|
}
|
2011-08-22 18:01:55 +00:00
|
|
|
var pickNearest = func(type,propname,freqpropname) {
|
|
|
|
|
|
|
|
var found = navinfo(type,getprop(propname));
|
|
|
|
if( found == nil or size(found) == 0 ) {
|
2020-06-28 06:27:19 +00:00
|
|
|
logrint(LOG_WARN, type, " ", getprop(propname), " NOT found");
|
2011-08-22 18:01:55 +00:00
|
|
|
setprop(propname, "");
|
|
|
|
setprop(freqpropname, "");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setprop(propname, found[0].id);
|
|
|
|
setprop(freqpropname, found[0].frequency / 100.0);
|
2017-09-19 16:54:00 +00:00
|
|
|
|
2011-08-22 18:01:55 +00:00
|
|
|
}
|
2020-04-18 17:10:17 +00:00
|
|
|
|
|
|
|
var populateCarrierCombo = func() {
|
|
|
|
# Fill the carrier-selection combo box with a list of available carriers
|
|
|
|
var combo = gui.findElementByName( dlg_root, "carrier-selection" );
|
|
|
|
var carriers = props.globals.getNode( "/ai/models" );
|
|
|
|
|
|
|
|
combo.removeChildren("value");
|
2022-03-06 18:53:41 +00:00
|
|
|
if (carriers == nil)
|
|
|
|
return;
|
|
|
|
|
2020-04-18 17:10:17 +00:00
|
|
|
foreach (var carrier; carriers.getChildren("carrier")) {
|
2020-06-05 10:39:06 +00:00
|
|
|
nameNode = carrier.getNode("name");
|
|
|
|
if(nameNode != nil and nameNode.getValue() != nil)
|
|
|
|
combo.addChild("value").setValue(nameNode.getValue());
|
2020-04-18 17:10:17 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
var populateCarrierPositionCombo = func() {
|
|
|
|
# Fill the carrier-position-select combo box with the special values for
|
|
|
|
# final approach and abeam in-air positions, plus any catapults or parking
|
|
|
|
# positions available.
|
|
|
|
var combo = gui.findElementByName( dlg_root, "carrier-position-selection" );
|
|
|
|
var carriers = props.globals.getNode( "/ai/models" );
|
|
|
|
|
|
|
|
# Clear the box, as we may have selected a new carrier from the carrier selection
|
|
|
|
combo.removeChildren("value");
|
|
|
|
combo.addChild("value").setValue("FLOLS");
|
|
|
|
combo.addChild("value").setValue("Abeam");
|
|
|
|
|
2022-03-06 18:53:41 +00:00
|
|
|
if (carriers == nil)
|
|
|
|
return;
|
|
|
|
|
2020-04-18 17:10:17 +00:00
|
|
|
foreach (var carrier; carriers.getChildren("carrier")) {
|
|
|
|
if (carrier.getNode("name", 1).getValue() == getprop("/sim/presets/carrier")) {
|
|
|
|
foreach (var parkpos; carrier.getChildren("parking-pos")) {
|
|
|
|
combo.addChild("value").setValue(parkpos.getNode("name", 1).getValue());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
populateCarrierCombo();
|
|
|
|
populateCarrierPositionCombo();
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
</open>
|
|
|
|
|
|
|
|
<close># just kept for educational purposes :-)</close>
|
|
|
|
</nasal>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2020-04-10 13:25:15 +00:00
|
|
|
<empty>
|
|
|
|
<stretch>1</stretch>
|
|
|
|
</empty>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Position Aircraft In Air</label>
|
|
|
|
</text>
|
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<empty>
|
|
|
|
<stretch>1</stretch>
|
|
|
|
</empty>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
|
|
|
<button>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
|
|
|
<legend></legend>
|
|
|
|
<keynum>27</keynum>
|
|
|
|
<border>2</border>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
2006-03-08 10:50:14 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<hrule />
|
2004-05-12 15:37:17 +00:00
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
2020-04-10 13:25:15 +00:00
|
|
|
<group>
|
|
|
|
<default-padding>6</default-padding>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<radio>
|
|
|
|
<live>true</live>
|
|
|
|
<halign>left</halign>
|
|
|
|
<label>Airport:</label>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/airport</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("airport")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<radio>
|
|
|
|
<label>Position:</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/lonlat</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("lonlat")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2006-03-08 10:50:14 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<radio>
|
|
|
|
<label>VOR:</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/vor</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("vor")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<radio>
|
|
|
|
<live>true</live>
|
|
|
|
<halign>left</halign>
|
|
|
|
<label>NDB:</label>
|
2006-03-08 10:50:14 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<property>/sim/gui/dialogs/location-in-air/ndb</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("ndb")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<radio>
|
|
|
|
<label>Fix:</label>
|
|
|
|
<live>true</live>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/fix</property>
|
|
|
|
<halign>left</halign>
|
2020-04-09 21:40:58 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("fix")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2020-04-09 21:40:58 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<radio>
|
|
|
|
<live>true</live>
|
|
|
|
<label>Aircraft Carrier:</label>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/carrier-active</property>
|
|
|
|
<halign>left</halign>
|
2020-04-09 21:40:58 +00:00
|
|
|
|
2020-04-10 13:25:15 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("carrier")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/airport</property>
|
|
|
|
</visible>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Airport:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/airport-id</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("airport")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label> Runway:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/runway</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("airport")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<layout>table</layout>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/lonlat</property>
|
|
|
|
</visible>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Longitude:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/longitude-deg</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("lonlat")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label> Latitude:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/latitude-deg</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("lonlat")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<layout>table</layout>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/vor</property>
|
|
|
|
</visible>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>VOR:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/vor-id</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("vor")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
</group>
|
|
|
|
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<layout>table</layout>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/ndb</property>
|
|
|
|
</visible>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>NDB:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/ndb-id</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("ndb")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<layout>table</layout>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/fix</property>
|
|
|
|
</visible>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Fix:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/fix</property>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("fix")</script>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<layout>table</layout>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/carrier-active</property>
|
|
|
|
</visible>
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Carrier:</label>
|
|
|
|
</text>
|
2020-04-18 17:10:17 +00:00
|
|
|
<combo>
|
|
|
|
<name>carrier-selection</name>
|
2020-04-10 13:25:15 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/presets/carrier</property>
|
2020-04-18 17:10:17 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>carrier-selection</object-name>
|
|
|
|
</binding>
|
2020-04-10 13:25:15 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
2020-04-18 17:10:17 +00:00
|
|
|
<script>populateCarrierPositionCombo();</script>
|
2020-04-10 13:25:15 +00:00
|
|
|
</binding>
|
2020-04-18 17:10:17 +00:00
|
|
|
</combo>
|
2020-04-10 13:25:15 +00:00
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
2020-04-18 17:10:17 +00:00
|
|
|
<label>Position:</label>
|
2020-04-10 13:25:15 +00:00
|
|
|
</text>
|
2020-04-18 17:10:17 +00:00
|
|
|
<combo>
|
|
|
|
<name>carrier-position-selection</name>
|
2020-04-10 13:25:15 +00:00
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
2020-04-18 17:10:17 +00:00
|
|
|
<property>/sim/presets/carrier-position</property>
|
2020-04-10 13:25:15 +00:00
|
|
|
<binding>
|
2020-04-18 17:10:17 +00:00
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>carrier-position-selection</object-name>
|
2020-04-10 13:25:15 +00:00
|
|
|
</binding>
|
2020-04-18 17:10:17 +00:00
|
|
|
</combo>
|
2020-04-10 13:25:15 +00:00
|
|
|
</group>
|
2006-03-08 10:50:14 +00:00
|
|
|
</group>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
<text>
|
|
|
|
<label>Relative Position</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<group>
|
2015-05-03 16:13:50 +00:00
|
|
|
<layout>hbox</layout>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<text>
|
|
|
|
<row>0</row><col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label> Distance (nm):</label>
|
|
|
|
<enable><not><property>/sim/gui/dialogs/location-in-air/lonlat</property></not></enable>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row><col>1</col>
|
|
|
|
<property>/sim/presets/offset-distance-nm</property>
|
|
|
|
<enable><not><property>/sim/gui/dialogs/location-in-air/lonlat</property></not></enable>
|
|
|
|
</input>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<text>
|
|
|
|
<row>0</row><col>2</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Azimuth (deg):</label>
|
|
|
|
<enable><not><property>/sim/gui/dialogs/location-in-air/lonlat</property></not></enable>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row><col>3</col>
|
|
|
|
<property>/sim/presets/offset-azimuth-deg</property>
|
|
|
|
<enable><not><property>/sim/gui/dialogs/location-in-air/lonlat</property></not></enable>
|
|
|
|
</input>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<text>
|
|
|
|
<row>1</row><col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Altitude (ft):</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>1</row><col>1</col>
|
|
|
|
<property>/sim/presets/altitude-ft</property>
|
|
|
|
</input>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2015-05-03 16:13:50 +00:00
|
|
|
<text>
|
|
|
|
<row>1</row><col>2</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label> Glidepath (deg):</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>1</row><col>3</col>
|
|
|
|
<property>/sim/presets/glideslope-deg</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>2</row><col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Airspeed (kt):</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>2</row><col>1</col>
|
|
|
|
<property>/sim/presets/airspeed-kt</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>2</row><col>2</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Heading (deg):</label>
|
|
|
|
<enable><not><property>/sim/gui/dialogs/location-in-air/airport</property></not></enable>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>2</row><col>3</col>
|
|
|
|
<enable><not><property>/sim/gui/dialogs/location-in-air/airport</property></not></enable>
|
|
|
|
<property>/sim/presets/heading-deg</property>
|
|
|
|
</input>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<!-- only for a gap -->
|
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<default-padding>1</default-padding>
|
|
|
|
<text>
|
|
|
|
<label> </label>
|
|
|
|
</text>
|
|
|
|
</group>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
|
|
|
</group>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>10</default-padding>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>OK</legend>
|
2005-11-05 13:59:06 +00:00
|
|
|
<default>true</default>
|
2004-05-12 15:37:17 +00:00
|
|
|
<equal>true</equal>
|
|
|
|
<binding>
|
2006-03-08 10:50:14 +00:00
|
|
|
<command>dialog-apply</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-08 10:50:14 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
2010-10-10 12:05:42 +00:00
|
|
|
|
2020-04-18 17:10:17 +00:00
|
|
|
if (mode.carrier.getBoolValue()) {
|
2020-04-09 21:40:58 +00:00
|
|
|
setprop("/sim/presets/airport-id", "");
|
|
|
|
setprop("/sim/presets/runway", "");
|
|
|
|
setprop("/sim/presets/runway-requested", 0);
|
|
|
|
}
|
|
|
|
else if (!mode.airport.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/carrier", "");
|
|
|
|
setprop("/sim/presets/parkpos", "");
|
2006-03-08 10:50:14 +00:00
|
|
|
setprop("/sim/presets/airport-id", "");
|
|
|
|
setprop("/sim/presets/runway", "");
|
2017-09-19 16:54:00 +00:00
|
|
|
setprop("/sim/presets/runway-requested", 0);
|
|
|
|
} else {
|
2020-04-09 21:40:58 +00:00
|
|
|
setprop("/sim/presets/carrier", "");
|
2020-07-14 16:16:07 +00:00
|
|
|
setprop("/sim/presets/heading-deg", 9999);
|
2017-09-19 16:54:00 +00:00
|
|
|
var runway = getprop("/sim/presets/runway");
|
|
|
|
if (runway != "") {
|
|
|
|
setprop("/sim/presets/runway-requested", 1);
|
|
|
|
}
|
2006-03-08 10:50:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!mode.lonlat.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/longitude-deg", -9999);
|
|
|
|
setprop("/sim/presets/latitude-deg", -9999);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!mode.vor.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/vor-id", "");
|
2011-08-22 18:01:55 +00:00
|
|
|
} else {
|
|
|
|
pickNearest("vor","/sim/presets/vor-id","/sim/presets/vor-freq");
|
2006-03-08 10:50:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!mode.ndb.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/ndb-id", "");
|
2011-08-22 18:01:55 +00:00
|
|
|
} else {
|
|
|
|
pickNearest("ndb","/sim/presets/ndb-id","/sim/presets/ndb-freq");
|
2006-03-08 10:50:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!mode.fix.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/fix", "");
|
|
|
|
}
|
|
|
|
|
2016-09-05 15:15:16 +00:00
|
|
|
var speedRequested = getprop("/sim/presets/airspeed-kt");
|
|
|
|
if (speedRequested > 0) {
|
|
|
|
setprop("/sim/presets/speed-set", "knots");
|
|
|
|
}
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
</script>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2014-03-05 16:46:10 +00:00
|
|
|
<command>reposition</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-08 10:50:14 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
ac = getprop("/sim/aircraft");
|
|
|
|
if (ac == "ufo") { return }
|
|
|
|
|
|
|
|
var eng = props.globals.getNode("/controls/engines");
|
|
|
|
if (eng != nil) {
|
|
|
|
foreach (c; eng.getChildren("engine")) {
|
|
|
|
c.getNode("magnetos", 1).setIntValue(3);
|
|
|
|
c.getNode("throttle", 1).setDoubleValue(0.5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-08 10:50:14 +00:00
|
|
|
<command>dialog-close</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Cancel</legend>
|
|
|
|
<equal>true</equal>
|
2005-11-05 18:42:28 +00:00
|
|
|
<key>Esc</key>
|
2004-05-12 15:37:17 +00:00
|
|
|
<binding>
|
2006-03-08 10:50:14 +00:00
|
|
|
<command>dialog-close</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
2002-12-22 20:22:11 +00:00
|
|
|
</PropertyList>
|