FlightGear Newsletter July 2017

From FlightGear wiki
Jump to: navigation, search
Magagazine.png
Enjoy reading the latest edition!
Please help us write the coming edition!
July 2017

Development news
Addons
Atmospheric Light Scattering
Spoken ATC
Creating Canvas UI dialogs procedurally
FlightGear Headless
In the hangar
737-800 cockpit remodelling

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

Community News
J Maverick 16 celebrating his 5th year of FlightGear
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

Jigsaw.png

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]

Atmospheric Light Scattering

The Atmospheric Light Scattering renderer (ALS) now includes a new dynamical implementation of volumetric grass on the airport keep. This utilizes a geometry shader (and might require higher-end graphics cards) and is interfaced to the weather code to show movements in the wind.

The grass height, color and patchiness is regionally configurable and has been implemented for a couple of different locations around the world. In addition, there is an interface provided to simulate rotor wash - grass blades will bend away from a hovering helicopter.

Rotor wash rendered on volumetric grass

The same interface also influences the water shader and will show spray and foam when the rotor wash hits a water surface (this needs to be implemented by helicopter maintainers). Read more...

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:

diff --git a/Translations/default/menu.xml b/Translations/default/menu.xml
index 973d1a0..beccb46 100644
--- a/Translations/default/menu.xml
+++ b/Translations/default/menu.xml
@@ -23,6 +23,7 @@
 	<toggle-fullscreen>Toggle Fullscreen</toggle-fullscreen>
 	<rendering-options>Rendering Options</rendering-options>
 	<view-options>View Options</view-options>
+	<draw-mask-options>Draw Mask Options</draw-mask-options>
 	<cockpit-view-options>Cockpit View Options</cockpit-view-options>
 	<adjust-lod>Adjust LOD Ranges</adjust-lod>
 	<pilot-offset>Adjust View Position</pilot-offset>
diff --git a/gui/menubar.xml b/gui/menubar.xml
index 9fc5c81..afe6cdb 100644
--- a/gui/menubar.xml
+++ b/gui/menubar.xml
@@ -128,6 +128,61 @@
 		</item>
 
 		<item>
+			<name>draw-mask-options</name>
+			<binding>
+				<command>nasal</command>
+				<script><![CDATA[
+				# http://wiki.flightgear.org/FlightGear_Newsletter_July_2017#Creating_Canvas_UI_dialogs_procedurally
+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);
+
+}) ();
+}#  foreach
+
+				]]></script>
+			</binding>
+		</item>
+
+
+		<item>
 			<name>cockpit-view-options</name>
 			<binding>
 				<command>dialog-show</command>

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

In the hangar

737-800 cockpit remodelling

737-800 new overhead panel

Gabriel YV has begun to remodel the 737-800 overhead panel to more accurately match the real aircraft. This screenshot shows the status of the remodelling as of 24 July 2017.

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

J Maverick 16 celebrating his 5th year of FlightGear

Recently J Maverick 16 has celebrated his fifth year using FlightGear and wrote a forum topic about his story, from how he began to the present. Here is it:

Five years ago today, back in 2012, I downloaded my first version of FlightGear, which was 2.6 and lasted about 3 weeks because soon after 2.8 came out. With that simple download, my live changed entirely.

