Canvas Tile Element
|Once you get to the extra features (of modern avionics), like FIS-B weather or TIS-B traffic info over ADS-B, or (terrain alerting), we're probably in way over our heads trying to emulate even the simplest general-aviation IFR GPS.
— David Megginson (Jul 3rd, 2017). [Flightgear-devel] RFD: FlightGear and the changing state of air navigation .
(powered by Instant-Cquotes)
|I'd really like to use the Atlas generated maps as a layer in the browser map. Is anybody out there looking for an adventure and is able to modify the Atlas map generator to generate maps on-the-fly?
|This article is a stub. You can help the wiki by|
The nice thing about Atlas is that it uses the current FlightGear scenery for generating it's maps. If we get better scenery, Atlast produces better maps.
This issue of not being able to render maps to a sub window is coming back to bite us every time. If it's not stuff like this then it's moving map/GPS/ND type instruments. 
An Atlas- style renderer as another layer is possible, it'd also let people builda 'map' dialog box with navaids and airways overlaid, like the map UIs in MSFS / X-Plane / Fly. 
In order to feed imagery from tools like Atlas or moving maps in general from a network server, you'd want to look at protocols like WMS and the servers which already have been developed for this purpose.
tiled web maps are obviously great for many reasons, but people without a broadband internet connection may still want to use a different tool, or even an offline solution in general. And like I said, there is the issue of mismatching data - FlightGear has never been particularly good at this, but there is now an increasing tendency to rely on "online functionality", i.e. there is a growing assumption that people do have an internet connection, and that they're online while using FlightGear - depending on whom you ask, that is not just controversial, but increasingly problematic.
Apart from that, there is the issue that some of our really long-term contributor are in fact behind GSM-style connections, as well as a growing number of hard-coded online assumptions that have hit the project repeatedly - remember the METAR URL issue ?
Bottom line, it's not a good idea for the project to rely so much on infrastructure and make connectivity assumptions, FlightGear must remain usable in offline mode.
Atlas/Map can help the project to remain/become self-sufficient (again).
We've previously seen how this reliance on online infrastructure can hit the project really hard and affect the project for years to come (mapserver).
It isn't too far-fetched to suggest that sooner or later the project's increasing tendency to add functionality with a focus on people being online, will leave some people out of the loop.
Absorbing atlas back into the project can help the project to become self-sufficient again.
Thanks to the Canvas system, we now have an increasing number of MFDs/avionics that use so called "slippy" maps - there remains the obvious issue that such a "slippy map" will usually be based on very different geo data than FlightGear's terrain (i.e. mismatching data).
FlightGear uses relatively old data pulled at the time from X-Plane (IIRC). This data is not updated regularly because this could cause conflicts with the (also relatively old) scenery.
More and more Airports that have different airport data on the FG Map & Route Manager. Route Manager data seems to agree with other map sources like Sky Vector. Does FG Map get updated from independent sources like Sky Vector & others.
Drawing an entire image via setPixel calls from Nasal (for terrain / wxr radar overlays by any chance?) will also be slow,i n which case, it might be better to make these special image layers which are computed by C++ code, so they can be updated efficiently.
Obviously, it's a valid use-case, i.e. creating a ‘scanned’ terrain radar, WXR or similar overlays on Canvas, no argument there, where defining a raster via paths is pretty heavyweight for frequent updating. 
For features like:
- Inverse synthetic-aperture radar
- Synthetic-aperture radar
- Ground radar
- Ground radar for moving objects
But once we got capability for modifying canvas images real-time or through some other method like fragment shader, it will be usable for many things, for example wxr radar etc etc.
Originally, radar altimeter was a big CPU hit, because it does a ‘scanned’ set of 3D ground intersections (over a range of angles in two axes) at the full FDM rate (120Hz), and this becomes significant number of triangle intersections.
This kind of feature would be the prerequisite to get a working TERRain mode on the 737 MAP display.
RFC (idea/feature request frequently discussed on the devel list and forum)
FlightGear uses very outdated navigational data - whereas online sources (chart providers) use different data.
To solve this, we need to use the same underlying data source.
The most straightforward option would be to procedurally render our own charts using the map/atlas tools, and use those internally, without relying on 3rd party sources, and online web services.
There is the long-standing idea to use FlightGear itself to render a map to a texture, e.g. based on the atlas/map source code (GPL compatible), quoting TorstenD:
- What I have in mind for the map is to render the map tiles (small 256x256px fragments of a map) from flightgear scenery data on the fly when the user requests them from within the map application. Thats how openstreetmaps works and I like the idea of reusing proven concepts. There is no need at all - in fact, it's not even desireable - to do that in the main loop. Running a standalone application (or call it process if you like) creating and serving the tiles will add no load to the FlightGear process, no matter how complex the map is.
|Note Porting Map.cxx into a dedicated ReaderWriter plugin for OSG by merging it with the existing STG/BTG ReaderWriter machinery in SimGear, we still end up with a mechanism that runs outside the main loop for loading/rendering, even if we're going through Canvas::Image or a subclass of it, because osg::Image objects are loaded by a worker thread.|
See Atlas for the main article about this subject.
Given that we do have existing code to render such maps, and that the Canvas system does have support for loading raster images (sc::Image), this would be the most straightforward option to ensure that there is no mismatch between a moving map and a corresponding radar display, because it'd be using the same underlying terrain/vector data.
|Note Also note that, while atlas may seem huge/complex and archaic, all that is needed is porting Map.cxx - which is really just 600 lines of self-contained C++ code, because it's a standalone executable - and it deals with all the parsing/scenery processing using atlas APIs, so given that it's designed to run in a separate process, it could also easily run outside the fgfs main loop, i.e. as part of an OSG ReaderWriter plugin, at which point it would become trivial to also support BTG files at the canvas/image level, because the plugin would process the BTG files using Map.cxx: https://sourceforge.net/p/atlas/hgcode/ci/default/tree/src/Map.cxx
This would also mean that Phi could use an atlas/map based back-end for the creation of maps based on actual FlightGear scenery, as per Torsten's original idea.
atlas isn't "obsolete" - it just works "as is". What it provides ? A moving map, and in fact an accurate moving map - because it contains its own terrain processing routines that "parse" FlightGear scenery/terrain to render moving map charts interactively, and it does so in a different process (out of the FlightGear main loop), so can easily use other cores.
These days, it may admittedly seem redundant and even irrelevant thanks to options like Phi and/or Azure. But the truth is, atlas remains relevant, because it processes actual FlightGear terrain files to create those charts, but also because it's an "offline" application, you don't need a high bandwidth internet connection - it will even work without an internet connection.
As a matter of fact, the right thing to do would be absorb atlas/map into simgear and use it in-sim to dynamically create charts "on demand", which would then include "up to date" airport charts (think runways, taxiways, frequencies etc) - but that would also mean updating atlas, because it's still from the early pre-OSG days, i.e. is using legacy OpenGL
- Canvas Image