Canvas MapStructure layers: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
m (add links to omega95's recent Canvas-based work for future reference)
Line 48: Line 48:
| TAXI || Stationary || taxiways || {{Not done}} || {{MapStructure_File|name=TAXI|type=lcontroller}} || TAXI.symbol || ...|| all || required to phase out map.nas
| TAXI || Stationary || taxiways || {{Not done}} || {{MapStructure_File|name=TAXI|type=lcontroller}} || TAXI.symbol || ...|| all || required to phase out map.nas
|-
|-
| TERR || Stationary || Terrain heightmap (G1000-style) || {{Not done}} || {{MapStructure_File|name=TERR|type=lcontroller}} || TERR.symbol || ...|| all (main/AI/MP) <font color="red">HEAVY!</font>|| use the terrain presampler to compose a heightmap using raster images. Also see Omega95's pre-Canvas work at [http://forum.flightgear.org/viewtopic.php?f=30&t=15635&p=152444&hilit=vsd#p152486] and [http://forum.flightgear.org/viewtopic.php?f=4&t=15722&p=153438&hilit=vsd#p153438]
| TERR || Stationary || Terrain heightmap (G1000-style) || {{Not done}} || {{MapStructure_File|name=TERR|type=lcontroller}} || TERR.symbol || ...|| all (main/AI/MP) <font color="red">HEAVY!</font>|| use the terrain presampler to compose a heightmap using raster images. Also see Omega95's pre-Canvas work at [http://forum.flightgear.org/viewtopic.php?f=30&t=15635&p=152444&hilit=vsd#p152486] and [http://forum.flightgear.org/viewtopic.php?f=4&t=15722&p=153438&hilit=vsd#p153438].
In 07/2014, omega95 started porting some of his VSD/heightmap work to use Canvas:
* http://forum.flightgear.org/viewtopic.php?f=71&t=23593&p=214920#p214906
* http://forum.flightgear.org/viewtopic.php?f=71&t=21509&p=214897#p214826
|-
|-
| TFC || <font color="blue">Moving</font> || Traffic (AI/MP) || {{Done}} || {{MapStructure_File|name=TFC|type=lcontroller}} || TFC.symbol ||  ... || all (main/AI/MP)|| caching/styling ?  needs listener to receive notifications once enabling/disabling AI/MP, needs optimizations (e.g. draw vs. just update)
| TFC || <font color="blue">Moving</font> || Traffic (AI/MP) || {{Done}} || {{MapStructure_File|name=TFC|type=lcontroller}} || TFC.symbol ||  ... || all (main/AI/MP)|| caching/styling ?  needs listener to receive notifications once enabling/disabling AI/MP, needs optimizations (e.g. draw vs. just update)

Revision as of 11:40, 17 July 2014

This article is a stub. You can help the wiki by expanding it.


A simple MapStructure layer called DEMO that renders a circle of NDB symbols (SVGs) in the vicinity of the aircraft using geo.nas and its helpers like geo.aircraft_position() and the apply_course_distance(course, dist) method as per [1]. See Canvas Radar to learn more.


Note  These MapStructure layers are currently to be found in $FG_ROOT/Nasal/canvas/map - these are conventional Nasal files, but they are bound to existing data structures at run-time and become classes that can be procedurally instantiated and customized. Depending on the phase of the current release cycle, the links shown below may be outdated and more recent additions are to be found in the Canvas-hackers team clone only. There are several incomplete/missing layers, if you'd like to work on any of those, please get in touch via the forum first.
Name Type (object/position) Description Status management drawing/styling styling flags drivers Notes
ALT-profile ... route manager/flightplan Done Done ALT-profile ALT.symbol ... local only required to phase out map.nas
APS Moving Airplane Symbol Done Done APS APS.symbol ... all (main/AI/MP) caching/styling ? needs listeners to respond to map events (ref-lat/ref-lon, heading, center etc)
APT Stationary Airports (ND) Done Done APT APT.symbol line_width ... all (main/AI/MP) caching/styling ? ticket #1320 Done Done [2]basically done, but some optimizations are being considered (mostly via the positioned APIs)
ILS Stationary ILS/LOCALIZER Not done Not done ILS ILS.symbol line_width ... all (main/AI/MP) caching/styling ? should probably be split: LOC and ILS ?
AWY Stationary Airways (LO/HI) [3] Not done Not done AWY AWY.symbol ... all (main/AI/MP) also see James' comments at Map
DATA Stationary info labels for all layers Not done Not done DATA DATA.symbol ... all (main/AI/MP) also see Map and [4]
ESRI/SHP Stationary ESRI shapefiles (shp), e.g. for borders/coastlines etc [5] Not done Not done SHP ESRI.symbol ... all (main/AI/MP) prototype using a shp2svg script[6]. Either expose shapelib/OGR via cppbind or add a new CanvasElement for shapefile processing
FIX Stationary fixes 80}% completed FIX FIX.symbol line_width ... all (main/AI/MP) caching/styling ?
FLT Moving (continuous!) Flight Path/History (main aircraft-only!) 60}% completed FLT FLT.symbol ... main-only ! All API calls should be moved into aircraftpos.controller, so that we can encapsulate this and use timer-based sampling for AI traffic. caching/styling ?
GRID Stationary lat/lon grid 20}% completed GRID GRID ... all (main/AI/MP) draws a lat/lon grid with tic marks
NDB Stationary NDB stations Done Done NDB FIX.symbol (draws a SVG) line_width ... all (main/AI/MP) caching/styling ?
PARK Stationary parking/helipads Not done Not done PARK PARK.symbol ... all required to phase out map.nas
POI Stationary Points of Interest Not done Not done POI POI.symbol ... all (main/AI/MP) alreadyexposed via Nasal/NavCache
RTE Stationary Routing (legs, flightplan API) 70}% completed RTE RTE.symbol ... main-only ! the route layer needs to use listeners to receive "onChange" notifications from the route manager, or it may take a few seconds until the route shows up ticket #1326 caching/styling ?
RWY Stationary runways Not done Not done RWY-profile RWY.symbol ... all required to phase out map.nas
SAT Stationary tiled map overlay via http (mapserver/OSM) [7] 10}% completed SAT SAT.symbol ... all (main/AI/MP) performance depends on bandwidth, should probably be cached persistently in $FG_HOME
TAXI Stationary taxiways Not done Not done TAXI TAXI.symbol ... all required to phase out map.nas
TERR Stationary Terrain heightmap (G1000-style) Not done Not done TERR TERR.symbol ... all (main/AI/MP) HEAVY! use the terrain presampler to compose a heightmap using raster images. Also see Omega95's pre-Canvas work at [8] and [9].

