Board index FlightGear Development New features

Realistic Procedures (SID / STARS)

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: Realistic Procedures (SID / STARS)

Postby wkitty42 » Thu Dec 07, 2017 12:42 am

@www2: this may be deeper than just the route manager... i've added a question to your report related to our recent moving of 3 letter IDs up one directory level to where they should have been placed according to the placement rules...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5568
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Realistic Procedures (SID / STARS)

Postby www2 » Thu Dec 07, 2017 1:03 am

wkitty42 wrote in Thu Dec 07, 2017 12:42 am:@www2: this may be deeper than just the route manager... i've added a question to your report related to our recent moving of 3 letter IDs up one directory level to where they should have been placed according to the placement rules...

Thx.
I have report this on the dev list in June 2016 (send on 26-06-2016).

I have found a bug with 3 charter ICAO/FAA code That wont load as
Depature and Arrival in Route manager/prop tree.

Testerd on Ubuntu 16.04 64bit with the lases git.

FAA codes that i have tested:
49U
U36
3Q0
www2
 
Posts: 254
Joined: Thu Apr 16, 2009 1:58 pm

Re: Realistic Procedures (SID / STARS)

Postby wkitty42 » Thu Dec 07, 2017 2:28 am

ahh... ok... you reported that before the move, then... TorstenD responded to my initial post on 2016 Oct 6 that the move would be available in terrasync the next day... my initial post, subject line "three-letter ICAO files in wrong directories...", was sent to the dev list 2016 Sep 23... at that time, i had only tested the three letter airports as starting locations... i don't recall if i tested them in the default route manager or not...

with your report being before the move, i would have to say that the move is not (part of) the problem...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5568
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Realistic Procedures (SID / STARS)

Postby legoboyvdlp » Thu Dec 07, 2017 3:32 am

ww2,
I only edited the gui. I did not touch the route manager code, which is where that bug will have to be fixed. I'll let the experts deal with that.
User avatar
legoboyvdlp
 
Posts: 6931
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Realistic Procedures (SID / STARS)

Postby www2 » Thu Dec 07, 2017 1:19 pm

legoboyvdlp:
No problem

wkitty42:
I can point that this problem is some ware in the prop tree or C++ code.
www2
 
Posts: 254
Joined: Thu Apr 16, 2009 1:58 pm

Re: Realistic Procedures (SID / STARS)

Postby disguisedelk » Thu Dec 07, 2017 3:30 pm

legoboyvdlp wrote in Wed Dec 06, 2017 7:36 pm:Image

Sent to mailing list for inclusion in 2018.1

That looks brillant :)
disguisedelk
 
Posts: 31
Joined: Wed Sep 20, 2017 5:54 pm

Re: Realistic Procedures (SID / STARS)

Postby wkitty42 » Thu Dec 07, 2017 3:58 pm

@lego: you should try KATL as your destination and see how a long STAR list works... i kinda like it even though james doesn't... what i don't see is how you can tell which runway, SID, approach or STAR you have selected... in my post to the dev list, even though i wrote that drop lists with scroll bars are ugly, that probably is the best way to go... but it is PUI stuff which is going byebye in the near-ish future...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5568
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Realistic Procedures (SID / STARS)

Postby legoboyvdlp » Thu Dec 07, 2017 4:01 pm

Okay :) Thanks!
If PUI is going, then this can be a reasonable meantime compromise.
User avatar
legoboyvdlp
 
Posts: 6931
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Realistic Procedures (SID / STARS)

Postby Hooray » Thu Dec 07, 2017 5:45 pm

https://sourceforge.net/p/flightgear/ma ... /36149876/
The issue is that even on the larger screens, you
can't get the entire list of SIDS or STARs displayed when there are too
many. This is a compromise, which solves that issue. If there is any
alternative, please do share it :)


