2003-11-27 23:43:43 +00:00
|
|
|
<?xml version="1.0"?>
|
2006-03-25 07:49:52 +00:00
|
|
|
|
2003-11-27 23:43:43 +00:00
|
|
|
<PropertyList>
|
2004-05-12 15:37:17 +00:00
|
|
|
<name>airports</name>
|
|
|
|
<layout>vbox</layout>
|
2009-01-10 22:20:15 +00:00
|
|
|
<resizable>true</resizable>
|
2012-11-09 22:41:56 +00:00
|
|
|
<default-padding>3</default-padding>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2012-11-09 22:41:56 +00:00
|
|
|
<default-padding>1</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Select an Airport</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>
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
<binding>
|
2012-11-05 21:22:20 +00:00
|
|
|
<command>property-toggle</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/signals/dialog-close</property>
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
</binding>
|
2010-12-27 20:19:31 +00:00
|
|
|
</button>
|
|
|
|
</group>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2007-03-26 15:25:27 +00:00
|
|
|
<hrule/>
|
2006-03-25 07:49:52 +00:00
|
|
|
|
2006-03-31 10:26:08 +00:00
|
|
|
<nasal>
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
<!-- Generalize all this, turn into helpers and load defaults via XML -->
|
2012-09-19 21:35:56 +00:00
|
|
|
<open><![CDATA[
|
2014-03-09 19:06:26 +00:00
|
|
|
var MAX_RUNWAYS = 28; # number of entries at KEDW
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
var DIALOG = cmdarg();
|
2014-12-10 22:24:21 +00:00
|
|
|
|
|
|
|
## "prologue" currently required by the canvas-generic-map
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
var dialog_name ="airports"; #TODO: use substr() and cmdarg() to get this dynamically
|
2014-12-10 22:24:21 +00:00
|
|
|
var dialog_property = func(p) return "/sim/gui/dialogs/airports/"~p; #TODO: generalize using cmdarg
|
2012-11-05 21:22:20 +00:00
|
|
|
var DIALOG_CANVAS = gui.findElementByName(DIALOG, "airport-selection");
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
canvas.GenericMap.setupGUI(DIALOG_CANVAS, "canvas-control"); #TODO: this is not a method!
|
|
|
|
## end of canvas-generic-map prologue
|
|
|
|
|
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/rwy", "");
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/parkpos", "");
|
2012-09-23 21:45:50 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/mode", "search");
|
2012-11-09 22:41:56 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/display-mode", "0");
|
2012-09-18 18:28:56 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/list", "");
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-19 21:35:56 +00:00
|
|
|
if (getprop("/sim/gui/dialogs/airports/display-taxiways") == "") {
|
|
|
|
setprop("/sim/gui/dialogs/airports/display-taxiways", "1");
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-19 21:35:56 +00:00
|
|
|
if (getprop("/sim/gui/dialogs/airports/display-parking") == "") {
|
|
|
|
setprop("/sim/gui/dialogs/airports/display-parking", "0");
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-19 21:35:56 +00:00
|
|
|
if (getprop("/sim/gui/dialogs/airports/display-tower") == "") {
|
|
|
|
setprop("/sim/gui/dialogs/airports/display-tower", "1");
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-20 20:51:23 +00:00
|
|
|
# Start with the closest airport
|
|
|
|
var airport_id = airportinfo().id;
|
2012-09-23 21:45:50 +00:00
|
|
|
|
|
|
|
# Retrieve METAR
|
2014-12-10 22:24:21 +00:00
|
|
|
fgcommand("request-metar", var n = props.Node.new({ "path": "/sim/gui/dialogs/airports/selected-airport/metar",
|
2012-09-23 21:45:50 +00:00
|
|
|
"station": airport_id}));
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
var dlg = props.globals.getNode("/sim/gui/dialogs/airports", 1);
|
|
|
|
var avail_runways = dlg.getNode("available-runways", 1);
|
2014-12-10 22:24:21 +00:00
|
|
|
var avail_parking = {};
|
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
if (dlg.getNode("list") == nil)
|
|
|
|
dlg.getNode("list", 1).setValue("");
|
|
|
|
|
|
|
|
var airportlist = dlg.getNode("list");
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
var mode = {
|
|
|
|
runway: dlg.getNode("use_runway", 1),
|
|
|
|
bestrunway: dlg.getNode("use_best_runway", 1),
|
|
|
|
parkpos: dlg.getNode("use_parkpos", 1)
|
|
|
|
};
|
|
|
|
|
|
|
|
var set_radio = func(m) {
|
|
|
|
foreach (k; keys(mode)) {
|
|
|
|
mode[k].setBoolValue(m == k);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var initialized = 0;
|
|
|
|
foreach (k; keys(mode)) {
|
|
|
|
if (mode[k].getType() == "NONE" or initialized) {
|
|
|
|
mode[k].setBoolValue(0);
|
|
|
|
} else {
|
|
|
|
initialized += mode[k].getBoolValue();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!initialized) {
|
|
|
|
set_radio("bestrunway");
|
|
|
|
}
|
|
|
|
|
|
|
|
var update_info = func {
|
|
|
|
var info = airportinfo(airport_id);
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/id", airport_id);
|
2012-11-05 21:22:20 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/name", info.name);
|
2012-09-19 21:35:56 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/location", sprintf("%.3f / %.3f", info.lat, info.lon));
|
2012-09-17 19:17:52 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/lon", info.lon);
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/elevation-ft", 3.28 * info.elevation);
|
2012-09-18 18:28:56 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/rwy", "");
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/parkpos", "");
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
if (info.has_metar) {
|
|
|
|
# Retrieve an updated METAR, and indicate that we've not got one currently.
|
2015-03-30 15:13:40 +00:00
|
|
|
fgcommand("request-metar", var n = props.Node.new({ "path": "/sim/gui/dialogs/airports/selected-airport/metar",
|
|
|
|
"station": airport_id}));
|
2014-12-10 22:24:21 +00:00
|
|
|
} else {
|
2012-11-05 21:22:20 +00:00
|
|
|
# This airport has no METAR. Rather than cancelling the retrieve-metar command, simply set the TTL
|
2012-09-23 21:45:50 +00:00
|
|
|
# to a very long time so it won't over-ride our message.
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/metar/time-to-live", 9999);
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
|
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
# Display the comms frequencies for this airport
|
2014-12-10 22:24:21 +00:00
|
|
|
var fcount = 0;
|
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
if (size(info.comms()) > 0) {
|
|
|
|
# Airport has one or more frequencies assigned to it.
|
|
|
|
var freqs = {};
|
|
|
|
var comms = info.comms();
|
|
|
|
|
2014-12-10 22:24:21 +00:00
|
|
|
foreach (var c; comms) {
|
2012-11-05 21:22:20 +00:00
|
|
|
var f = sprintf("%.3f", c.frequency);
|
2014-12-10 22:24:21 +00:00
|
|
|
if (freqs[c.ident] == nil) {
|
|
|
|
freqs[c.ident] = f;
|
2012-11-05 21:22:20 +00:00
|
|
|
} else {
|
|
|
|
freqs[c.ident] = freqs[c.ident] ~ " " ~ f;
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
}
|
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
foreach (var c; sort(keys(freqs), string.icmp)) {
|
|
|
|
setprop("sim/gui/dialogs/airports/selected-airport/comms/freq[" ~ fcount ~ "]/label", c);
|
|
|
|
setprop("sim/gui/dialogs/airports/selected-airport/comms/freq[" ~ fcount ~ "]/value", freqs[c]);
|
|
|
|
fcount += 1;
|
|
|
|
}
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
while (fcount < 13) {
|
2012-11-05 21:22:20 +00:00
|
|
|
# zero remaining comms channels
|
|
|
|
setprop("sim/gui/dialogs/airports/selected-airport/comms/freq[" ~ fcount ~ "]/label", "");
|
|
|
|
setprop("sim/gui/dialogs/airports/selected-airport/comms/freq[" ~ fcount ~ "]/value", "");
|
|
|
|
fcount += 1;
|
|
|
|
}
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
var longest_runway = 0;
|
2014-12-10 22:24:21 +00:00
|
|
|
var runways = info.runways;
|
2017-06-08 21:08:08 +00:00
|
|
|
var infoAboutRunways = []; # list of strings for display
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
avail_runways.removeChildren("value");
|
|
|
|
var runway_keys = sort(keys(runways), string.icmp);
|
|
|
|
var i = 0;
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
foreach(var rwy; runway_keys) {
|
2013-02-08 13:18:51 +00:00
|
|
|
var r = runways[rwy];
|
|
|
|
longest_runway = math.max(longest_runway, r.length * 3.28);
|
2012-09-17 19:17:52 +00:00
|
|
|
avail_runways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
|
2017-06-08 21:08:08 +00:00
|
|
|
var rwyInfo = sprintf("%5s %12d' / %03d deg", rwy, r.length * 3.28,
|
|
|
|
r.heading);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
if (r.ils != nil) {
|
2017-06-08 21:08:08 +00:00
|
|
|
rwyInfo = sprintf("%s %20.3f Mhz", rwyInfo,
|
|
|
|
r.ils.frequency / 100);
|
2014-12-10 22:24:21 +00:00
|
|
|
}
|
|
|
|
|
2017-06-08 21:08:08 +00:00
|
|
|
append(infoAboutRunways, rwyInfo);
|
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
i += 1;
|
2014-03-09 19:06:26 +00:00
|
|
|
if (i == MAX_RUNWAYS)
|
2013-02-08 13:18:51 +00:00
|
|
|
break;
|
2014-12-10 22:24:21 +00:00
|
|
|
}
|
|
|
|
|
2017-06-08 21:08:08 +00:00
|
|
|
var runwayInfoNode = dlg.getNode("selected-airport/runways-info", 1);
|
|
|
|
runwayInfoNode.setValue(string.join("\n", infoAboutRunways));
|
|
|
|
fgcommand("dialog-update", props.Node.new({"object-name": "runways-info", "dialog-name": "airports"}));
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2014-12-10 22:24:21 +00:00
|
|
|
# Update the list of available parking positions
|
|
|
|
avail_parking = {};
|
2012-09-17 19:17:52 +00:00
|
|
|
foreach (var park; info.parking()) {
|
2014-12-10 22:24:21 +00:00
|
|
|
avail_parking[park.name] = 1;
|
|
|
|
}
|
2012-09-17 19:17:52 +00:00
|
|
|
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/longest-runway", longest_runway);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-19 21:35:56 +00:00
|
|
|
var airport_pos = geo.Coord.new();
|
|
|
|
airport_pos.set_latlon(info.lat, info.lon);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
|
|
|
var pos = geo.aircraft_position();
|
2012-09-20 20:51:23 +00:00
|
|
|
var dst = pos.distance_to(airport_pos) / 1852.0;
|
|
|
|
var crs = pos.course_to(airport_pos);
|
2012-09-19 21:35:56 +00:00
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/distance-nm", dst);
|
|
|
|
setprop("/sim/gui/dialogs/airports/selected-airport/course-deg", crs);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
gui.dialog_update("airports", "runway-list");
|
|
|
|
}
|
2006-03-31 10:26:08 +00:00
|
|
|
|
2008-07-30 21:56:18 +00:00
|
|
|
var listbox = func {
|
2012-09-17 19:17:52 +00:00
|
|
|
airport_id = pop(split(" ", airportlist.getValue()));
|
|
|
|
airport_id = substr(airport_id, 1, size(airport_id) - 2); # strip parentheses
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
update_info();
|
2006-03-31 10:26:08 +00:00
|
|
|
}
|
|
|
|
|
2008-07-30 21:56:18 +00:00
|
|
|
var apply = func {
|
2012-09-17 19:17:52 +00:00
|
|
|
setprop("/sim/presets/airport-id", airport_id);
|
2006-03-31 10:26:08 +00:00
|
|
|
setprop("/sim/presets/longitude-deg", -9999);
|
|
|
|
setprop("/sim/presets/latitude-deg", -9999);
|
|
|
|
setprop("/sim/presets/altitude-ft", -9999);
|
|
|
|
setprop("/sim/presets/airspeed-kt", 0);
|
2008-05-01 21:15:40 +00:00
|
|
|
setprop("/sim/presets/offset-distance-nm", 0);
|
|
|
|
setprop("/sim/presets/offset-azimuth-deg", 0);
|
2006-03-31 10:26:08 +00:00
|
|
|
setprop("/sim/presets/glideslope-deg", 0);
|
|
|
|
setprop("/sim/presets/heading-deg", 0);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
if (mode["bestrunway"].getBoolValue()) {
|
|
|
|
setprop("/sim/presets/runway", "");
|
|
|
|
setprop("/sim/presets/parkpos", "");
|
2017-09-19 16:54:00 +00:00
|
|
|
setprop("/sim/presets/runway-requested", 0);
|
2012-09-17 19:17:52 +00:00
|
|
|
} else if (mode["runway"].getBoolValue()) {
|
|
|
|
setprop("/sim/presets/runway", getprop("/sim/gui/dialogs/airports/selected-airport/rwy"));
|
|
|
|
setprop("/sim/presets/parkpos", "");
|
2017-09-19 16:54:00 +00:00
|
|
|
setprop("/sim/presets/runway-requested", 1);
|
2012-09-17 19:17:52 +00:00
|
|
|
} else {
|
|
|
|
setprop("/sim/presets/runway", "");
|
|
|
|
setprop("/sim/presets/parkpos", getprop("/sim/gui/dialogs/airports/selected-airport/parkpos"));
|
2014-12-10 22:24:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
canvas.register_callback(update_info); # FIXME: this is a workaround to run dialog-specific code in the canvas block
|
2012-09-19 21:35:56 +00:00
|
|
|
]]>
|
2006-03-31 10:26:08 +00:00
|
|
|
</open>
|
2012-09-23 21:45:50 +00:00
|
|
|
<close>
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
fgcommand("clear-metar", var n = props.Node.new({ "path": "/sim/gui/dialogs/airports/selected-airport/metar",
|
|
|
|
"station": airport_id}));
|
2012-11-03 22:05:37 +00:00
|
|
|
map.cleanup_listeners(); #TODO: We should be setting a signal when closing the dialog, so that cleanup code can be invoked automatically
|
2012-09-23 21:45:50 +00:00
|
|
|
</close>
|
2006-03-31 10:26:08 +00:00
|
|
|
</nasal>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2006-03-31 10:26:08 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>4</default-padding>
|
2012-11-09 22:41:56 +00:00
|
|
|
<halign>fill</halign>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
2012-11-09 22:41:56 +00:00
|
|
|
<valign>top</valign>
|
2006-03-31 10:26:08 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>4</default-padding>
|
2006-03-31 10:26:08 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
<text>
|
|
|
|
<label>Airport:</label>
|
|
|
|
</text>
|
2006-03-31 10:26:08 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
<input>
|
|
|
|
<name>input</name>
|
2012-11-09 22:41:56 +00:00
|
|
|
<pref-width>120</pref-width>
|
2012-09-17 19:17:52 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<property>/sim/gui/dialogs/airports/list</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</input>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
|
|
|
<!--
|
2006-03-31 10:26:08 +00:00
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
<button>
|
|
|
|
<legend>Clear</legend>
|
2012-09-23 21:45:50 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/mode</property>
|
|
|
|
<value>search</value>
|
|
|
|
</binding>
|
2012-09-17 19:17:52 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/list</property>
|
|
|
|
<value></value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2012-11-09 22:41:56 +00:00
|
|
|
-->
|
2012-09-17 19:17:52 +00:00
|
|
|
<button>
|
|
|
|
<legend>Search</legend>
|
|
|
|
<default>true</default>
|
2012-09-23 21:45:50 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/mode</property>
|
|
|
|
<value>search</value>
|
|
|
|
</binding>
|
2012-09-17 19:17:52 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
<button>
|
2012-11-09 22:41:56 +00:00
|
|
|
<legend><100nm</legend>
|
2012-09-23 21:45:50 +00:00
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/mode</property>
|
|
|
|
<value>100nm</value>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
var airports = findAirportsWithinRange(100);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
var list = dlg.getNode("close-airports", 1);
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
list.removeChildren("value");
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
forindex (var idx; airports) {
|
|
|
|
list.getNode("value["~ idx ~ "]", 1).setValue(airports[idx].name ~ " (" ~ airports[idx].id ~ ")");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>close-airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
2012-09-17 19:17:52 +00:00
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<default-padding>0</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
<list>
|
|
|
|
<row>0</row><col>0</col>
|
|
|
|
<visible>
|
|
|
|
<equals>
|
|
|
|
<property>/sim/gui/dialogs/airports/mode</property>
|
|
|
|
<value>100nm</value>
|
|
|
|
</equals>
|
|
|
|
</visible>
|
|
|
|
<name>close-airport-list</name>
|
2012-11-09 22:41:56 +00:00
|
|
|
<pref-width>260</pref-width>
|
2012-09-23 21:45:50 +00:00
|
|
|
<pref-height>260</pref-height>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<property>/sim/gui/dialogs/airports/list</property>
|
|
|
|
<properties>/sim/gui/dialogs/airports/close-airports</properties>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>close-airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>listbox()</script>
|
|
|
|
</binding>
|
|
|
|
</list>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
<airport-list>
|
|
|
|
<row>0</row><col>0</col>
|
|
|
|
<visible>
|
|
|
|
<equals>
|
|
|
|
<property>/sim/gui/dialogs/airports/mode</property>
|
|
|
|
<value>search</value>
|
|
|
|
</equals>
|
|
|
|
</visible>
|
|
|
|
<name>airport-list</name>
|
2012-11-09 22:41:56 +00:00
|
|
|
<pref-width>260</pref-width>
|
2014-12-10 22:24:21 +00:00
|
|
|
<pref-height>220</pref-height>
|
2012-09-23 21:45:50 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<property>/sim/gui/dialogs/airports/list</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>listbox()</script>
|
|
|
|
</binding>
|
|
|
|
</airport-list>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-09-23 21:45:50 +00:00
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2012-11-09 22:41:56 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<text>
|
|
|
|
<label>METAR</label>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<hrule><stretch>1</stretch></hrule>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<textbox>
|
|
|
|
<name>metar</name>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<pref-width>260</pref-width>
|
2015-03-14 22:33:05 +00:00
|
|
|
<pref-height>70</pref-height>
|
|
|
|
<slider>15</slider>
|
2012-11-09 22:41:56 +00:00
|
|
|
<editable>false</editable>
|
|
|
|
<wrap>true</wrap>
|
|
|
|
<live>true</live>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/metar/data</property>
|
|
|
|
</textbox>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<valign>top</valign>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<group>
|
2012-11-09 22:41:56 +00:00
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<colspan>2</colspan>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<label>Aircraft Position</label>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<hrule><stretch>1</stretch></hrule>
|
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>center</halign>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<radio>
|
|
|
|
<row>2</row><col>0</col>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_best_runway</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
<live>true</live>
|
2012-11-09 22:41:56 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("bestrunway")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>2</row><col>1</col>
|
2012-11-05 21:22:20 +00:00
|
|
|
<halign>right</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<label>Best runway</label>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_best_runway</property>
|
|
|
|
</enable>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>2</row><col>2</col>
|
2012-11-05 21:22:20 +00:00
|
|
|
<halign>right</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<label>(based on wind)</label>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_best_runway</property>
|
|
|
|
</enable>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<radio>
|
|
|
|
<row>3</row><col>0</col>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_runway</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
<live>true</live>
|
2012-11-09 22:41:56 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("runway")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>3</row><col>1</col>
|
2012-11-05 21:22:20 +00:00
|
|
|
<halign>right</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<label>Runway:</label>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_runway</property>
|
|
|
|
</enable>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<combo>
|
|
|
|
<name>runway-list</name>
|
|
|
|
<row>3</row><col>2</col>
|
|
|
|
<pref-width>85</pref-width>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_runway</property>
|
|
|
|
</enable>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/rwy</property>
|
|
|
|
<editable>false</editable>
|
|
|
|
<properties>sim/gui/dialogs/airports/available-runways</properties>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>runway-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</combo>
|
|
|
|
|
|
|
|
<radio>
|
|
|
|
<row>4</row><col>0</col>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_parkpos</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
<live>true</live>
|
2012-11-09 22:41:56 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("parkpos")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>4</row><col>1</col>
|
2012-11-05 21:22:20 +00:00
|
|
|
<halign>right</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<label>Parking:</label>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/gui/dialogs/airports/use_parkpos</property>
|
|
|
|
</enable>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
|
|
|
<input>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>4</row><col>2</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<name>parking-list</name>
|
|
|
|
<pref-width>120</pref-width>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/parkpos</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>parking-list</object-name>
|
|
|
|
</binding>
|
2014-12-10 22:24:21 +00:00
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
var pos = getprop("/sim/gui/dialogs/airports/selected-airport/parkpos");
|
|
|
|
setprop(
|
|
|
|
"/sim/gui/dialogs/airports/selected-airport/parkpos-invalid",
|
|
|
|
contains(avail_parking, pos) == 0);
|
|
|
|
</script>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>parking-list-valid</object-name>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>5</row><col>1</col>
|
|
|
|
<colspan>2</colspan>
|
|
|
|
<name>parking-list-valid</name>
|
|
|
|
<halign>left</halign>
|
|
|
|
<label>Parking position not found</label>
|
|
|
|
<visible>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/parkpos-invalid</property>
|
|
|
|
</visible>
|
|
|
|
</text>
|
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
</group>
|
2012-11-09 22:41:56 +00:00
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<vrule/>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>top</valign>
|
|
|
|
<default-padding>0</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>left</halign>
|
|
|
|
<default-padding>2</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<button>
|
|
|
|
<legend>Airfield Information</legend>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/display-mode</property>
|
|
|
|
<value>0</value>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<button>
|
|
|
|
<legend>Airfield Chart</legend>
|
|
|
|
<binding>
|
|
|
|
<command>property-assign</command>
|
|
|
|
<property>/sim/gui/dialogs/airports/display-mode</property>
|
|
|
|
<value>1</value>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2014-12-10 22:24:21 +00:00
|
|
|
</group>
|
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<default-padding>0</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<valign>top</valign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<visible>
|
|
|
|
<equals>
|
|
|
|
<property>/sim/gui/dialogs/airports/display-mode</property>
|
|
|
|
<value>1</value>
|
|
|
|
</equals>
|
|
|
|
</visible>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<group>
|
2012-11-09 22:41:56 +00:00
|
|
|
<layout>vbox</layout>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<row>0</row>
|
|
|
|
<text>
|
|
|
|
<label>Airfield Chart</label>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<hrule><stretch>1</stretch></hrule>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<!-- Instantiate a generic canvas map and parametrize it via inclusion -->
|
|
|
|
<!-- TODO: use params and aliasing -->
|
|
|
|
<canvas include="/Nasal/canvas/generic-canvas-map.xml">
|
|
|
|
|
|
|
|
<name>airport-selection</name>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<pref-width>400</pref-width>
|
|
|
|
<pref-height>400</pref-height>
|
|
|
|
|
|
|
|
<features>
|
|
|
|
<!-- TODO: use params and aliases to make this shorter -->
|
|
|
|
<!-- TODO: support styling, i.e. image sets/fonts and colors to be used -->
|
|
|
|
<!-- this will set up individual "layers" and map them to boolean "toggle" properties -->
|
|
|
|
<!-- providing an optional "description" tag here allows us to create all checkboxes procedurally -->
|
|
|
|
<dialog-root>/sim/gui/dialogs/airports</dialog-root>
|
|
|
|
<range-property>zoom</range-property>
|
|
|
|
|
|
|
|
<!-- These are the ranges available for the map: var ranges = [0.1, 0.25, 0.5, 1, 2.5, 5] -->
|
|
|
|
|
|
|
|
<ranges>
|
|
|
|
<range>0.1</range>
|
|
|
|
<range>0.25</range>
|
|
|
|
<range>0.5</range>
|
|
|
|
<range>1</range>
|
|
|
|
<range>2.5</range>
|
|
|
|
<range>5</range>
|
|
|
|
</ranges>
|
|
|
|
|
|
|
|
<!-- available layers and their toggle property (appended to dialog-root specified above) -->
|
|
|
|
|
|
|
|
<layer>
|
|
|
|
<name>runways</name> <!-- the name of the layer -->
|
|
|
|
<init-property>selected-airport/id</init-property> <!-- the init/input property that re-inits the layer MODEL -->
|
|
|
|
<property>display-runways</property> <!-- the property switch that toggles the layer on/off (show/hide) -->
|
|
|
|
<description>Show Runways</description> <!-- the checkbox label for the property -->
|
|
|
|
<default>enabled</default> <!-- default state -->
|
|
|
|
<hide-checkbox>true</hide-checkbox> <!-- if the checkbox should be shown or hidden -->
|
|
|
|
</layer>
|
|
|
|
<layer>
|
|
|
|
<name>taxiways</name>
|
|
|
|
<init-property>selected-airport/id</init-property>
|
|
|
|
<property>display-taxiways</property>
|
|
|
|
<description>Show Taxiways</description>
|
|
|
|
<default>enabled</default>
|
|
|
|
</layer>
|
|
|
|
|
|
|
|
<layer>
|
|
|
|
<name>parkings</name>
|
|
|
|
<init-property>selected-airport/id</init-property>
|
|
|
|
<property>display-parking</property>
|
|
|
|
<description>Show Parking</description>
|
|
|
|
<default>disabled</default>
|
|
|
|
</layer>
|
|
|
|
|
|
|
|
<layer>
|
|
|
|
<name>towers</name>
|
|
|
|
<init-property>selected-airport/id</init-property>
|
|
|
|
<property>display-tower</property>
|
|
|
|
<description>Show Tower</description>
|
|
|
|
<default>enabled</default>
|
|
|
|
</layer>
|
|
|
|
<!-- Uncomment this to add a navaid layer (not yet fully implemented, and no LOD yet)
|
|
|
|
<layer>
|
|
|
|
<name>navaids</name>
|
|
|
|
<init-property>selected-airport/id</init-property>
|
|
|
|
<property>display-navaids</property>
|
|
|
|
<description>Display Navaids within current range</description>
|
|
|
|
<default>disabled</default>
|
|
|
|
</layer>
|
|
|
|
-->
|
|
|
|
|
|
|
|
</features>
|
|
|
|
</canvas>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<name>canvas-control</name> <!-- this is the handle we use to procedurally add all "toggle layer" checkboxes and the zoom control-->
|
|
|
|
<layout>hbox</layout>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<!-- airport info -->
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
2013-02-08 13:18:51 +00:00
|
|
|
<layout>table</layout>
|
2012-11-09 22:41:56 +00:00
|
|
|
<valign>top</valign>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<visible>
|
|
|
|
<equals>
|
|
|
|
<property>/sim/gui/dialogs/airports/display-mode</property>
|
|
|
|
<value>0</value>
|
|
|
|
</equals>
|
|
|
|
</visible>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<!-- airport info table -->
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
2013-02-08 13:18:51 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<layout>table</layout>
|
|
|
|
<valign>top</valign>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<colspan>2</colspan>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Airfield Information</label>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<hrule><stretch>1</stretch></hrule>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Name:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<label>Athens Intl Airport Elefterios Venizel</label>
|
|
|
|
<!-- The above airport is the longest name in Airports/apt.dat.gz as of 3 November 2012 -->
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/name</property>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>ICAO:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<label>AAAA</label>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/id</property>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Lat / Lon:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<label>XXXXXXXXXXXX</label>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/location</property>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>4</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Elevation:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>4</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<format>%.0f ft</format>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/elevation-ft</property>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>5</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Longest runway:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>5</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<format>%.0f ft</format>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/longest-runway</property>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>6</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Distance:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>6</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<format>%.1f nm</format>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/distance-nm</property>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>7</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Course:</label>
|
|
|
|
</text>
|
|
|
|
<text>
|
|
|
|
<row>7</row>
|
|
|
|
<col>1</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
|
|
|
<format>%.0f deg</format>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/course-deg</property>
|
|
|
|
</text>
|
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<!-- comms frequencies table -->
|
2012-11-05 21:22:20 +00:00
|
|
|
<group>
|
2013-02-08 13:18:51 +00:00
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
2012-11-05 21:22:20 +00:00
|
|
|
<layout>table</layout>
|
2012-11-09 22:41:56 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<default-padding>2</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<colspan>2</colspan>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<label>Communications Frequencies</label>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<hrule><stretch>1</stretch></hrule>
|
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
2012-11-05 21:22:20 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[0]/label</property>
|
|
|
|
</text>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[0]/value</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[1]/label</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-05 21:22:20 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[1]/value</property>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-05 21:22:20 +00:00
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>3</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[2]/label</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[2]/value</property>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>4</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
2012-11-05 21:22:20 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[3]/label</property>
|
|
|
|
</text>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
|
|
|
<text>
|
2012-11-09 22:41:56 +00:00
|
|
|
<row>4</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[3]/value</property>
|
2012-11-05 21:22:20 +00:00
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>5</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[4]/label</property>
|
|
|
|
</text>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>5</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[4]/value</property>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>6</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[5]/label</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>6</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[5]/value</property>
|
|
|
|
</text>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>7</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[6]/label</property>
|
|
|
|
</text>
|
2012-09-19 21:35:56 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>7</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[6]/value</property>
|
|
|
|
</text>
|
2012-09-23 21:45:50 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>8</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[7]/label</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>8</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[7]/value</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>9</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[8]/label</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>9</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[8]/value</property>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>10</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[9]/label</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>10</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[9]/value</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>11</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[10]/label</property>
|
|
|
|
</text>
|
2012-09-17 19:17:52 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>11</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[10]/value</property>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>12</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[11]/label</property>
|
|
|
|
</text>
|
Canvas Scripting Layer (Mapping):
- first stab at refactoring the map.nas module, and trying to let the API evolve according to our requirements
- split up the module into separate files (some of them will disappear soon)
- split up the "drawing" loops into separate functions so that they can be individually called
- move actual "drawing" to map_layers.nas
- introduce some OOP helpers to prepare a pure Layer-based design
- prepare helpers: LayeredMap, GenericMap, AirportMap (TODO: use a real "Layer" class)
- move airport features (taxiways, runways, parking, tower) to separate layers (i.e. canvas groups)
- avoid using a single update callback and use different layer-specific callbacks to update individual layers more efficiently
- add some boilerplate hashes to prepare the MVC design
- allow lazy updating of layers, where canvas groups are only populated on demand, to save some time during instantiation, i.e. loading an airport without "parking" selected, will only populate the layer once the checkbox is checked
- extend the original code such that it supports showing multiple airports at once
- add some proof of concept "navaid" layer using SVG files for navaid symbols (added only NDB symbol from wikimedia commons)
regressions:
- runway highlighting needs to be re-implemented
- parking highlighting will be done differently
- enforcing a specific drawing order for layers is currently not explicitly supported, so that taxiways may be rendered on top of runways
Also:
- integrated with the latest changes in git/master (HEAD) -i.e. metar support
- further generalized map.nas
- partially moved instantiation from Nasal space to XML space (WIP)
- create "toggle layer" checkboxes procedurally in Nasal space
- prepared the code to be better reusable in other dialogs (e.g. route manager, map dialog etc)
- completely removed the "highlighting" (runway/parking) feature for now, because we talked about re-implementing it anyhow
2012-09-20 23:49:17 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>12</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[11]/value</property>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>13</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>left</halign>
|
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>ACTIVATE LIGHTS</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[12]/label</property>
|
|
|
|
</text>
|
2012-11-05 21:22:20 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<text>
|
|
|
|
<row>13</row>
|
|
|
|
<col>1</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
<halign>left</halign>
|
2012-11-09 22:41:56 +00:00
|
|
|
<live>true</live>
|
2013-02-08 13:18:51 +00:00
|
|
|
<label>123.456 123.456</label>
|
2012-11-09 22:41:56 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/comms/freq[12]/value</property>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
</group> <!-- of comm frequencies table -->
|
2014-12-10 22:24:21 +00:00
|
|
|
|
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<!-- runways table -->
|
|
|
|
<group>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<colspan>2</colspan>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<default-padding>2</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<text>
|
|
|
|
<label>Runways</label>
|
|
|
|
</text>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
<hrule><stretch>1</stretch></hrule>
|
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2017-06-08 21:08:08 +00:00
|
|
|
<textbox>
|
2013-02-08 13:18:51 +00:00
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
2017-06-08 21:08:08 +00:00
|
|
|
<name>runways-info</name>
|
|
|
|
<object-name>runways-info</object-name>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<pref-width>260</pref-width>
|
|
|
|
<pref-height>250</pref-height>
|
|
|
|
<slider>15</slider>
|
|
|
|
<editable>false</editable>
|
|
|
|
<wrap>false</wrap>
|
|
|
|
<property>/sim/gui/dialogs/airports/selected-airport/runways-info</property>
|
|
|
|
</textbox>
|
|
|
|
</group> <!-- of runways table -->
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2013-02-08 13:18:51 +00:00
|
|
|
</group> <!-- of airport info outer table -->
|
2012-11-05 21:22:20 +00:00
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
</group>
|
|
|
|
<!-- End of RH Pane -->
|
2012-09-17 19:17:52 +00:00
|
|
|
</group>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<hrule/>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>5</default-padding>
|
2014-12-10 22:24:21 +00:00
|
|
|
|
2012-11-09 22:41:56 +00:00
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Go To Airport</legend>
|
|
|
|
<equal>true</equal>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>apply()</script>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
2014-03-05 16:46:10 +00:00
|
|
|
<command>reposition</command>
|
2012-11-09 22:41:56 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Close</legend>
|
|
|
|
<equal>true</equal>
|
|
|
|
<key>Esc</key>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
</group>
|
|
|
|
</PropertyList>
|