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>
|
2006-03-22 22:08:15 +00:00
|
|
|
p = props.globals.getNode("/sim/gui/dialogs/location-in-air/", 1);
|
2006-03-08 10:50:14 +00:00
|
|
|
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),
|
2006-03-08 10:50:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
set_radio = func(m) {
|
|
|
|
foreach (k; keys(mode)) {
|
|
|
|
mode[k].setBoolValue(m == k);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
initialized = 0;
|
|
|
|
foreach (k; keys(mode)) {
|
|
|
|
if (mode[k].getType() == "NONE") {
|
|
|
|
mode[k].setBoolValue(0);
|
|
|
|
}
|
|
|
|
initialized += mode[k].getBoolValue();
|
|
|
|
}
|
|
|
|
if (!initialized) {
|
|
|
|
set_radio("airport");
|
|
|
|
}
|
|
|
|
</open>
|
|
|
|
|
|
|
|
<close># just kept for educational purposes :-)</close>
|
|
|
|
</nasal>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Position Aircraft In Air</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<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
|
|
|
|
2007-03-26 15:25:27 +00:00
|
|
|
<hrule/>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
|
|
|
<text>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Surface Point</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
2010-12-27 20:19:31 +00:00
|
|
|
<halign>center</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
<row>0</row><col>0</col>
|
2006-03-08 10:50:14 +00:00
|
|
|
<live>true</live>
|
|
|
|
<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>
|
|
|
|
<text>
|
|
|
|
<row>0</row><col>1</col>
|
2010-12-27 20:19:31 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Airport:</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>0</row><col>2</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/airport-id</property>
|
|
|
|
</input>
|
|
|
|
<text>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>0</row><col>3</col>
|
2010-12-27 20:19:31 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Runway:</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>0</row><col>4</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/runway</property>
|
|
|
|
</input>
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
<radio>
|
|
|
|
<row>1</row><col>0</col>
|
|
|
|
<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>
|
|
|
|
<text>
|
|
|
|
<row>1</row><col>1</col>
|
2010-12-27 20:19:31 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Longitude:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>1</row><col>2</col>
|
|
|
|
<property>/sim/presets/longitude-deg</property>
|
|
|
|
</input>
|
2004-05-12 15:37:17 +00:00
|
|
|
<text>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>1</row><col>3</col>
|
2010-12-27 20:19:31 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Latitude:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>1</row><col>4</col>
|
|
|
|
<property>/sim/presets/latitude-deg</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
<row>2</row><col>0</col>
|
2006-03-08 10:50:14 +00:00
|
|
|
<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>
|
|
|
|
<text>
|
|
|
|
<row>2</row><col>1</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>VOR:</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>2</row><col>2</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/vor-id</property>
|
|
|
|
</input>
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
<radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
<row>3</row><col>0</col>
|
2006-03-08 10:50:14 +00:00
|
|
|
<live>true</live>
|
|
|
|
<halign>left</halign>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
<text>
|
|
|
|
<row>3</row><col>1</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>NDB:</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>3</row><col>2</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/ndb-id</property>
|
|
|
|
</input>
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
<radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
<row>4</row><col>0</col>
|
2006-03-08 10:50:14 +00:00
|
|
|
<live>true</live>
|
|
|
|
<property>/sim/gui/dialogs/location-in-air/fix</property>
|
|
|
|
<halign>left</halign>
|
|
|
|
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("fix")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
|
|
|
<text>
|
|
|
|
<row>4</row><col>1</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Fix:</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>4</row><col>2</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/fix</property>
|
|
|
|
</input>
|
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>
|
|
|
|
<layout>table</layout>
|
|
|
|
<text>
|
|
|
|
<row>0</row><col>0</col>
|
|
|
|
<halign>right</halign>
|
2009-06-22 14:26:16 +00:00
|
|
|
<label>Distance (nm):</label>
|
2006-03-08 10:50:14 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row><col>1</col>
|
2008-05-01 21:15:40 +00:00
|
|
|
<property>/sim/presets/offset-distance-nm</property>
|
2006-03-08 10:50:14 +00:00
|
|
|
</input>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>0</row><col>2</col>
|
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Azimuth (deg):</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>0</row><col>3</col>
|
2008-05-01 21:15:40 +00:00
|
|
|
<property>/sim/presets/offset-azimuth-deg</property>
|
2004-05-12 15:37:17 +00:00
|
|
|
</input>
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<text>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>1</row><col>0</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Altitude (ft):</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>1</row><col>1</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/altitude-ft</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>1</row><col>2</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Glidepath (deg):</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>1</row><col>3</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/glidescope-deg</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>2</row><col>0</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<halign>right</halign>
|
2006-03-08 10:50:14 +00:00
|
|
|
<label>Airspeed (kt):</label>
|
2004-05-12 15:37:17 +00:00
|
|
|
</text>
|
|
|
|
<input>
|
2006-03-08 10:50:14 +00:00
|
|
|
<row>2</row><col>1</col>
|
2004-05-12 15:37:17 +00:00
|
|
|
<property>/sim/presets/airspeed-kt</property>
|
|
|
|
</input>
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
<text>
|
|
|
|
<row>2</row><col>2</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Heading (deg):</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>2</row><col>3</col>
|
|
|
|
<property>/sim/presets/heading-deg</property>
|
|
|
|
</input>
|
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
|
|
|
setprop("/sim/presets/parkpos", "");
|
|
|
|
|
2006-03-08 10:50:14 +00:00
|
|
|
if (!mode.airport.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/airport-id", "");
|
|
|
|
setprop("/sim/presets/runway", "");
|
|
|
|
}
|
|
|
|
|
|
|
|
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", "");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!mode.ndb.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/ndb-id", "");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!mode.fix.getBoolValue()) {
|
|
|
|
setprop("/sim/presets/fix", "");
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-08 10:50:14 +00:00
|
|
|
<command>presets-commit</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>
|