Board index FlightGear Development Aircraft Cockpit development

Dynon Avionics D180

Discussion about creating 2d and 3d cockpits.

Dynon Avionics D180

Postby D-ECHO » Sun Feb 14, 2016 11:28 am

Hi everybody!
I'd like to present you the D180, an EFIS for general aviation aircraft. It's based on the one for X-Plane by hydroz.net (approved to distribute under GPL, see CH650 and CH750STOL in Aircraft forum) and the zkv1000 by Zakharov (code, textures).
To implement it in the aircraft, you have to add those lines to the readme:
1. (outside sim-tag)
Code: Select all
    <instrumentation>
        <dynon-efis><ready type="float">0</ready></dynon-efis>
    </instrumentation>

2. (in <nasal>-tag)
Code: Select all
<d180>
<file>Models/Panel/Instruments/Dynon_D180/d180.nas</file>
</d180>   
(file has to point to the location where you installed it)
Here is the instrument: https://github.com/D-ECHO/Dynon_D180
The nasal is coded so that it loads if /systems/electrical/outputs/master-avionics is triggered while /systems/electrical/volts is above 6.
Regards
A temporary installation in the EchoAirConcept:
Image
User avatar
D-ECHO
 
Posts: 1427
Joined: Sat May 09, 2015 12:31 pm

Re: Dynon Avionics D180

Postby Hooray » Sun Feb 14, 2016 11:33 am

FYI: These kinds of instruments are much more easily, more accurately and more completely modeled using Nasal in combination with the Canvas 2D rendering subsystem, which does have any of the limitations that the purely XML/texture-based approach has:

Image


Some of the most sophisticiated MFDs available in FlightGear are implemented using the Nasal/Canvas technology stack:

http://wiki.flightgear.org/Avidyne_Entegra_R9
Image

Note that it is impossible to implement such instruments using just XML, animations and static textures - not even in combination with Nasal code.
You literally need a 2D rendering framework - or write C++ code directly.
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: 11309
Joined: Tue Mar 25, 2008 8:40 am

Re: Dynon Avionics D180

Postby D-ECHO » Sun Feb 14, 2016 11:48 am

If I just had time to learn that stuff...
User avatar
D-ECHO
 
Posts: 1427
Joined: Sat May 09, 2015 12:31 pm

Re: Dynon Avionics D180

Postby Hooray » Mon Feb 15, 2016 4:15 pm

D-ECHO wrote in Sun Feb 14, 2016 11:48 am:If I just had time to learn that stuff...


Your best bet is learning more about SVG vector images, e.g. using an editor like Inkscape.
Once you know how to use Inkscape, you basically can treat any intstrument like a vector image with different modes, pages and layout items - which in turn can be SVG images or SVG image elements.

Under the hood, this is how the space shuttle/extra500 avionics, but also the ND stuff, is assembled.

Ultimately, it's all vector image data that is animated using a bunch of Nasal timers/listeners.

For instance, look at this screenshot:
Image

The underlying SVG image looks basically like this:
Image

(Here's the actual file: https://sourceforge.net/p/flightgear/fg ... eingND.svg )

In other words, the image is literally drawn using Inkscape, and then loaded into FlightGear as a Canvas texture, it is then animated using timers and listeners which dynamically decide how to update/transform and hide/show certain elements (e.g. by setting text properties etc)

Internally, the whole system is using a handwritten svg parser that turns SVG files into Canvas properties, i.e. those representing OpenVG paths and/or osgText nodes (fonts) - it would even be possible to also support nested images, i.e. not just included SVG files but even raster images, because the Canvas system does have support for raster images.

If people still find this too complicated/tedious, it would also be possible to extend the parser to support animiations created via Inkscape.
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: 11309
Joined: Tue Mar 25, 2008 8:40 am


Return to Cockpit development

Who is online

Users browsing this forum: No registered users and 0 guests