In 07/2014, omega95 started porting some of his VSD/heightmap work to use Canvas:

TFC Moving Traffic (AI/MP) Done Done TFC TFC.symbol ... all (main/AI/MP) caching/styling ? needs listener to receive notifications once enabling/disabling AI/MP, needs optimizations (e.g. draw vs. just update)
TGT Moving ATC-Targets (AI/MP) 20}% completed TGT TGT.symbol ... all (main/AI/MP) caching/styling ?
TUT Stationary Tutorial targets 80}% completed TUT TUT.symbol line_width ... main-only ! also show models?
TWR Stationary towers Not done Not done TWR-profile TWR.symbol ... all required to phase out map.nas
VOR Stationary VOR stations 80}% completed VOR VOR.symbol * line_width all (main/AI/MP) navaid layers need to register autopilot/navradio listeners in their controller, because the ND highlights certain stations based on selected frequency/OBS settings - caching/styling ?
WPT Stationary Waypoints (flightplan API) 80}% completed WPT WPT.symbol ... main-only ! bug fixed [10], caching/styling ? navdisplay.mfd still contains a few stubs from the original code - they should be replaced once we respond to RM events in RTE/WPT
WXR Moving Weather (LW/AW only!) 80}% completed WXR WXR.symbol (draws a PNG) ... all (main/AI/MP) needs to use listeners to receive notifications on enabling/disabling AW, and any settings related to it, caching/styling?