Board index FlightGear Development Canvas

OSM maps in ND?

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

OSM maps in ND?

Postby D-ECHO » Mon Feb 15, 2016 2:26 pm

Hello everybody,
I've recently discovered that it's really easy creating a nice ND with canvas and after I read a bit about the weather radar implementation by omega I wondered whether it was possible to port that feature to use openstreetmap (opentopomap) data/images.
Regards
D-ECHO
User avatar
D-ECHO
 
Posts: 1679
Joined: Sat May 09, 2015 12:31 pm

Re: OSM maps in ND?

Postby Johan G » Mon Feb 15, 2016 2:31 pm

It would definitively be possible. The question is how various implementations would affect performance, how much work it would be, and who would do it? ;)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5546
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: OSM maps in ND?

Postby Hooray » Mon Feb 15, 2016 2:46 pm

That is definitely possible, and we have various code snippets doing related things, e.g. see TheTom's example at:

http://wiki.flightgear.org/Canvas_Snipp ... e_tile_map
Image

The real issue here is an integration matter - i.e. the ND uses a fairly simple framework to be entirely aircraft-agnostic, and to support independent instances, as well as the non-aircraft use-case (e.g. GUI). Under the hood, this all works through a MVC abstraction on top of Nasal/Canvas called MapStructure: http://wiki.flightgear.org/Canvas_MapStructure

In other words, for any ND "layers" to be supported, those would need to be MapStructure layers first of all: http://wiki.flightgear.org/Canvas_MapStructure_Layers

As far as I am aware, omega95's original work got never ported to the MapStructure framework, so that his work -in its current form- is not compatible with the way the MapStructure/ND frameworks are set up. This also applies to the taxiway/runway layers, which are still using a crude MVC approximation that predates the MapStructure effort.

The other thing to keep in mind here is that OSM imagery would need to be provided either as part of $FG_ROOT, or fetched online. While the latter is obviously possible using Nasal/Canvas, that also brings the implicit assumption with it of being online - while that may apply to most VA/ATC folks, it does not necessarily apply to the non-MP use.

In general, TheTom once mentioned that he was hoping to provide a SQLite based image cache for Canvas images/textures (forum search: SQLite + Canvas).

If you are interested in working on this, you will probably want to look at the original wxradar thread (omega95), where we posted a few pointers on turning the prototype into a feature that works with the ND/MapStructure frameworks.

If in doubt, get in touch with omega95 and/or artix about this, or post links to the code in question, so that we can provide more specific feedback
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Re: OSM maps in ND?

Postby legoboyvdlp » Mon Feb 15, 2016 2:48 pm

What this would be interesting for would be A350 / A380 style taxiway maps, if one could show just the taxiway and runways from OSM.
User avatar
legoboyvdlp
 
Posts: 7279
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: next
OS: Windows 10 HP

Re: OSM maps in ND?

Postby Hooray » Mon Feb 15, 2016 2:54 pm

Right, if I remember correctly, omega95 mentioned exactlly that in the original thread - but I cannot find it at the moment, i.e. he was specifically asking for this particular feature for the A380 display of airport maps.

Note however tha this does not require C++/OSG work, it's mainly a matter of integrating existing features, i.e. mainly about knowing a little about Nasal and Canvas to adapt existing code.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest