Aircraft Center
This article describes content/features that may not yet be available in the latest stable version of FlightGear (2020.3). You may need to install some extra components, use the latest development (Git) version or even rebuild FlightGear from source, possibly from a custom topic branch using special build settings: .This feature is scheduled for FlightGear 4.2. If you'd like to learn more about getting your own ideas into FlightGear, check out Implementing new features for FlightGear. |
This article is a stub. You can help the wiki by expanding it. |
Background
The "built-in" GUI/launcher is one of the longest-standing feature requests - but it's not just about the GUI (which is rather straightforward in comparison), but about the simulator never having been developed with this requirement, i.e. run-time reinitialization, in mind - thus, things like "fgrun" (and a plethora of other external launchers) were developed, which acted as a front-end on top of FG, so that FG itself wouldn't need to be changed - i.e. kind of a "remote control" using command line arguments. So it's there for a reason - fgrun uses the FLTK GUI library, which while relatively simple, is much more powerful than our legacy GUI engine, PUI.
— Hooray (Thu Jun 26). Re: About FlightGear being user-friendly or not.
(powered by Instant-Cquotes) |
And yes, even the legacy FG GUI is entirely based on XML and configurable through just editiing XML files - but the collection of "widgets" (GUI controls like buttons, checkboxes, labels etc) is extremely small and very inflexible.
— Hooray (Thu Jun 26). Re: About FlightGear being user-friendly or not.
(powered by Instant-Cquotes) |
Status
I made some experiments with creating a GUI using Canvas, but it’s not an area I especially enjoy or feel comfortable working in, so progress was slow, and recently, non-existant.
— James Turner (2014-05-24). Re: [Flightgear-devel] 24 days from freeze: what happened to....
|
've pushed now a first version of an aircraft install/removal dialog. Was a lot more effort than expected, but now there are a lot of — Thomas Geymayer (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
|
The dialog is available in the menu (File > Aircraft Center) and shows a list of the 100 first aircrafts available to install/remove. I've — Thomas Geymayer (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
|
Thomas Geymayer and I are working on it, I am not sure where’s he go to with the UI, the backend pieces are mostly there but will need some intensive testing. There is a #define flag you can toggle (in HTTPClient.cxx) to enable the code including the Nasal API; it will download / refresh a catalog, which is generated by the scripts I committed to fgmeta a week ago. Then you can access the package system from pkg.root in the Nasal console, using the API defined at the bottom of HTTPClient.cxx.
— James Turner (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
|
Placeholder
also suspect that there are some logistical issues to solve for aircraft downloads, since it needs aircraft developers and ‘the project’ to start thinking about hangar structures and adding better metadata to aircraft -set.xml; but no one is going to consider those issues until the GUI interface exists. Of course we can initially make a hangar / catalog from all aircraft in fgdata - we already have some tooling around this anyway, which Curt & Gijs use to create the aircraft pages on flightgear.org.
— James Turner (2014-05-24). Re: [Flightgear-devel] 24 days from freeze: what happened to....
|
Well, if we make a manual catalog.xml from the current fgdata/Aircraft (which I have parts of a script to do), and we treat the current aircraft zip URLs as canonical, that is possible with current code right now - since it can do the zip download + extraction to a directory of our choice. We could throw an (ugly) PUI UI around that, and then if someone with more talent than me wants to Canvas-GUI-ify it, that will be great.
— James Turner (2014-05-30). Re: [Flightgear-devel] select/download aircraft.
|
f you give me something that shows how to do this I can put it in a canvas dialog and see what is missing. Nearly all required parts for — Thomas Geymayer (2014-05-30). Re: [Flightgear-devel] select/download aircraft.
|
My next objective will be actually switching to an aircraft, and setting up the correct paths so that dependencies work; this is more or less orthogonal, I will make a new command to select an aircraft (and reset the sim) based on an aircraft ID or fully-qualified ID. (Again to allow catalogs with ID collisions, such as org.flightgear.default.747-400 and nl.gijs-hangar.beta.747-400)
— James Turner (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
|
the whole thing is still pretty experimental, it’s probably not at the ‘this text should be a little to the left’ point. We’re more at the ‘it didn’t erase your C drive? Great!’ stage….
— James Turner (2014-06-13). Re: [Flightgear-devel] Notes on Aircraft Center....
|
The layout and widget systems is now maturing, so I think after 3.2 I can start with porting PUI. Just one major component is missing, namely — Thomas Geymayer (2014-06-13). Re: [Flightgear-devel] Notes on Aircraft Center....
|
Tagging
Related to this, does anyone know how standardised the <status> values are? If there is a defined list of values I will add query support and expose them as an enum to Nasal.
— James Turner (2014-06-11). Re: [Flightgear-devel] select/download aircraft.
|
have updated my script with to restrict tags to the set I original wrote on the wiki some time ago:
— James Turner (2014-06-12). Re: [Flightgear-devel] select/download aircraft.
|
Variants
I don’t think there’s any pathological examples with more than eight -set.xml. Designating the ‘main’ -set.xml is still an issue.
— James Turner (2014-06-13). Re: [Flightgear-devel] select/download aircraft.
|
Development
I thought about adding a cache add Canvas::Image or rather at the HTTPRequest level to cache all HTTP requests/files which have not set — Thomas Geymayer (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
|
for a first step I want to limit it only to the HTTPMemoryRequest which is mainly used for downloading canvas images. So — Thomas Geymayer (2014-06-10). Re: [Flightgear-devel] select/download aircraft.
|
A semi-related small thing: I'd like to have saved-between-sessions "default aircraft/starting airport" properties (/sim/default-aircraft, — Rebecca N. Palmer (2014-05-30). Re: [Flightgear-devel] select/download aircraft.
|
Currently box layouts are available. Once they fully work I'll start thinking of other layouts and widgets. — Thomas Geymayer (2014-06-13). Re: [Flightgear-devel] Notes on Aircraft Center....
|
I want to implement a cache to speed it up after the first time, but not for — Thomas Geymayer (2014-06-13). Re: [Flightgear-devel] Notes on Aircraft Center....
|
what I’d want is tabs at the top for ‘installed aircraft’, ‘available updates’ and so on. But again the question is really what UI we can build in the time available.
— James Turner (2014-06-13). Re: [Flightgear-devel] Notes on Aircraft Center....
|
Known Issues
Prior to a reset, if you edit /sim/aircraft, it works as you would expect. However there are some quirks related to aircraft-specific menu items / dialogs, at least on Mac (the custom menu for previous aircraft is not removed).
— James Turner (2014-05-30). Re: [Flightgear-devel] select/download aircraft.
|
If you've created a grid control for Canvas, it would be nice to see the FDM, Systems, Cockpit and Model ratings broken out into individual columns — geneb (2014-06-13). [Flightgear-devel] Notes on Aircraft Center....
|