FlightGear Newsletter July 2017

From FlightGear wiki
Revision as of 13:52, 22 July 2017 by Legoboyvdlp (talk | contribs) (expansion)
Jump to navigation Jump to search
This newsletter is a draft.

Please feel free to add content that you think will be of interest to the FlightGear community.
You can read the latest newsletter at FlightGear Newsletter June 2017.


Magagazine.png
Enjoy reading the latest edition!
Please help us write the coming edition!
July 2017

Development news
Addons
Spoken ATC
Creating Canvas UI dialogs procedurally
FlightGear Headless
ALS effects and Canvas
In the hangar

AI
Santa Barbara AI Traffic updated
Air Serbia Traffic File Renamed
AI Log warnings improved
Recent Updates
Scenery Corner
Lisbon
London Heathrow

Community News
Now That We're Masters World Tour 2017
Contributing
PSA: Translations/en renamed
Translators required
FlightGear logos
Screenshots
Screenshot of the Month

Development news

Addons

We now have a simple API to add addons to FlightGear without the need to mess around with FGData/Nasal or FGHome/Nasal directories. FlightGear now accepts the command line switch --addon=/path/to/some/addon (note: command line switch is just that: a command line switch - not an option to be entered into the launcher). FlightGear, (through options.cxx) takes care of:

  • creating a property under /addons/addon[n]/path=/path/to/some/addon
  • adding /path/to/some/addon/config.xml as a config file (same as --config=/path/to/some/addon/config.xml)
  • adding /path/to/some/addon to the list of allowed directories (same as --fg-aircraft=/path/to/some/addon)

The addon may be installed anywhere on your hard disk and it needs at least two files:

  • config.xml - a standard PropertyList to be used to populate or modify the property tree. (Same as to be used in --config=foo.xml)
  • main.nas - the Nasal hook for the logic. This file needs a function called main() which will be called from the global addon initialier (FGData/addons.nas)

It is pretty simple but does it's job nicely with two addons we currently have in FGAddon (ATCChatter and SpokenATC). There is a /very/ simple Skeleton addon available to be used as a boilerplate here: https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Addons/Skeleton/. As always: feedback is much appreciated. [1] [2]

Triggered by this addon, Torsten has overhauled the addon "API" to make it a little easier to use.

Along with this, he added the spoken ATC feature as an addon to fgaddon: https://sourceforge.net/p/flightgear/fgaddon/HEAD/tree/trunk/Addons/SpokenATC/ It is now very easy to use (given you have FlightGear compiled from git HEAD or use FlightGear 2017.3.x or later.

You need at least these commits:

FlightGear: https://sourceforge.net/p/flightgear/flightgear/ci/f6698a0b1f9e8c0791314aa09cbe1625927ef3ff/

FGData: https://sourceforge.net/p/flightgear/fgdata/ci/5c1f4a69f131a55521050f4631b8fda42f050dd2/

[3]

Spoken ATC

Screenshot showing Spoken ATC in action.

rleibner is working on an atc.nas script, and it's time to share with you the beta version. The module is not intended to compete with FGComm, Festival or other similar features. On the contrary, its use is indicated if these are not available (eg, few hardware resources, no Internet connection, etc.) [4]


Spoken ATC allows the pilot to listen to the directives of the Air Traffic Controller.

Creating Canvas UI dialogs procedurally

1rightarrow.png See Draw masks for the main article about this subject.

FlightGear Draw masks GUI dialog procedurally created by the Canvas system.s

Most end-users will hardly be familiar with so called Draw masks, however one stated goal is to add more node bits (and a GUI dialog to control them) so various categories of objects can be disabled during the update pass.

This will mean the direct hit of, say, AI models vs particles vs random trees can be measured.

Of course it won't account for resources (memory, textures) burned by such things, but would still help different people identify slowness on their setups. [5]

