Canvas EFB framework
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.
Mentors: Hyde[3], Hooray (get in touch to learn more) |
Started in | not yet... |
---|---|
Description | EFB Framework |
Contributor(s) | Hyde, Hooray |
Status | discussion |
Subforum | http://forum.flightgear.org/viewforum.php?f=71 |
The FlightGear forum has a subforum related to: Canvas |
Background
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?.
|
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.
— Hooray (Sun Apr 20). Re: A project to create a source of free geo-referenced inst.
|
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
— Hooray (Mon Apr 21). Re: A project to create a source of free geo-referenced inst.
|
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)
— jlmcgraw (Mon Apr 21). Re: A project to create a source of free geo-referenced inst.
|
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.
— Hooray (Mon Apr 21). Re: A project to create a source of free geo-referenced inst.
|
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