Canvas EFB framework: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 390: Line 390:


=== Procedural Charts ===
=== Procedural Charts ===
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
{{FGCquote
  |
# You can basically transform any group, i.e. by changing its scale/ratio, rotation etc - animations would be implemented by changing color/size/rotation through a timer for example, maketimer() should be used for those, ideally all through an Animation class that serves as a wrapper for all animation needs.
# The visual outcome of a procedurally created chart can be 100% customized, it's just a Nasal file that draws all those lines - colors, line width, labels etc (you name it) can be completely customized. You'd probably want to look at $FG_ROOT/Nasal/canvas/map/*.draw files for the handling of PARKING.draw, RUNWAYS.draw and TAXIWAYS.draw - those are standard Nasal functions that render to a group. However, this should really just serve as an example for the time being, because those files are going to be updated and ported to MapStructure during the upcoming release cycle (post 3.2), and people wanting to draw such diagrams should really be using Philosopher's MapStructure framework.
# Regarding airnav.com: there's no account needed, those charts can be directly accessed and downloaded, they're using standard ICAO codes to look up the corresponding PDF files.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=213105#p213105
    |title=<nowiki>Re: 777 EFB: initial feedback</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Sat Jun 21</nowiki>
  }}
}}
{{cquote
{{cquote
   |<nowiki>I don't like the idea at the moment: I've seen some tests you proposed in the developmnet of the 'Airport Location' dialog: looking at Boeing manuals we want to stick to real charts, hi-res, full of details for the pilot; we just want to display a crisp nice .jpg, or .png, or svg, file on the screen (Boeing 777's EFB has a fixed ratio of 1.412371 proportion between width and height); a nice possibility, though, would be to superimpose some symbols over those charts, in time)</nowiki>
   |<nowiki>I don't like the idea at the moment: I've seen some tests you proposed in the developmnet of the 'Airport Location' dialog: looking at Boeing manuals we want to stick to real charts, hi-res, full of details for the pilot; we just want to display a crisp nice .jpg, or .png, or svg, file on the screen (Boeing 777's EFB has a fixed ratio of 1.412371 proportion between width and height); a nice possibility, though, would be to superimpose some symbols over those charts, in time)</nowiki>
Line 459: Line 485:
}}
}}


 
<!--
== 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
 
{{FGCquote
  |
# You can basically transform any group, i.e. by changing its scale/ratio, rotation etc - animations would be implemented by changing color/size/rotation through a timer for example, maketimer() should be used for those, ideally all through an Animation class that serves as a wrapper for all animation needs.
# The visual outcome of a procedurally created chart can be 100% customized, it's just a Nasal file that draws all those lines - colors, line width, labels etc (you name it) can be completely customized. You'd probably want to look at $FG_ROOT/Nasal/canvas/map/*.draw files for the handling of PARKING.draw, RUNWAYS.draw and TAXIWAYS.draw - those are standard Nasal functions that render to a group. However, this should really just serve as an example for the time being, because those files are going to be updated and ported to MapStructure during the upcoming release cycle (post 3.2), and people wanting to draw such diagrams should really be using Philosopher's MapStructure framework.
# Regarding airnav.com: there's no account needed, those charts can be directly accessed and downloaded, they're using standard ICAO codes to look up the corresponding PDF files.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=213105#p213105
    |title=<nowiki>Re: 777 EFB: initial feedback</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Sat Jun 21</nowiki>
  }}
}}
 
 
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">




</syntaxhighlight>
</syntaxhighlight>
 
-->
== Also see ==
== Also see ==
* [http://forum.flightgear.org/viewtopic.php?f=71&t=23196 777 EFB status & plans ?]
* [http://forum.flightgear.org/viewtopic.php?f=71&t=23196 777 EFB status & plans ?]

Navigation menu