Canvas glass cockpit efforts
This article is a stub. You can help the wiki by expanding it. |
The FlightGear forum has a subforum related to: Canvas |
This is a list of Canvas related glass cockpit efforts, i.e. projects implementing modern MFD avionics.
Goal | Description | Progress | People | Comments |
---|---|---|---|---|
747 PFD | ... | (people) | ... | |
NavDisplay | ... | (people) | ... | |
Garmin GNS530 | ... | cbendele | ... | |
Garmin GPSMap 196 | ... | F-JJTH | ... | |
Avidyne Entegra R9 | ... | (people) | ... | |
Canvas EFB Framework | ... | (people) | ... |
XML Framework
Given the recent trend of having several MFD-related efforts without any kind of collaboration/code reuse going on here among our contributors (PFD, ND, Avidyne Entegra R9, EFB), I have started prototyping a generic MFD framework that is purely XML-based, inspired by discussions we've had over the last couple of weeks, and lessons learnt from the missions subsystem.
— Hooray (Sat Jun 07). Framework-centric aircraft-agnostic avionics development.
|
It is intended to:
— Hooray (Sat Jun 07). Framework-centric aircraft-agnostic avionics development.
|
This is supposed to support modeling complex avionics like a PFD, ND, EFB, CDU etc - and, eventually, also the Avidyne Entegra R9. It's currently just a prototype, but it gets away with very little code and we really only need a few more "skins" for common avionics. I am willing to extend this over time and help maintain it if people can agree to use something like this. It should be straightforward to allow such "MFDs" to be reloaded from disk at run-time, i.e. for more rapid prototyping. — Hooray (Sat Jun 07). Framework-centric aircraft-agnostic avionics development.
|
Note This is work in progress - the idea is to identify required building blocks to easily specify most MFD functionality in a generic fashion, without requiring a ton of custom Nasal code and without being specific to a single type of MFD. The whole concept is based on FlightGear_Missions_and_Adventures#XML_Extension_Framework, i.e. providing a Nasal-space mechanism to expose and re-define building blocks to XML space.
The Nasal/Canvas data structures will be transparently created and compiled for each MFD. Each MFD consists of an arbitrary number of buttons, modes and pages. Each MFD can be instantiated multiple times, and each MFD is designed to be aircraft/instrument agnostic, i.e. also works just in a conventional Canvas dialog. Buttons can trigger and switch between modes, and modes may have pages (conventionally implemented through a single SVG file). Each page consists of an arbitrary number of page elements, which can in turn be animated/updated via listeners and timers. Should look at existing displays, especially the NavDisplay and the update() method in navdisplay.mfd, but the most complete test-case would probably be the Avidyne Entegra R9 |
Note Contributors wanting to check out the topics/canvas-mfd-framework branch, need to follow these 3 steps:
This will give you a local branch named topics/canvas-mfd-framework, so that you can easily pull/push changes. When pulling, it makes sense to pull with --rebase Please never push directly to the master/next branches, and please don't push force (-f) either. |
Files
Each MFD instrument will consist of at least the following files:
- a PropertyList-encoded XML file specifying the instrument
- a raster image used as the skin/background image
- a SVG image used for placing buttons and event handling
Header
- Canvas size/view
- colors/transparency
Primitives
- Button
- Mode
- Page
- Page-Element
- Task (maketimer based)
- Event handling (listener based)
<?xml version="1.0"?>
<!-- see: http://wiki.flightgear.org/Canvas_Glass_Cockpit_Efforts -->
<PropertyList>
<name>Garmin GPSMap196</name>
<description></description>
<version></version>
<developers></developers>
<debug-mode type="bool">0</debug-mode>
<!-- screen dimensions -->
<size-x>320</size-x>
<size-y>160</size-y>
<!-- skin setup for the GUI dialog, skin and event handling -->
<skin>
<!-- dialog dimensions -->
<width>1024</width>
<height>512</height>
<!-- dialog title -->
<title>GPSMap196 MFD demo</title>
<!-- the background image we're going to use -->
<background-image>Aircraft/Instruments-3d/GPSmap196/widget/gpsmap196-widget.png</background-image>
<!-- setting up all buttons for the dialog -->
<buttons>
<svg-filename>Aircraft/Instruments-3d/GPSmap196/widget/gpsmap196-widget.svg</svg-filename>
<button>
<name>gps196.widget.button.power</name> <!-- svg element ID -->
<property>button-power</property> <!-- relative property -->
<tooltip>switch device on/off</tooltip> <!-- mouseover tooltip -->
</button>
<button>
<name>gps196.widget.button.quit</name> <!-- svg element ID -->
<property>button-quit</property> <!-- relative property -->
<tooltip>quit</tooltip> <!-- mouseover tooltip -->
</button>
</buttons>
<!-- the embedded canvas serving as the screen -->
<screen>
<size>
<x>563</x>
<y>359</y>
</size>
<translation>
<x>87</x>
<y>53</y>
</translation>
</screen>
</skin>
<!--this implements individual MFD pages -->
<pages>
<page>
<name>test</name>
<type>svg</type>
<svg-filename>foo.svg</svg-filename>
<elements>
</elements>
</page>
<page>
<name>map-page</name>
<type>map</type>
<layers>
<layer>
<name>FIX</name>
</layer>
</layers>
</page>
</pages>
</PropertyList>