Canvas EFB framework

From FlightGear wiki
Revision as of 15:37, 1 June 2014 by Hooray (talk | contribs)
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.

Note: While this article is based on considerable community feedback, there's nobody working on this currently.
So if you'd like to help in one way or another, please get in touch or just help improve the article in the meantime!
Useful Skills:
PropertyList XML File, Property Tree, Nasal scripting, Canvas, CanvasMFD, 777, 787


People:

Mentors: Hyde[3], Hooray (get in touch to learn more)
It's possible that this article hasn't been updated in a while, so to catch up with the latest developments, you are advised not to start working on anything directly related to this without first coordinating your ideas with fellow FlightGear contributors using the FlightGear developers mailing list or the FlightGear forums. See also the talk page.


Canvas EFB Framework
Omega95-efb-787.jpeg
Started in not yet...
Description EFB Framework
Contributor(s) I-NEMO, Hyde, Hooray
Status discussion
Subforum http://forum.flightgear.org/viewforum.php?f=71



Background

Cquote1.png I'm trying to change 777's indicators to canvas system now. Could someone lecture me how to display Airport Chart - Aircraft/Instruments/Textures/od_groundradar.rgb - on EFB? Or is there any other equivalent method?
— Hyde (Tue Oct 22). How to display Airport Chart?.
Cquote2.png
Cquote1.png Feel free to work on the EFB (don't have that in the 744), but please don't waste any time on the rest of the displays. I already have PFD and ND for the 744 and am making them as generic as possible. They will end up in Instruments/ so we can re-use them on other aircraft.
— Gijs (Tue Oct 22). Re: How to display Airport Chart?.
Cquote2.png
Cquote1.png I'm quite busy with modeling a new EFB and other stuff.
Cquote2.png
Cquote1.png we are working on the new EFB, which is coming out nicely, we presume.
Cquote2.png
Cquote1.png I'm currently developing a new EFB for the 777 Seattle; even if I'm inspiring to Omega95's job made for the 787 Dreamliner (which, BTW, I'm not able to load onto FG 3.0!...a mystery!), I'm working on it since more than a month (everyday, several hours), the task is a long one. I do hope to be able to have a "rude" version of the new EFB (with some simplifications and enhancements, looking to Boeing's 777 EFB Manuals) to submit to my partners in about ten days (I'm totally a newbie on nasal! [Ouch! ]...but I'm trying to learn). Then, we will go through our internal testing and improvement. Then, again, the new EFB will be released 'as-is', so the FG Pilots might play with it and report back to us what's wrong, and what might be improved.
Cquote2.png
Cquote1.png we may not even need to run external EFB software, because our integrated scripting system in combination with the Canvas 2D rendering system may provide all the hooks required to render such geo-referenced imagery directly inside FlightGear with very little work needed - we even have http bindings to load images on the fly.
Cquote2.png
Cquote1.png we should have most building blocks required for this in place, maybe some things are not yet exposed to scripting space currently (but still available in C++) - but being able to run this directly inside FG would be kinda useful obviously, especially because of recent work in this area, especially the tiled map support, HTTP bindings, SGPath exposure (disk access). And being able to directly geo-align raster images has been previously discussed, too
Cquote2.png
Cquote1.png Right now the script basically just a creates .PNG and a .VRT for a given plate, suitable for loading directly into something like QGIS If you run the script for the entire set of plates (eg. "multithread.sh .") using the -s option you'll get a statistics file which has all of the lon/lat extents for each plate in it (which is how I made the spreadsheet I linked here)
Cquote2.png
Cquote1.png extending our 2D rendering API (Canvas) to provide a mechanism to geo-align such images would be kinda useful for a variety of purposes, we already have a "map" element that can automatically geo-reference lat/lon pairs without any manual work involved - and we also have support for a raster image element.
Cquote2.png
Cquote1.png all we have to do to display such charts within FlightGear is to load the chart image and apply the matrix created by the script. In the case of VRT files, it should be enough to just read the GeoTransform tag and set it as matrix on the Image element inside the canvas (with the parent element set up to have a coordinate system matching the current position and range). Some central server for collecting such free and geo-referenced charts would surely be useful and probably does not require too much space and bandwith. These charts would not only be useful for FlightGear, but also for real aviation applications, like EFBs. I think I saw this or a similar script somewhere inside the sources of Avare?
Cquote2.png
Cquote1.png having just a web service that maintains and provides those charts would be straightforward and should not require any work on the Canvas side of things, also it avoids redundant work, because charts would remain identical normally, i.e. would only need to be created once. Not sure what the geo-coding question was all about ..
Cquote2.png



777-200ER EFB [1]
777-200 EFB AIRPORT SEARCH, see [2]

Design

rgb files are conventional images, like jpg/png - so they are so called "raster images" (unlike SVGs, which are "vector images"). So to display raster images, you can use the tutorial at: http://wiki.flightgear.org/Howto:Using_raster_images_and_nested_canvases This assumes that you have previously created the corresponding charts as image files, a technique that omega95 and redneck have been using for a while.

For starters, you can use the Nasal console to play around with it: http://wiki.flightgear.org/Nasal_Console

Now, to add an EFB dialog to the 777, you could use the old dialogs and embed a canvas region, see the tutorial at: http://wiki.flightgear.org/Howto:Adding_a_canvas_to_a_GUI_dialog

If you want to display vector images (SVG) or custom-drawn maps, you'll want to use OpenVG paths

To display a procedurally-created airport chart (without adding a precreated raster image for each airport), you'll probably want to use the technique used by the airport selection dialog


Also see