Hi,
I would like to convert the current garmin196 (real name is Garmin GPSmap196) to canvas. I know the garmin196 is used in multiple aircrafts and seems to be appreciated in most of general aviation aircraft.
Main problem: my skills about Nasal/Canvas are clearly not sufficient !
That's why I would make this project as participative as possible. Some of you know that PAF team is usually working with multiple people with different skills in order to achieve a project.
Here my skills are mostly: good knowledge of the GPSmap196 because I'm using it in real life in my aircraft, in other world we have an infinite documentation. That way we can develop this GPS with high realism.
I have 2 mains requirement:
1) The screen of the GPSmap196 must be rendered with Canvas (map, settings, text...)
2) The GPSmap196 must be available as a "Canvas Widget"
Now it's time for questions:
Looking at the (non-exhaustive) list of screen that we have to reproduce here http://mapserver.flightgear.org/git/?p= ... 3d;hb=HEAD what is the better solution for rendering these screens ?
- Only use Canvas i.e: drawing fields, block, checkbox... ?
- Create 1 SVG file per screen ?
- Create 1 SVG file who contains 1 layer per screen ?
The first case seems heavy to me, I'm not sure it's the good solution but to be honest I know nothing about Canvas so I can be totally wrong
Second case looks better, easy to maintain, but I don't know if we can load multiple SVG file and switch between these SVG file at runtime
First case looks the good solution to me, harder to maintain because we have to deal with layer when editing the SVG file (I'm not ultra familiar with Inkscape but I'm able to play with him). But still the similar previous question: are we able to switch between layer at runtime ?
Well once this question is answered there is another big question: how to manage to switch between these screen ? Currently the garmin196 is using some Nasal with ID associated to each screen ( http://mapserver.flightgear.org/git/?p= ... b=HEAD#l69 ) I don't know if we can still use this technique because the GPSmap196 has some "popup", it means that you can display a dialog box on top of a screen (e.g map) so we can't say "I show the dialog blabla OR the map", we have to be able to say "I show the dialog blabla AND the map".
After these 2 questions we should be able to know "How to render our screens", and "How to switch between our screens". Once we have that we can start to add data in the GPS (map: cities, towns, airport... compass, speed, altitude, etc etc)
Ok, all of this was for the 3D model and his screens, now talking about the Widget:
The proof-of-concept is already here, if you click on the screen of the 3D model a Canvas Widget is displayed and he is filled by the content of the screen of the 3D model (that's a really cool feature!)
But I would like to have more than just a copy-of-the-screen, I would like to have a 2D full remote.
I explain: On the 3D model, if I press the Power button, the GPS will light-up, I would like that the Canvas Widget has also all the buttons in order to light-up (and do every that is possible to do with the 3D model) the GPS.
For that I've created a sub folder (AIrcraft/Instruments-3d/GPSmap196/widget) who contains an SVG file filled by a texture of the GPSmap196. The idea is to add some SVG object (totally transparent) on top of each buttons in order to catch the click on the texture (maybe it's not the good way, let me know) and also add a rectangle who will be filled by the Canvas texture (as it's done currently but instead of filling the whole Canvas widget like currently we would fill only the "virtual" screen)
The question is simple: my first approach about SVG file is a good start point ? or there is a better solution ?
Well as you can see we are not ready to start to draw waypoints, lines, airport or anything else in the map there is a lot of work before that.
Kind regards,
Clément