by Hooray » Fri Feb 22, 2019 5:54 pm
to be honest, this may be the time when things have come full circle, i.e. most of the functionality provided by TaxiDraw could probably be implemented these days using a tiny fraction of the code, simply by using built-in FlightGear APIs like Nasal/Canvas.
We already have fairly sophisticated MFD-style avionics, as well as a MVC based mapping/charting framework on top of Nasal/Canvas (MapStructure).
It would be pretty straightforward to take those existing pieces, and adapt/generalize them as needed to come up with a built-in "taxiway editor" that would directly support the main FlightGear APIS, because it would after all be running inside FlightGear.
As a matter of fact, I believe that either jsb or ThomasS have created groundnet layers for the MapStructure framework.
So, it really is primarily an integration matter at this point.
Using the canvas system and Nasal for this would also mean that people don't need to know any C/C++ or git stuff to use such an editor. Also, anyone with fgfs installed, would automatically be able to run such an editor.
Packaging up the whole thing as some kind of custom add-on would also be straightforward thanks to the work done by Torsten and Florent.
Besides, any MFD/avionics developers would be able to help with the Nasal/Canvas coding side of this, because it would just be the equivalent of an interactive MFD after all.
I believe a simple groundnet editor supporting drag/drop (via Canvas Event Handling) would not take more than 200-300 lines of code, most of it being structural boilerplate code copied from the wiki to set up things as needed.
And that certain applies to other apps in the FG ecosystem (think atlas, map etc) - FlightGear is meanwhile sufficiently powerful to allow fgdata/middleware devleopers to create the corresponding functionality using very little code, all on top of technologies that people are already familiar with, because they're using the same mechanisms to also create/develop aircraft, scenery and in-sim UI resources.
Again, rendering a groundnet is trivial to do via MapStructure, and it is also trivial to register an event handler that responds to mouse clicks, e.g. to bring up a context menu - which is after all just a popup, i.e. a window with a bunch of buttons arranged in a vertical layout.