Accordind to 661 wikipedia
Map widgets are widgets which allow to manage digital maps
Map widgets are widgets which allow to manage digital maps
I wonder if there is some simple digital map data to use in the map widget.
I suppose the widget is configurable to accept a specific digital map format.
I try to find some digital map data matching with available geographical flight path of the FG Live.
Grateful for advice.
Hello, there is a tutorial for digital maps in ARINC and J661 here : http://sourceforge.net/apps/mediawiki/j661/index.php?title=Maps_tutorial. Maps behaavior is different from other widgets, because in fact all the content of the Map is defined at runtime through MapItems (see also here: http://sourceforge.net/apps/mediawiki/j661/index.php?title=MapItem).
There is a Maps Demo working the Demos (you can try bthe Demos zip file), but unfortunately the code in the Demo is in java, it's not scripted in the example used, nor it is linked to FlightGear for example - in the MapDemo the Map is static, the only thing you can do is changing the scale dynamically.
However J661 support changing dynamically the content of the Map also, and normally it should also work with Scripts and data providers.
I will try to add a very simple Map management in the FlightGear / Playback contribs where I would add a simple horizontal Map and add an item for the plane, and the previous itinerary of the plane followed (all by using DataProvider and scripting, not Java code). I think it should answer some of your questions.
In the meantime, don't hesitate to ask questions if some things about maps do not seem to be clear to you. I think that by playing with the Demo, or the tutorial, you may understand more how Maps are working).
OK, thank you! I am sorry, I am stil confused. Let me explain a quite simple thing I try to test.
I downloaded Demos 0.52.
The first thing is I try to start a stand alone server and appropriate settings (actually, the MapItems UI library as you mention), the -config and -df as indicated in the Maps tutorial, though not launching the server manually but in a command line.
I suppose the -settings -config -df should point files in the Demos directory you indicated.
Is there a way for do that?
The other question with I could not find an answer is that the current j661 map setup permits to show a real map in the server, based on a separate file digital map data (I realise such as file is not available in the j661 file packages). As I understand, your maps tutorial you refere don't mention just this issue.
P.S. The connection with FG in order to get the current a/c position (lon/lat) is a later goal of my test after reaching the goals above.
For using the Demos, you just need to put the APIDemos.jar in the distrib directory, and double click on the jar file (or on the command line "java -jar APIDemos.jar"), and you are done. I should reflect that in the article about the demos. I did not want to put the distrib also in the Demo to limit the size of the demos jar file.
Also when I talked about a digital map, it might have been a little misguiding. What the Server is currently providing is a framework to display dynamic elements which are presented on top of digital maps such as FlightPlans, VOR, traffic, etc… The Server manage not only the drawing of the symbols but also their projection.
However, although the ARINC 661 standard is also capable of rendering the "background" of the digital maps (the cartography), the J661 Server is currently not capable of that. You are not the only one to ask for it (even internally at Dassault), so this is something I should work on soon.
Thank you for useful explanations. Indeed, I misunderstood the features of the 661 map widgets (“Map widgets are widgets which allow managing digital maps”).
I understand that rendering the cartography is a bigger issue for the j661.
This improvement would be appreciated but it involves a lot of work. However, I can image that some resources and ideas could be shared from FlightGear. In the FlightGear 2.4.0 it provides an in-sim moving map. Hopefully this issue could possible to share from FG, e.g. by “embedding” it in the j661 display.
I can imagine as a first future issue a basic functionality where a 500x500 km geographical flight test area provided with necessary GIS information (should be an advantage that the chosen area covers 2-3 airports too) is chosen for more realistic simulation and test purposes. Actually it is not need to cover the whole world.
Some more thoughts.
Moreover, before introducing the cartography feature at all, it would be probably easier to provide the map with a coordinate grid which follows the aircraft position. That could represent a simpler “moving map” with cartographic element. The grid can be generated with input from the a/c position and the current scale. As a moving map the a/c symbol should be placed somewhere at x=dx/2, y=dy/5 where d is the display dimensions.
Thanks once again for the huge job putted in this opensource project!
P.S. It would be also nice that support exists to provide the a/c symbol with a velocity vector and a time-range circle (a circle representing the distance reached in x minutes e.g. 10 minutes at the current a/c velocity). The calculation of the “range circle” would be made by an “UA Mission” module using as input the a/c velocity, .the current map scale and probably some input from the pilot. My intention is to try to configure that feature my self – it depend if the map symbols are free to configure and dynamically change.
The coordinate grid stuff, the A/C symbol with velocity vector , and the time-range circle type symbols (or MapItems, which is how symbols in digital maps are named in the standard) are all supported in ARINC 661 and the J661 Server 'including the API to communicate by the UA). So this should not be too difficult to do.
Symbols (of any shape) with velocity vector, and circles are dirrectly supported in the standard. For grid you should use several segment mapItems. All these elements can be defined in Lattitude/Longitude coordinates, the Sever will take care of the conversion to display coordinates, and also take care of the scale of the Map, its orientation, and the position of the center (which in your example has an offset relative to the A/C).
In the Demo, you have an example of MapItems without velecoty vector, and line segments; However, unfortunately, in the example only the scale can be changed, so this example does not show how to use the API (which can be used in Java and should be usable also in Scripting ) to set MapItems positinos (or even create ones). I really should add examples about that.
As for using FG for digital maps, its one of the ways to be able to render the embedded GIS Map. The other is to use the MapGrid widget, but there is much more xwork to do in the Server and the UA.
I plan to work in these two directions, the first one (embedding an external Map) is the simplest in the short term. There is no standardized widget for that yet, but there is ongoing discussions in the committee to provide this for the next supplement, so using it with FG would also be a nice way to prototype this functionality before putting it in stone and using it in real-world ARINC 661 systems ;)
Also it should not be "so" difficult to perfo (hmm there's still some work to do of course. There is a way in Java to embed an OpenGL context in the Java rendering (the Server currently allows to do it the other way, using the JOGL library). What I'm thinking about is to provide an interface / API in a plugin (like the DataProvider already does for example) to allow to link it to any OpenGL context rendered by another app / library. I will have a look to your link.
P.S.: I still have to work on the link with FG for the provider, using the patch designed by hooray. it should improve performancce a lot.