Board index FlightGear Development Canvas

BROWSER MP-MAP plotted on a MFD somebody?

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.

BROWSER MP-MAP plotted on a MFD somebody?

Postby Cpt Goosnen » Fri Feb 14, 2014 4:26 pm

Hy There,

dont bite me when its absolut impossible.... but
Is it possibl to have the browser MP-Map on an cockpit instrument??

and: bite me when its already there anywhere :lol:

regards Tob
actually quite still naive
User avatar
Cpt Goosnen
 
Posts: 154
Joined: Mon May 13, 2013 6:08 am
Location: direct north of EDDF's rnwy18
Callsign: Arse
Version: 3.0
OS: atari

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Fri Feb 14, 2014 4:36 pm

No, not currently - but -to some extent- TheTom is basically working towards something similar, see: http://wiki.flightgear.org/Using_OSM_Ve ... 8TheTom.29

http://www.mail-archive.com/flightgear- ... 38354.html
Yes, this is definitely something I want to support. Maybe in a first
step just a tiled map from files on the hard disk, but later also
fetching from an url should be possible. It should also be possible
instead of directly fetching the tiles from FlightGear just running an
external application which puts the files in a folder where FlightGear
finds them.


This is primarily about supporting tiled maps currently, i.e. downloading images via HTTP and rendering them as a Canvas inside FG. The underlying machinery is already in place for this (Nasal HTTP bindings, Canvas raster image support).
Rendering a complete web browser is a bit more difficult and involves quite a few dependencies (webkit/JavaScript), but is already OPTIONALLY supported by OSG itself.

It would be possible to expose this via a custom Canvas::Element: http://wiki.flightgear.org/Canvas_Development#Elements

I don't have any need for this personally, but I can walk you through the required steps if you are interested in working on this (assuming you are able to build FG and know C++/OSG). Otherwise, I'd suggest to file a feature request to see if there is anybody else interested in this: http://flightgear-bugs.googlecode.com/

Personally, I could imagine that some additional Canvas elements for these things could be useful - such as e.g. rendering PDFs inside FG, which is also supported by OSG, but not yet supported - it would make it extremely straightforward to show airnav.com charts (SIDs/STARs/IAPs) inside FG, but obviously at the cost of adding new dependencies to FG.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Cpt Goosnen » Fri Feb 14, 2014 4:57 pm

sounds pretty good; i tryed to get in canvas a bit without bigger success untill now, just thought about: it must be possible to tell an instrument that it should just show http:mpmap etc... maybe by extending the source code (have no idea about developing such things) but ok , good to hear there is something in progress! Best thing would surly be to have it in FG_root and not in http: etc

and i am pretty sure there a lot FG pilots which would use some kind of map
actually quite still naive
User avatar
Cpt Goosnen
 
Posts: 154
Joined: Mon May 13, 2013 6:08 am
Location: direct north of EDDF's rnwy18
Callsign: Arse
Version: 3.0
OS: atari

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Fri Feb 14, 2014 5:05 pm

Development-wise this would not even be very difficult, as OSG already supports Webkit-based browser-views via several optional plugins - and extending the Canvas accordingly by adding a new Element would also not be too complex - the real issue is the number of additional dependencies (libraries) pulled in to make this work - i.e. we would basically be linking a full web browser into FG (including JavaScript, Flash etc), or adding the corresponding DLLs/DSOs (libraries) to the distribution ...
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby helijah » Thu Feb 27, 2014 4:44 pm

One simple answer: OSGEarth

Indeed everyone hangs on the fact that OSGEarth can change the landscape. But this is not the only thing. It is quite conceivable to use classic V2 landscapes and OSGEarth to display maps in the instruments.

For over 5 years I'm trying to explain it. That wasted time :(

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby adrian » Thu Feb 27, 2014 5:55 pm

Like Hooray said. Trivial to code, but would bring in a boatload of dependencies.
adrian
 
Posts: 362
Joined: Wed Sep 15, 2010 3:15 pm

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Thu Feb 27, 2014 6:06 pm

yeah, there's even code in $OSG_SRC/examples doing exactly this, i.e. rendering a fully interactive webkit-browser to a texture. But all those dependencies are not really relevant to FlightGear. Also, there would be quite a bit of redundant stuff added, which we don't even use in other places.

Now, regarding osgEarth - 2 years ago, I would have said that it would be overkill to use something like osgEarth "just" for a moving map display - these days, thanks to the work done by poweroftwo, it would actually be possible and probably not even very difficult to render an osgEarth "view" to a canvas texture, it could certainly be added to the osgEarth mode scheduled for 3.2, where no new dependencies would be introduced.