It would be pretty straightforward to replace the corresponding hard-coded waypointlist PUI widget using a Nasal/Canvas replacement - that is what Stuart did in the airports.xml (airport selection dialog) - so it is a feasible solution:

http://wiki.flightgear.org/Canvas_News# ... rports.xml
Image

So the PUI dialog is showing an embedded Canvas, and it can also display arbitrary Canvas elements, including widgets:
Image


It took me only 30 lines of Nasal code to approximate the propertylist widget (property browser) using the same approach.
The only thing that is needed to make that happen is scripting space access to the route manager/waypoint APIs, which we have - i.e. it cannot be done with dialogs using data that is only available in C++ space (e.g. the loglist widget).

Anyway, someone familiar with Nasal/Canvas could easily replace the waypointlist using at most 50 lines of Nasal code, which would mean that it could even support proper tables and tooltips if people wanted to these things, including even context menus.

http://wiki.flightgear.org/Howto:Proces ... ist_widget
Image

To turn the whole dialog into a native Canvas GUI dialog, a combo/list (dropdown menu) widget would need to be implemented, too - but that isn't that difficult either.
As a matter of fact, one of the fgmembers co-founds (Jabberwocky) once tinkered with a popup-based Canvas GUI menubar using the tooltip API:

http://wiki.flightgear.org/Howto:Making ... as_Menubar
Image
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Realistic Procedures (SID / STARS)

Postby V12 » Mon Jun 11, 2018 5:49 pm

Hi lego,
can You upload somewhere this modified route manager dialog ?
Thanx in advande.
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1445
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Realistic Procedures (SID / STARS)

Postby legoboyvdlp » Mon Jun 11, 2018 7:52 pm

Hi,
Sorry, I don't actually have it anymore. It might be on the mailing list.
Jonathan
User avatar
legoboyvdlp
 
Posts: 6931
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Realistic Procedures (SID / STARS)

Postby V12 » Tue Jun 12, 2018 5:21 am

I found it in mailing list. Many thanks. I will try to replace SID and STAR combos with lists in the default RM dialog. IMHO, runways and approaches combo selectors areOK.
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1445
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Re: Realistic Procedures (SID / STARS)

Postby V12 » Tue Jun 12, 2018 4:03 pm

Mission acomplished !
My modified Route Manager dialog :

Image

Code: Select all
<?xml version="1.0"?>

<!--
command interface /autopilot/route-manager/input:

  @clear             ... clear route
  @pop               ... remove first entry
  @delete3           ... delete 4th entry
  @insert2:ksfo@900  ... insert "ksfo@900" as 3rd entry
  ksfo@900           ... append "ksfo@900"

-->