The following snippet of Nasal/Canvas code (mostly based on code taken from Canvas Snippets demonstrates how easily such a dialog can be procedurally created using the Canvas system:

var (width,height) = (320,160);
var title = 'Draw Masks';

var window = canvas.Window.new([width,height],"dialog").set('title',title);

window.del = func()
{
  print("Cleaning up window:",title,"\n");
  call(canvas.Window.del, [], me);
};

# adding a canvas to the new window and setting up background colors/transparency
var myCanvas = window.createCanvas().set("background", canvas.style.getColor("bg_color"));

# creating the top-level/root group which will contain all other elements/group
var root = myCanvas.createGroup();

var drawMasks = props.globals.getNode("/sim/rendering/draw-mask").getChildren();

# create a new layout
window.Layout = canvas.VBoxLayout.new();

# assign it to the Canvas
myCanvas.setLayout(window.Layout);


foreach(var mask; drawMasks) {

(func() {
var m = mask;

# print("Found mask:", mask.getName(), "=", mask.getValue() );

var checkbox = canvas.gui.widgets.CheckBox.new(root, canvas.style, {wordWrap: 0})
.setText( "render "  ~ m.getName() )
.listen("toggled", func(e) {
			      setprop(m.getPath(), e.detail.checked);
                            })
.setChecked(  m.getValue() );
window.Layout.addItem(checkbox);

}) ();

}

This piece of code can now be easily dropped into $FG_ROOT/Nasal/canvas/gui/dialogs or just added to a nasal binding as part of the menubar.

Technically, there is no reason why the same piece of Nasal code could not be used to also support localized lookups of the corresponding checkbox labels, i.e. to provide a description and/or tooltip using a language other than English; all at the mere cost of adding the corresponding attributes to /sim/rendering/draw-mask in the form of "tooltip" and "label" attributes.

FlightGear Headless

One of the more common feature requests is to provide a so called "headless" mode for troubleshooting purposes, this means that the main FlightGear window would be disabled (or hidden for starters) - this would also be one of the prerequisites for running FlightGear in an unattended fashion, e.g. on a server using a scripted flight or replaying a pre-recorded flight. For some time now, a number of end-users and long-term contributors have discussed that this would be an enormously useful "mode" to support, and a number of folks have provided patches to make this work (mainly based on feedback from FredB). More recently, Hooray has taken the most recent patch and turned the whole thing into a startup mode using --enable-headless.

See: FlightGear Headless

ALS effects and Canvas

Thorsten recently posted some advice to aircraft developers to the mailing list:

I've been investing some work rendering the Shuttle avionics in a way that's more immersive - basically by taking into account the ambient light and make them appear over-bright and very emissive at night or suppress the visibility in direct sunlight and generally take into account a few perception effects and imperfections.

The HUD effect is the first result that came out of that program, but it's not going to be the last - I've now applied the same technology to the Shuttle MFDs - you can see them over-bright with Airy discs and color desaturation at night (compare left with effect applied with right bare):

http://www.science-and-fiction.org/FG/pics/display_effect03.jpg

or see it difficult to read when direct sun is shining onto the display

http://www.science-and-fiction.org/FG/pics/display_effect04.jpg

At this point, the common theme would be that using canvas we can render things in ALS we can not (easily) otherwise. So I'll make an official recommendation to aircraft maintainers to use canvas for any displays / HUDs if you want to get the latest and greatest from ALS in the future - I consider the FG-native HUD or other ways to build displays (OSGText etc.) legacy-supported - they'll continue to work, but might be dead ends.

Anyway - that's what I'll do with ALS - please factor that into your decision-making how to design the avionics you're working on. Canvas is a bit harder to learn, but you'll not regret learning it, it's *very* powerful. [6]

In the hangar

AI

Santa Barbara AI Traffic updated

Legoboyvdlp recently improved the AI traffic for Santa Barbara airlines, an airline from Venezuela with it's entire schedule (which consists of two daily flights to Miami at various times, using one 767), correct as of June 1st 2017. The file was commited on July 3d 2017 by James Turner. You will now see their unique red and white livery at Miami and Maiquetia airports!

Air Serbia Traffic File Renamed

Commit 19f8ad [1] removed the "obsolete" JAT.xml file, due to JAT Airways being renamed to Air Serbia, and its new ICAO code of ASL. Marcin Kuzniar (SP-KOK) completed the update of Air Serbia's traffic with the new ASL.xml file with 1964b3 [2].

AI Log warnings improved

To reduce log noise, various warnings related to AI traffic and groundnets including the infamous gate XYZ doesn’t seem to have any routes associated with it have been moved to the WARN log level. AI developers may wish to adjust their log levels to ensure that they see every warning message.

Recent Updates

  • British Airways: E70 and E90 flights added
  • Air Serbia
  • JAT: removed, replaced by Air Serbia
  • Santa Barbara
  • Aviolet 737-300 (texture)
  • TAP A330-300 (texture)
  • TAM Brazil 777-300 (texture)

Scenery corner

Lisbon

Lisbon has received two new buildings: the towers of S.Gabriel and S.Rafael!

London Heathrow

Screenshot showing the scenery as of 22nd July 2017

Legoboyvdlp has restarted his Heathrow project: at present, he is working on the taxiways associated with the runway. The screenshot to the right shows his latest progress. Release is expected, at the earliest, in Q1 2018. As always, the focus is on caliber rather than celerity; progress is slow, but quality will hopefully be high. The layout will be correct as of June 2017, including the reconstruction of T1 and the closure of various taxiways.

Community news

Now That We're Masters World Tour 2017

To celebrate J Maverick 16's fifth FlightGear anniversary, he has organized a world tour, which is at present ongoing. Each leg will take place daily from Sunday to Thursday from the 17th of July to 03d of August. Find out more at the FlightGear Forums!

Contributing

PSA: Translations/en renamed

Per a suggestion by James Turner, Translations/en has been renamed to Translations/default. Translators, please take note! [7]

Translators required

En.gif The FlightGear Wiki still needs help for translating it into various languages. If you are interested in making the FlightGear Wiki multilingual, you can start by looking at Help:Translate.
Fr.gif Le wiki de FlightGear a toujours besoin d'aide pour être traduit en différentes langues. Si vous êtes intéressé par le rendre multilingue, commencez par lire Help:Traduire.
De.gif Das FlightGear Wiki benötigt immer noch Hilfe bei der Übersetzung in verschiedene Sprachen. Wenn Du Interesse daran hast, das FlightGear Wiki mehrsprachig zu machen, dann fang mit dem Help:Übersetzen an.
Nl.gif De FlightGear Wiki kan nog steed hulp gebruiken bij het vertalen van artikelen. Als je interesse hebt om de wiki meertalig te maken, raden we je aan om een kijkje te nemen bij Help:Vertalen.
Es.gif La wiki de FlightGear todavía necesita ayuda para traducirla a varios lenguajes. Si estás interesado en hacer la FlightGear wiki multilingüe, entonces comienza en Help:Traducir.
Cat.gif La wiki de FlightGear encara necessita ajuda per traduir-la a diverses llengües. Si esteu interessat en fer la wiki de FlightGear multilingüe, llavors comenceu a Help:Traduir.
Pt.gif A wiki de FlightGear ainda necessita de ajuda para traduzi-la em vários idiomas. Se estás interessado em tornar a wiki de FlightGear multi-lingual, por favor começa em Help:Traduzir.
Zh.gif FlightGear 百科仍然需要志愿者将其翻译为各种语言。如果你有兴趣让FlightGear百科支持更多语言, 你可以查看 Help:Translate.

FlightGear logos

If you want some graphic elements for your FlightGear-related site (such as a hangar or YouTube channel), please feel free to visit FlightGear logos for a repository of logos. And if you have some art skills, please don't hesitate to contribute with your own design creations.

Screenshots

The FlightGear project always needs screenshots, which show features that were added since the last release. These should be of good quality, especially in content and technical image properties. It is therefore recommended to use the best viable filter settings (anti-aliasing, texture sharpening, etc.). More info at Howto:Make nice screenshots.

Screenshot of the Month

Entries for this month's best screenshot can be submitted to [ this] forum topic. Be sure to see the [ first post] for participation rules. For purposes of convenience and organization, after all the entries have been submitted, a new forum topic will be started containing all shots in an easy-to-view layout. The voting will then take place there. Once the voting has finished, the best screenshot will be presented on this page. -->




References

References
  1. Torsten Dreyer  (Jul 18th, 2017).  [Flightgear-devel] Simple API for creating FlightGear addons/plugins .
  2. Torsten  (Jul 18th, 2017).  New Feature: Addon - "API" .
  3. Torsten  (Jul 18th, 2017).  Re: Spoken ATC .
  4. rleibner  (Jun 22nd, 2017).  ATC .
  5. James Turner  (Jul 19th, 2012).  Re: [Flightgear-devel] Rendering passes question .
  6. thorsten Renk  (Jul 10th, 2017).  [Flightgear-devel] ALS and canvas .
  7. Florent Rougon (Jul 12th, 2017).  Translations: rename Translations/en to Translations/default.