Regarding the whole web browser idea, the other issue is that we do not support asynchronous canvas elements, i.e. everything is done sequentially so far - so supporting a full browser (=JavaScript !!!) would be not a very good idea. I think TheTom's work on supporting tile maps and persistent canvas textures are more promising - in combination with Philosopher's MapStructure work, we could simply use a tiled map as background image and 30-50 lines of Nasal code to make things interactive, without pulling in a ton of dependencies.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Wed Mar 19, 2014 2:33 am

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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

can someone tell me if miami or timbuktu???

Postby Cpt Goosnen » Mon Apr 07, 2014 2:21 pm

helijah wrote in Thu Feb 27, 2014 4:44 pm:One simple answer: OSGEarth

Indeed everyone hangs on the fact that OSGEarth can change the landscape. But this is not the only thing. It is quite conceivable to use classic V2 landscapes and OSGEarth to display maps in the instruments.

For over 5 years I'm trying to explain it. That wasted time :(

Regards Emmanuel




one simple question:

is it ok for u emmanuel when u just confuse me sometimes more than my own 8)
starting threads in that forum cause somebody told me he wouldnt get his map working well is also wasted time now ;)

thread closed / solved
actually quite still naive
User avatar
Cpt Goosnen
 
Posts: 154
Joined: Mon May 13, 2013 6:08 am
Location: direct north of EDDF's rnwy18
Callsign: Arse
Version: 3.0
OS: atari

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Mon Apr 07, 2014 2:40 pm

actually, poweroftwo confirmed a while ago, that rendering osgEarth to a texture should be straightforward, at least for the patched scenery engine that already supports osgEarth.
So the idea is not that far-fetched.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Cpt Goosnen » Mon Apr 07, 2014 3:20 pm

might be, and my post isnt mentioned ironic or anything badly, its just.....
i started looking around how to get his map working, cause somebody with his name and account said me something else.....

im aware that helijah didnt want to joking with me, but he had more time to do it as me, cause i have no idea about all that and i missed 4 years of his explanations :~) i just wanna say, "i will stop here making apes out of me" 2renough

will maybe come back when ive finished all on my own,
regards
actually quite still naive
User avatar
Cpt Goosnen
 
Posts: 154
Joined: Mon May 13, 2013 6:08 am
Location: direct north of EDDF's rnwy18
Callsign: Arse
Version: 3.0
OS: atari

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Mon May 12, 2014 12:49 pm

been playing with the idea a bit to make some things faster (especially fetched images) - for now, I would probably suggest to just use the existing SQLite bindings (used for the navcache) to store canvas textures in $FG_HOME, along with some mandatory attributes:

- fg version
- canvas version
- subsystem-version (e.g. ND/MapStructure etc)
- meta attributes/keys (e.g. runways, taxiways)
- description (for debugging/troubleshooting purposes)
- image format (for OSG)
- binary blob
- creation date

we could simply also support that through he property tree, where a "persistent" or "cache" sub tree needs to be set (with some Nasal helpers), and then support a canvas-cache:// lookup that tries to load an image from the cache
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby TheTom » Tue May 13, 2014 7:37 pm

Seems a bit overly complex. What do you want to use the whole meta information for? For http requests I'm planning to implement a cache similar to how browsers do it. Probably in a sqlite database I will store path, modification time, etc. On reloading a given file, according to the http Expires header, it will be just fetched from disk or updated over http.
TheTom
 
Posts: 322
Joined: Sun Oct 09, 2011 11:20 am

Re: BROWSER MP-MAP plotted on a MFD somebody?

Postby Hooray » Tue May 13, 2014 7:45 pm

sounds good to me - the complexity is there admittedly, but it's mainly supposed to deal with version changes (e.g. fg binary and/or canvas/MapStructure). A single "meta" info field should suffice tho, if it's used like a hash key.

So this is not just about http fetching, but also about persistently caching other canvas textures, that may be created by canvas-based systems (MapStructure/NavDisplay) that may need to encode some meta information to know what version of a script/API has created the corresponding cache entry.

For example, let's say we're caching an airport grid with 4x4 sub-textures in a single canvas that stores 1) runways, 2) taxiways, 3) parking, 4) helipads - i.e. 1 airport per row with 4 "layers" (groups as sub-textures). If the caching system and/or the framework changes, it needs to know if it can reuse the old data or better rebuild it. I mean it's up to us to implement backward compatibility, but things like data/format etc will be really helpful for debugging/troubleshooting purposes I guess.

Not trying to convince you though - we'll see how well it works out, but backward compatibility is not exactly our strongest forte, and being able to cache complex textures persistently would make sense, but "high-level" systems like MapStructure/ND may need to store some additional info for each blob, or it will be hard to reuse cached data in certain situations.

In the case of the GUI or charts we may want to use the "meta" field to encode styling info for example
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Canvas

Who is online

Users browsing this forum: No registered users and 3 guests