<PropertyList>
    <name>route-manager</name>
    <layout>vbox</layout>
    <resizable>true</resizable>

    <nasal>
        <open><![CDATA[
            var ft = getprop("/sim/startup/units") == "feet";
            var dlg = props.globals.getNode("/sim/gui/dialogs/route-manager", 1);
            var selection = dlg.getNode("selection", 1);
            var input = dlg.getNode("input", 1);
            var routem = props.globals.getNode("/autopilot/route-manager", 1);

            selection.setIntValue(-1);
            input.setValue("");

            var list = cmdarg().getNode("list");
            var cmd = routem.getNode("input", 1);
            var route = routem.getNode("route", 1);
            var dep = routem.getNode("departure", 1);
            var dest = routem.getNode("destination", 1);

            var sel_index = func {
                return int(selection.getValue());
            }

            var clear = func {
                flightplan().cleanPlan();
                selection.setIntValue(-1);
            }

            var insert = func {
                var insertIndex = sel_index();
                if (insertIndex < 0) {
                    var msg = "Select the waypoint after which new waypoints should be added";
                    setprop("sim/messages/copilot", msg);
                    return;
                }

                # Input is a list of space-separated waypoint specifications
                var argv = split(" ", input.getValue());
                foreach (var arg; argv) {
                    # When argument is not empty (caused by multiple space
                    # separators) insert *after* waypoint
                    if (size(arg) > 0) {
                        insertIndex += 1;
                        cmd.setValue("@insert" ~ insertIndex ~ ":" ~ arg);
                    }
                }

                input.setValue("");
                selection.setValue(insertIndex);
                gui.dialog_update("route-manager");
            }

            var remove = func {
                flightplan().deleteWP(sel_index());
            }

            var route = func {
                var fp = flightplan();
                var from = fp.getWP(sel_index() - 1);
                var to = fp.getWP(sel_index());

                if ((from  == nil ) or (to == nil)) {
                    printlog('info', 'unable to route, invalid start ad end points');
                    return;
                }

                var route = airwaysRoute(from, to);
                fp.insertWaypoints(route, sel_index());
            }

            var jump_to = func {
                flightplan().current = sel_index();
            }

            var load_route = func(path) {
                routem.getNode("file-path", 1).setValue(path.getValue());
                cmd.setValue("@load");
                gui.dialog_update("route-manager");
            }

            var save_route = func(path) {
                routem.getNode("file-path", 1).setValue(path.getValue());
                cmd.setValue("@save");
                gui.dialog_update("route-manager");
            }

            var defaultDirInFileSelector = getprop("/sim/fg-home") ~ "/Export";

            var file_selector = gui.FileSelector.new(
              callback: load_route, title: "Load flight-plan", button: "Load",
              dir: defaultDirInFileSelector, dotfiles: 1);
            var save_selector = gui.FileSelector.new(
              callback: save_route, title: "Save flight-plan", button: "Save",
              dir: defaultDirInFileSelector, dotfiles: 1);

            var activate_fp = func {
                fgcommand("activate-flightplan", props.Node.new({"activate": 1}));
            }

            var departureRunways = dlg.getNode("departure-runways", 1);
            var destRunways = dlg.getNode("destination-runways", 1);
            var sids = dlg.getNode("sids", 1);
            var stars = dlg.getNode("stars", 1);
            var approaches = dlg.getNode("approaches", 1);

            var updateRunways = func {
                departureRunways.removeChildren("value");
                destRunways.removeChildren("value");

                var apt = flightplan().departure;
                if (apt != nil) {
                    var i=0;
                    foreach (var rwy; keys(apt.runways)) {
                        departureRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
                        i += 1;
                    }
                }

                apt = flightplan().destination;
                if (apt != nil) {
                    var i=0;
                    foreach (var rwy; keys(apt.runways)) {
                        destRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
                        i += 1;
                    }
                }

                gui.dialog_update("route-manager");
            }

            var updateSIDs = func {
                sids.removeChildren("value");

                var apt = flightplan().departure;
                var rwy = flightplan().departure_runway;
                if (apt == nil) {
                    return;
                }

                if (size(apt.sids(rwy)) == 0) {
                    sids.getNode("value[0]", 1).setValue("DEFAULT");
                    sids.getNode("value[1]", 1).setValue("(none)");
                    gui.dialog_update("route-manager", "sid");
                    return;
                }

                var i=1;
                sids.getNode("value[0]", 1).setValue("(none)");
                foreach (var s; apt.sids(rwy)) {
                    var sid = apt.getSid(s);
                    var transVec = sid.transitions;

                    if (size(transVec) > 0) {
                        # list each transition of the SID
                        foreach (var trans; transVec) {
                            sids.getNode("value[" ~ i ~ "]", 1).setValue(s ~ "-" ~ trans);
                            i += 1;
                        }
                    } else {
                        # no transitions defined, simple case
                        sids.getNode("value[" ~ i ~ "]", 1).setValue(s);
                        i += 1;
                    }
                }

                gui.dialog_update("route-manager", "sid");
            }

            var updateSTARs = func {
                stars.removeChildren("value");
                var apt = flightplan().destination;
                var rwy = flightplan().destination_runway;
                if (apt == nil or apt.stars(rwy) == nil) {
                    return;
                }

                var i=1;
                stars.getNode("value[0]", 1).setValue("(none)");
                foreach (var s; apt.stars(rwy)) {
                    var star = apt.getStar(s);
                    var transVec = star.transitions;

                    if (size(transVec) > 0) {
                        # list each transition of the STAR
                        foreach (var trans; transVec) {
                            stars.getNode("value[" ~ i ~ "]", 1).setValue(s ~ "-" ~ trans);
                            i += 1;
                        }
                    } else {
                        # no transitions defined, simple case
                        stars.getNode("value[" ~ i ~ "]", 1).setValue(s);
                        i += 1;
                    }
                }

                gui.dialog_update("route-manager", "star");
            }

            var updateApproaches = func {
                approaches.removeChildren("value");
                var apt = flightplan().destination;
                var rwy = flightplan().destination_runway;

                if (apt == nil) {
                    return;
                }

                if (size(apt.getApproachList(rwy)) == 0) {
                    approaches.getNode("value[0]", 1).setValue("DEFAULT");
                    approaches.getNode("value[1]", 1).setValue("(none)");
                    gui.dialog_update("route-manager", "approach");
                    return;
                }

                var i=1;
                approaches.getNode("value[0]", 1).setValue("(none)");
                foreach (var s; apt.getApproachList(rwy)) {
                    approaches.getNode("value[" ~ i ~ "]", 1).setValue(s);
                    i += 1;
                }

                gui.dialog_update("route-manager", "approach");
            }

            var initPosition = func {
              var routeActive = routem.getNode("active").getValue();
              if (routeActive) return;

              # FIXME have user waypoints check
              var fp = flightplan();

              var airborne = getprop('/gear/gear[0]/wow') == 0;
              if (airborne) {
                printlog('info', 'route-manager dialog, init in-air, clearing departure settings');
                fp.departure = nil;
                return;
              }



              # we're on the ground, find the nearest airport to start from
              if (fp.departure == nil) {
                var apts = findAirportsWithinRange(25.0);
                if (size(apts) == 0) return; # no airports nearby
                fp.departure = apts[0]; # use the closest one
              }

              if (fp.departure_runway == nil) {
                printlog('info', 'selecting departure runway');
                var rwy = fp.departure.findBestRunwayForPos( geo.aircraft_position() );
                fp.departure_runway = rwy;
              }
            }

        # initialise departure values based on current position
            initPosition();

            updateRunways();
            updateSIDs();
            updateSTARs();
            updateApproaches();
        ]]></open>

        <close>
            file_selector.del();
            save_selector.del();
        </close>
    </nasal>

    <group>
        <layout>hbox</layout>
        <empty><stretch>1</stretch></empty>

        <text>
            <label>Route Manager</label>
        </text>

        <empty><stretch>1</stretch></empty>

        <button>
            <pref-width>16</pref-width>
            <pref-height>16</pref-height>
            <legend></legend>
            <default>1</default>
            <keynum>27</keynum>
            <border>2</border>

            <binding>
                <command>dialog-close</command>
            </binding>
        </button>
    </group>
    <hrule/>
    <!-- departure / arrival airport information -->

    <group>
        <layout>table</layout>
        <text>
            <row>0</row>
            <col>0</col>
            <halign>right</halign>
            <label> Departure:</label>
        </text>
        <input>
            <row>0</row>
            <col>1</col>
            <halign>left</halign>
            <name>departure-airport</name>
            <pref-width>70</pref-width>
            <property>/autopilot/route-manager/departure/airport</property>
            <live>true</live>
            <binding>
                <command>dialog-apply</command>
                <object-name>departure-airport</object-name>
            </binding>

            <binding>
                <command>nasal</command>
                <script>updateRunways();</script>
            </binding>
        </input>

        <text>
            <row>0</row>
            <col>2</col>
            <format>%s</format>
            <property>/autopilot/route-manager/departure/name</property>
            <live>true</live>
            <stretch>true</stretch>
            <halign>fill</halign>
        </text>

        <text>
            <row>0</row>
            <col>3</col>
            <halign>right</halign>
            <label>Rwy:</label>
        </text>
        <combo>
            <row>0</row>
            <col>4</col>
            <halign>left</halign>
            <name>departure-runway</name>
            <property>/autopilot/route-manager/departure/runway</property>
            <editable>false</editable>
            <properties>/sim/gui/dialogs/route-manager/departure-runways</properties>

            <binding>
                <command>dialog-apply</command>
                <object-name>departure-runway</object-name>
            </binding>
            <binding>
                <command>nasal</command>
                <script>updateSIDs();</script>
            </binding>
        </combo>

        <text>
            <row>0</row>
            <col>7</col>
            <halign>right</halign>
            <label>SID:</label>
        </text>
        <list>
            <row>0</row>
            <col>8</col>
         <pref-width>120</pref-width>
         <pref-height>75</pref-height>
            <halign>left</halign>
            <name>sid</name>
            <property>/autopilot/route-manager/departure/sid</property>
            <editable>false</editable>
            <properties>/sim/gui/dialogs/route-manager/sids</properties>

            <binding>
                <command>dialog-apply</command>
                <object-name>sid</object-name>
            </binding>
        </list>

        <input>
            <row>0</row>
            <col>9</col>
            <halign>left</halign>
            <name>SID</name>
            <pref-width>80</pref-width>
            <property>/autopilot/route-manager/departure/sid</property>
            <live>false</live>
        </input>

        <text>
            <row>0</row>
            <col>10</col>
            <halign>right</halign>
            <label> </label>
        </text>

        <text>
            <row>1</row>
            <col>0</col>
            <halign>right</halign>
            <label>Arrival:</label>
        </text>
        <input>
            <row>1</row>
            <col>1</col>
            <halign>left</halign>
            <pref-width>70</pref-width>
            <name>destination-airport</name>
            <property>/autopilot/route-manager/destination/airport</property>
            <live>true</live>
            <binding>
                <command>dialog-apply</command>
                <object-name>destination-airport</object-name>
            </binding>
            <binding>
                <command>nasal</command>
                <script>updateRunways();</script>
            </binding>
        </input>
        <text>
            <row>1</row>
            <col>2</col>
            <stretch>true</stretch>
            <pref-width>200</pref-width>
            <format>%s</format>
            <property>/autopilot/route-manager/destination/name</property>
            <live>true</live>
            <halign>fill</halign>
        </text>

        <text>
            <row>1</row>
            <col>3</col>
            <halign>right</halign>
            <label>Rwy:</label>
        </text>
        <combo>
            <row>1</row>
            <col>4</col>
            <halign>left</halign>
            <name>destination-runway</name>
            <property>/autopilot/route-manager/destination/runway</property>
            <editable>false</editable>
            <properties>/sim/gui/dialogs/route-manager/destination-runways</properties>

            <binding>
                <command>dialog-apply</command>
                <object-name>destination-runway</object-name>
            </binding>

            <binding>
                <command>nasal</command>
                <script>
                    updateSTARs();
                    updateApproaches();
                </script>
            </binding>
        </combo>

        <text>
            <row>1</row>
            <col>5</col>
            <halign>right</halign>
            <label>Approach:</label>
        </text>
        <combo>
            <row>1</row>
            <col>6</col>
            <pref-width>120</pref-width>
            <halign>left</halign>
            <name>approach</name>
            <property>/autopilot/route-manager/destination/approach</property>
            <editable>false</editable>
            <properties>/sim/gui/dialogs/route-manager/approaches</properties>

            <binding>
                <command>dialog-apply</command>
                <object-name>approach</object-name>
            </binding>
        </combo>


        <text>
            <row>1</row>
            <col>7</col>
            <halign>right</halign>
            <label>STAR:</label>
        </text>
        <list>
            <row>1</row>
            <col>8</col>
         <pref-width>120</pref-width>
         <pref-height>75</pref-height>
            <halign>left</halign>
            <name>star</name>
            <property>/autopilot/route-manager/destination/star</property>
            <editable>false</editable>
            <properties>/sim/gui/dialogs/route-manager/stars</properties>

            <binding>
                <command>dialog-apply</command>
                <object-name>star</object-name>
            </binding>
        </list>

        <input>
            <row>1</row>
            <col>9</col>
            <halign>left</halign>
            <name>STAR</name>
            <pref-width>80</pref-width>
            <property>/autopilot/route-manager/destination/star</property>
            <live>false</live>
        </input>

        <text>
            <row>1</row>
            <col>10</col>
            <halign>right</halign>
            <label> </label>
        </text>


    </group>
    <!--
    <group>
        <layout>hbox</layout>
        <text>
            <label>Alternate:</label>
            <pref-width>80</pref-width>
        </text>
        <input>
            <name>alt-airport</name>
            <halign>fill</halign>
            <stretch>true</stretch>
            <pref-width>150</pref-width>
            <property>/autopilot/route-manager/alternate/airport</property>
        </input>

    </group>
    -->
    <group>
        <layout>hbox</layout>
        <text>
            <halign>right</halign>
            <label>  Cruise Speed (kts):</label>
        </text>
        <input>
            <name>cruise-speed</name>
            <live>true</live>
            <halign>left</halign>
            <stretch>true</stretch>
            <pref-width>100</pref-width>
            <property>/autopilot/route-manager/cruise/speed-kts</property>
            <binding>
                <command>dialog-apply</command>
                <object-name>cruise-speed</object-name>
            </binding>
        </input>

        <text>
            <label>Cruise Altitude (ft/FL):</label>
            <halign>right</halign>
        </text>
        <input>
            <name>cruise-alt</name>
            <live>true</live>
            <halign>left</halign>
            <stretch>true</stretch>
            <pref-width>100</pref-width>
            <property>/autopilot/route-manager/cruise/altitude-ft</property>
            <binding>
                <command>dialog-apply</command>
                <object-name>cruise-alt</object-name>
            </binding>
        </input>
    </group>

    <hrule/>

    <group>
        <layout>hbox</layout>
        <default-padding>2</default-padding>

        <text>
            <label>MMMMMMMMMMMMMMMM</label>
            <format>Target: %s</format>
            <property>/autopilot/route-manager/wp[0]/id</property>
            <live>true</live>
        </text>

        <text>
            <label>MMMMMMMMM</label>
            <format>Dist: %.2f nm</format>
            <property>/autopilot/route-manager/wp[0]/dist</property>
            <live>true</live>
        </text>

        <text>
            <label>MMMMMMMMM</label>
            <format>ETA: %s</format>
            <property>/autopilot/route-manager/wp[0]/eta</property>
            <live>true</live>
        </text>
    </group>

    <group>
        <layout>hbox</layout>
        <default-padding>2</default-padding>
        <stretch>true</stretch>
        <halign>fill</halign>
        <valign>fill</valign>

        <!-- gap -->
        <text>
          <label> </label>
        </text>

        <waypointlist>
            <name>list</name>
            <halign>fill</halign>
            <valign>fill</valign>
            <stretch>true</stretch>
            <pref-height>150</pref-height>
            <property>/sim/gui/dialogs/route-manager/selection</property>
            <binding>
                <command>dialog-apply</command>
                <object-name>list</object-name>
            </binding>
        </waypointlist>

        <!-- gap -->
        <text>
          <label> </label>
        </text>

    </group>

    <group>
        <layout>hbox</layout>
        <default-padding>4</default-padding>

        <text>
            <label>  Waypoint:</label>
<!--
            <pref-width>60</pref-width>
-->
        </text>

        <input>
            <name>input</name>
            <halign>fill</halign>
            <stretch>true</stretch>
            <pref-width>220</pref-width>
            <property>/sim/gui/dialogs/route-manager/input</property>
        </input>

        <button>
            <legend>Add</legend>
            <default>true</default>
<!--
            <pref-width>70</pref-width>
-->
            <binding>
                <command>dialog-apply</command>
                <object-name>input</object-name>
            </binding>
            <binding>
                <command>nasal</command>
                <script>insert()</script>
            </binding>
            <binding>
                <command>dialog-update</command>
            </binding>
        </button>

        <!-- gap -->
        <text>
          <label></label>
        </text>
    </group>

    <text>
        <padding>1</padding>
        <label>Format: list of (airport|fix|nav|nav/rad/dst|lon,lat)[@alt] -- e.g. "KSFO@900", "SAHEY CIITY@6000"</label>
        <color>
            <red>0.7</red>
            <green>0.7</green>
            <blue>0.7</blue>
        </color>
    </text>

    <!-- button field -->
    <group>
        <layout>hbox</layout>
        <halign>fill</halign>
        <default-padding>8</default-padding>

        <button>
            <legend>Clear List</legend>
            <equal>true</equal>
            <binding>
                <command>nasal</command>
                <script>clear()</script>
            </binding>
        </button>

        <button>
            <legend>Remove</legend>
            <equal>true</equal>
            <enable>
                <greater-than>
                <property>/sim/gui/dialogs/route-manager/selection</property>
                <value>-1</value>
                </greater-than>
            </enable>
            <binding>
                <command>nasal</command>
                <script>remove()</script>
            </binding>
        </button>

        <button>
            <legend>Route</legend>
            <equal>true</equal>
            <binding>
              <command>nasal</command>
              <script>route()</script>
            </binding>
        </button>