I was in search of a good flight simulator after having past experience in the simple Google Earth one which was simply an HUD which allowed ya to hang around. I was at school during an informatics lesson just about one month earlier that I was a bit bored and had a look on what that Linux PC had, and per chance I found a kind of game store where it listed some, mostly open source I think. At some point I was in the simulation area when I found a game called Flightgear rated around 4.5/5 stars and there were some pics of it, in particular (will never forget it) the Cessna 172P cockpit which literally amazed me. I couldn't realize such a game could have been so cool and freeware so I asked a friend information about it and he said he used it for some time and told it was 100% free and nice to use. I was very tempted to download it. Well, school ended and I went on holiday for 1 month at the seaside, but yet I couldn't forget that sim. Once back home, I asked my father if I could install it on his laptop (mine was a bit older and weaker) and he said "Well, OK". So one afternoon of July 2012 I went on the official website and got it. All I had to play with it was a controller (like those Play Station ones) at that time (which I'm still using today for additional controls) and started messing around KSFO with that C172P which was very difficult to me at first. Two weeks later I convinced my father buy a cheap Thrustmaster joystick for playing in a better way, and that began a true love with aviation. Exactly, a flight sim created my deep interest for aviation. I started messing around and learned quickly how to fly and use the essential parts sim itself and (didn't wanted to go through the FG manuals, I was too lazy for that, so I mainly learned things “on the field”). At some point I started to use multiplayer too, and that made things even more funnier. With even 25 people online flying at KSFO at the same time, it was a great deal. I started with the callsign “Maverik” because of the 7-letter limitation. But changed it to “Maveric” some time later. Obviously I'd been inspired by Top Gun, which I saw entirely for the first time on TV in that very period. The C172P bored me soon so when I learned how to properly install planes, I started to go on the Hangar daily to check for interesting planes. I've learned the job on the Alphajet, which was a nice trainer for that time to me (F-14B was always breaking wings even before take-off for some reason). Took me long to learn how to fly in a decent way, especially t/o and landings were extremely difficult (as for every newbie). Then I learned how to use TerraSync and moved to Italy by literally flying to UFO from KSFO to Europe using the in-game map to know where I was going (lol). I've started operating from LIPA, LIPQ and LIPI, which are somehow my “home airports” IRL. Suddenly around November the PC broke itself, and scared that it could have been FG's fault, I've sadly stopped using it till February 2013. When I restarted, since the FG program was broken, I moved to 2.10 which was my last version on that PC. Within some months I've started to meet some people regularly and started making some friends. One of them taught me how to use OpenRadar, and so I began doing some kind of ATC at LIPQ and mainly LIPA. I've also learned how to place objects with the UFO, so I built up LIPA and LIPQ 3D on my PC. In the mean time aviation had become my main interest. At the end of that year I met some people which were doing ATC in the area often, and with them I founded The Northern Italy ATC Controlled Area (NIATCA) with me as CEO, Elgaton as admin and Iss96 as additional admin, based on what Jomo did in Germany with the EDDF Triangle. It soon expanded in members and in airports involved and we had several people flying there. In that period I've changed my callsign to “J-Mav16” which is the same I use nowadays. Later Elgaton, taught me how to use WED for modifying airport layouts and started working on the Aviano AB scenery (which is still WIP, to be finished this summer hopefully). That year the first Festival of FlightGear was held in the Iberian peninsula in November, and the NIATCA offered to provide ATC coverage for it. 2014 was also the year when I joined the FG forums: the official one, Italy's and FGUK. How I joined FGUK was a kind of joke, I posted a screenshot of me landing their F/A-18D at EGOD on the “What/Where did you fly today?” forum thread and StuartC asked me to pay £500 of landing fees because I wasn't part of the community. So I said to myself “If I join them, no need to pay”. So I got there, and started to mess around with them. Soon I began to attend their Saturday FlightNights, which were and are one the best ways to have fun in MP with some good camaraderie. Since they were using voice comms, I bough a headset that allowed me to talk. 2015 arrived and I was spending most of my time in FG around EGOD flying their planes. In March I planned my first FlightNight “The Adriatic Sea Trip” starting from Rome and ending at LOWI. Learned tons with them and I'm so grateful for that. At the Spring Festival in Argentina I occasionally met someone who was flying a “KC-137R-RT” (WTF?) so I asked him where did he got it from. He told me he was the developer and gave me a link to it. Basically it was a 707 retrofitted with CFM LEAP engines from the A320neo. I fell in love and started doing some minor contributions on it. I started using some social media related to my FG activities like Google+, Instagram etc. Later that year my PC broke again, and never got fixed properly, which led me to download version 3.2 on my father's iMac (which is somehow mine today as I use it most of the time lol). Presently I'm still using that version with some minor additions from latest 2017 releases. 2016 arrived with plenty of expectations: they didn't last long. Due to my old Mac OS X, Teamspeak3 wasn't supported anymore by developers of the application so I had no way to communicate with them anymore. That, along with other issues, made me lost interest in attending FlightNights. In March, I met some guys around Nellis AFB flying fighter jets and doing dogfights. They told me they were a military group and was told to visit the forum thread about the “KSUU Crew”. They had a big event happening in USA and I joined as an observer, that marked my join in what today is called the Op Red Flag (OPRF) group. I began to use their modified planes and attending the events they planned and soon become good at dogfighting, in particular during the operations help over in Korea during the Spring FG Festival. Again in March, the KC-137R got back to life when I decided to ask on the Jwocky forum (which I joined in the last months of 2015, did missed the ban affair entirely due to my previous PC issues) for someone to help me improve it. A guy called it0uchpods offered to help me. We worked on it nearly every day and it soon become a good plane. Apart from developing, we became friends and I'm so thankful fro him for all the things he taught me and all the fun we had and have. Thank you Josh! KC-137R got soon included in OPRF's approved planes as me and Josh kept working on it for the rest of the year with some pauses in between, adding stunning features and variants. I progressed fast in fighting with the OPRF guys, and soon reached the rank of Lt. Colonel by flying mostly F-15s and for winning monthly events. With Josh I got involved in further aircraft projects and decided to build my own VIP plane the C-32J, inspired by other people having their own. Some time before the Fall Festival, I had an accident with FGUK which led me to have a break from them in order to settle down. I decided to join back on Xmas day flying to EGOD with my C-32J. Finally 2017 arrived and so my 18th birthday, and I so bought myself a new decent Motorola smartphone which improved my FG experience a lot. Soon after I was promoted to Colonel rank in OPRF. Development continued on my projects and others came to my way. In March I bought the Teamspeak3 phone app which allowed me get my voice comms back with FGUK finally after nearly 1 year without, helping me to really get back in FlightNights. In all this time I've kept flying and presently I've reached the #150 position in the FGTracker with nearly 780 effective flight hours with my callsign. I've made many friends around the world too, sharing the same interest in aviation and which I enjoy time flying with them. I'm so thankful to all of them. I have loads of projects I started and want to finish so that the community can benefit of all of them. I have to say a huge thank you also to all the people who through the years helped me, supported me, trusted me, taught me things, contributed in what I'm doing now and enjoyed flying with me, they are a lot and I can't really mention each, but a special gratitude goes to the NIATCA members, the FGUK Family, the OPRF Crew and Joshua Davidson for all the good time I spent and keep spending with them. Another special thanks goes to the developers of the FlightGear project, for obvious reasons. Keep that up!

If you have been reading all that so far, then you're a boss, thanks! ;) I've tried to summarize it as much as I could, 5 years are a lot.

5 long, great but also tough years they've been, and I want to celebrate them with you all by organizing a kind of World Tour flying in MP to some destinations which have been part of these 5 outstanding years for me. I invite everyone who is interested and has time to attend, even for just having some fun out there.

—J Maverick 16

Now That We're Masters World Tour 2017

Poster for the "Now That We're Masters" World Tour 2017 by J Maverick 16

To celebrate J Maverick 16's fifth FlightGear anniversary, he has organized a world tour event consisting of three long legs happening in three continents (Europe, North America and Asia), which is at present ongoing. Each leg takes place daily from Sunday to Thursday (or Friday) from the 17th of July to 04th of August. Find out more at the FlightGear Forums! A full review of the event will be found in the next edition of the Newsletter.

Contributing

PSA: Translations/en renamed

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

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. Florent Rougon (Jul 12th, 2017).  Translations: rename Translations/en to Translations/default.