<!--
        <button>
            <legend>Auto-route</legend>
            <equal>true</equal>
            <binding>
                <command>nasal</command>
                <script>auto_route()</script>
            </binding>
        </button>
-->
        <button>
            <legend>Jump To</legend>
            <enable>
                <greater-than>
                <property>/sim/gui/dialogs/route-manager/selection</property>
                <value>-1</value>
                </greater-than>
            </enable>
            <binding>
                <command>nasal</command>
                <script>jump_to()</script>
            </binding>
        </button>

        <button>
            <legend>Activate</legend>
            <equal>true</equal>
            <enable>
                <not><property>/autopilot/route-manager/active</property></not>
            </enable>
            <binding>
                <command>dialog-apply</command>
            </binding>
            <binding>
                <command>nasal</command>
                <script>activate_fp()</script>
            </binding>
        </button>

        <empty><stretch>true</stretch></empty>
        <!-- gap -->
        <text>
          <label></label>
        </text>

        <button>
            <legend>Load ...</legend>
            <equal>true</equal>
            <enable>
            <not><property>/autopilot/route-manager/active</property></not>
            </enable>
            <binding>
                <command>nasal</command>
                <script>file_selector.open()</script>
            </binding>
        </button>
        <button>
            <legend>Save ...</legend>
            <equal>true</equal>
            <binding>
                <command>nasal</command>
                <script>save_selector.open();</script>
            </binding>
        </button>
        <button>
            <legend>Close</legend>
            <equal>true</equal>
            <key>Esc</key>
            <binding>
                <command>dialog-close</command>
            </binding>
        </button>
    </group>
</PropertyList>
Fly high, fly fast - fly Concorde !
User avatar
V12
 
Posts: 1445
Joined: Thu Jan 12, 2017 4:27 pm
Location: LZIB
Callsign: BAWV12

Previous

Return to New features

Who is online

Users browsing this forum: No registered users and 5 guests