Del via


Overview

XML Gauge Maps

The following table of variables can be used within the XML Gauge system to create colored 2D maps, such as those that appear in GPS or radar systems. Refer to the Creating XML Gauges document for more details on creating XML gauges.

See Also

Table of Contents

  • 2D Map Drawing
  • XML Map Variables
  • XML Compass Rose Variables
  • Example Map

2D Map Drawing

The 2D map is rendered in the following order. The order cannot be changed, but whether each layer is rendered or not, the colors used, and a number of other features of the map, can be changed through the setting of the various variables.

  1. Background
  2. Terrain
  3. Geo-political
  4. Grid lines
  5. Range rings
  6. Airports
  7. VOR
  8. NDB
  9. ILS
  10. Intersections
  11. Airspace
  12. Flight plan
  13. Approach data
  14. Vehicles
  15. Airways
  16. Racepoints

The compass rose is a separate object in the gauge system, but is drawn on top of the radar screen.

XML Map Variables

Most of the following variables can only be used by the map gauge itself. Three can be read by other gauges: TagPosition, SelectedVehicle and MapLoading. The first two, TagPosition and SelectedVehicle, can also be set by other gauges.

Priority Bool Set to True to draw the map as a priority.
Zoom Float Range of 80 to 500000 pixels per meter. Default is 5 x 1852 (1852 is meters per nautical mile).
PanVertical Float Distance to pan vertically in pixels. Negative will pan up.
PanHorizontal Float Distance to pan right in pixels. Negative will pan left.
PanReset Bool Set to True to return to the original position prior to any panning.
MapLoading Bool Set to True if the map is currently being loaded.
Latitude Float The latitude that is to be the center point of the map (usually the user aircraft, though could for example be an airport tower).
Longitude Float The longitude of the center point of the map.
Heading Float The heading (usually of the user aircraft).
TrackUp Bool Set to True if the map should be drawn with the track of the aircraft facing up. False gives North facing up.
CenterX Float The X position of the aircraft (usually the user aircraft, but could for example be an airport tower) on the map, in pixels. This is often the actual center of the map, but can be used so that more of the map shows what is in front of the aircraft, and less behind it.
CenterY Float The Y position of the aircraft on the map, in pixels.
UpdateAlways Bool Set to True if the map should be updated every frame. Set to False if the map is only to be updated when positions have changed enough.
SelectedVehicle Int The ID of the selected vehicle. Refer to the ITrafficInfo custom variables described in the Creating XML Gauges document for more details.
TagPosition Int One of:
0 = UPPERRIGHT
1 = RIGHT
2 = LOWER_RIGHT
3 = BOTTOM
4 = LOWER_LEFT
5 = LEFT
6 = UPPER_LEFT
7 = TOP
BackgroundColor Int RGB value
IceColor Int RGB value
WaterColor Int RGB value
Elevation0Color Int RGB value
Elevation1000Color Int RGB value
Elevation2000Color Int RGB value
Elevation3000Color Int RGB value
Elevation4000Color Int RGB value
Elevation5000Color Int RGB value
Elevation6000Color Int RGB value
Elevation7000Color Int RGB value
Elevation8000Color Int RGB value
Elevation9000Color Int RGB value
Elevation10000Color Int RGB value
Elevation11000Color Int RGB value
Elevation12000Color Int RGB value
Elevation13000Color Int RGB value
Elevation14000Color Int RGB value
Elevation15000Color Int RGB value
Elevation16000Color Int RGB value
Elevation17000Color Int RGB value
TerrainShadow Bool Set to True if terrain shadows are to be rendered
LayerTerrain Bool Set to True if this layer is to be rendered
LayerBorders Bool Set to True if this layer is to be rendered
LayerGridLines Bool Set to True if this layer is to be rendered
LayerAirports Bool Set to True if this layer is to be rendered
LayerVORs Bool Set to True if this layer is to be rendered
LayerILSs Bool Set to True if this layer is to be rendered
LayerNDBs Bool Set to True if this layer is to be rendered
LayerIntersections Bool Set to True if this layer is to be rendered
LayerAirspaces Bool Set to True if this layer is to be rendered
LayerApproach Bool Set to True if this layer is to be rendered
LayerFlightPlan Bool Set to True if this layer is to be rendered
LayerVehicles Bool Set to True if this layer is to be rendered
LayerAirways Bool Set to True if this layer is to be rendered
LayerRangeRings Bool Set to True if this layer is to be rendered
LayerRacePoints Bool Set to True if this layer is to be rendered
DetailLayerTerrain Int -1 = Default
0 = Draw nothing
1 = Water only
3 = In color
DetailLayerBorders Int -1 = Default
0 = Draw nothing
1 = Geopol boundary
DetailLayerGridLines Int -1 = Default
0 = Draw nothing
DetailLayerAirports Int -1 = Default
0 = Draw nothing
1 = Dot
2 = Circle
3 = Circle runways
4 = Block runways
5 = Runways
DetailLayerVORs Int -1 = Default
0 = Draw nothing
1 = Dot
2 = Symbol
DetailLayerILSs Int -1 = Default
0 = Draw nothing
1 = ILS
DetailLayerNDBs Int -1 = Default
0 = Draw nothing
DetailLayerIntersections Int -1 = Default
0 = Draw nothing
1 = Waypoint dot
2 = Waypoint symbol
DetailLayerAirspaces Int -1 = Default
0 = Draw nothing
DetailLayerApproach Int -1 = Default
0 = Draw nothing
1 = Approach
2 = Missed
3 = Arrow Head
DetailLayerFlightPlan Int -1 = Default
0 = Draw nothing
1 = Solid line
2 = Dashed line
DetailLayerVehicles Int -1 = Default
0 = Draw nothing
1 = ATC symbol
2 = TCAS symbol
3 = Realistic symbol
DetailLayerAirways Int -1 = Default
0 = Draw nothing
1 = Thin lines
2 = Thick lines
DetailLayerRangeRings Int -1 = Default
0 = Draw nothing
DetailLayerRacePoints Int -1 = Default
0 = Draw nothing
TextDetailLayerTerrain Int -1 = Default
0 = Draw nothing
TextDetailLayerBorders Int -1 = Default
0 = Draw nothing
TextDetailLayerGridLines Int -1 = Default
0 = Draw nothing
TextDetailLayerAirports Int -1 = Default
0 = Draw nothing
1 = ICAO
2 = Name
3 = Name and elevation
4 = Name, elevation and frequencies
5 = Runways
TextDetailLayerVORs Int -1 = Default
0 = Draw nothing
1 = ID
2 = ID frequency
3 = ID Morse
TextDetailLayerILSs Int -1 = Default
0 = Draw nothing
1 = ID
2 = ID frequency
3 = ID Morse
TextDetailLayerNDBs Int -1 = Default
0 = Draw nothing
1 = ID
2 = ID frequency
3 = ID Morse
TextDetailLayerIntersections Int -1 = Default
0 = Draw nothing
1 = Waypoint ID
TextDetailLayerAirspaces Int -1 = Default
0 = Draw nothing
TextDetailLayerApproach Int -1 = Default
0 = Draw nothing
TextDetailLayerFlightPlan Int -1 = Default
0 = Draw nothing
TextDetailLayerVehicles Int -1 = Default
0 = Draw nothing
1 = Realistic
2 = Detailed
TextDetailLayerAirways Int -1 = Default
0 = Draw nothing
TextDetailLayerRangeRings Int -1 = Default
0 = Draw nothing
TextDetailLayerRacePoints Int -1 = Default
0 = Draw nothing
ObjectDetailLayerTerrain Int -1 = Default
0 = Draw nothing
ObjectDetailLayerBorders Int -1 = Default
0 = Draw nothing
0x1 = Coastline
0x2 = Boundary
ObjectDetailLayerGridLines Int -1 = Default
0 = Draw nothing
ObjectDetailLayerAirports Int -1 = Default
0 = Draw nothing
0x1 = Towered
0x2 = Not towered
0x4 = Hard
0x8 = Soft
0x10 = Water
0x20 = Heli
0x40 = Private
ObjectDetailLayerVORs Int -1 = Default
0 = Draw nothing
0x1 = VOR
0x2 = VOT
ObjectDetailLayerILSs Int -1 = Default
0 = Draw nothing
0x1 = Cone
0x2 = Line
ObjectDetailLayerNDBs Int -1 = Default
0 = Draw nothing
ObjectDetailLayerIntersections Int -1 = Default
0 = Draw nothing
ObjectDetailLayerAirspaces Int -1 = Default
0 = Draw nothing
ObjectDetailLayerApproach Int -1 = Default
0 = Draw nothing
ObjectDetailLayerFlightPlan Int -1 = Default
0 = Draw nothing
0x1 = Enroute
0x2 = Approach
0x4 = Missed approach
0x8 = Waypoints
ObjectDetailLayerVehicles Int -1 = Default
0 = Draw nothing
0x1 = Track line
0x2 = Ground vehicles
0x4 = Airborne vehicles
0x8 = Racing vehicles
ObjectDetailLayerAirways Int -1 = Default
0 = Draw nothing
0x1 = Victor
0x2 = Jet
ObjectDetailLayerRangeRings Int -1 = Default
0 = Draw nothing
ObjectDetailLayerRacePoints Int -1 = Default
0 = Draw nothing
ColorLayerTerrain Int RGB value
ColorLayerBorders Int RGB value
ColorLayerGridLines Int RGB value
ColorLayerAirportsTowered Int RGB value
ColorLayerAirportsUntowered Int RGB value
ColorLayerVORs Int RGB value
ColorLayerILSs Int RGB value
ColorLayerNDBs Int RGB value
ColorLayerIntersectionsEnroute Int RGB value
ColorLayerIntersectionsTerminal Int RGB value
ColorLayerAirspaces Int RGB value
ColorLayerApproach Int RGB value
ColorLayerFlightPlan Int RGB value
ColorLayerVehicles Int RGB value
ColorLayerVehiclesSelected Int RGB value
ColorLayerAirwaysVictor Int RGB value
ColorLayerAirwaysJet Int RGB value
ColorLayerRangeRings Int RGB value
ColorLayerRacePointsGate Int RGB value
ColorLayerRacePointsPylon Int RGB value
ColorLayerRacePointsVolume Int RGB value
TextColorLayerTerrain Int RGB value
TextColorLayerBorders Int RGB value
TextColorLayerGridLines Int RGB value
TextColorLayerAirports Int RGB value
TextColorLayerVORs Int RGB value
TextColorLayerILSs Int RGB value
TextColorLayerNDBs Int RGB value
TextColorLayerIntersections Int RGB value
TextColorLayerAirspaces Int RGB value
TextColorLayerApproach Int RGB value
TextColorLayerFlightPlan Int RGB value
TextColorLayerVehicles Int RGB value
TextColorLayerAirways Int RGB value
TextColorLayerRacePoints Int RGB value
FlightPlanLineWidth Float Width in pixels.
ActiveColorLayerFlightPlan Int RGB value
PastColorLayerFlightPlan Int RGB value
LayerApproachAirport String ICAO of approach airport.
LayerApproachApproach Int Index into list of available approaches.
LayerApproachTransition Int Index into list of available transitions.
LayerApproachLeg Int Index into list of available legs.
LayerApproachLineWidth Int Line width in pixels.
LayerApproachLineColor Int RGB value
LayerApproachLineActiveColor Int RGB value

XML Compass Rose Variables

Heading Float The heading of the compass.
CenterX Float The X position of the center of the compass on the map.
CenterY Float The Y position of the center of the compass on the map.
Radius Float Radius of the compass in pixels.
Color Int RGB value of the compass lines and text.
BackgroundColor Int RGB value. The default, if no color is set, is transparent (so an underlying map will be visible).
LineWidth Float Compass line width in pixels.
Font String The font to use for the compass labels. If no font is specified "Arial" is the default.
FontSize Float Font size for compass labels.
BigFontSize Float See LabelAllTicks.
FullCircle Bool Set to True to ensure compass rose is a full circle. False indicates that an arc will be rendered.
LabelAllTicks Bool Set to True to ensure a label on every tick mark (every 10 degrees). False indicates that labels should be every 30 degrees, and the main four compass points are marked with letters ("N","S","E","W") rendered in the BigFontSize.
Force3Digits Bool Set to True to force three digits per compass label (see the example image below).

Example Map

The view an example map, navigate to the C:\Program Files\Microsoft ESP\1.0\Gauges\radar.cab folder, right click the radarscreen.xml file, and extract it. Refer to the following notes when examining the code:

  • The Script entry of the Update object is simply initialization code. Cut and paste scripts into the Infix tool to convert them to infix notation to make them much easier to understand. The Infix tool is in the Panels and Gauges SDK folder.
  • The use of a small set of macros makes the coding simpler, and provides a single line to change if the radar screen's width or height are to change.
  • The Name parameter of one of the CustomDraw objects is "fs9gps:1:map". The ":1" is unnecessary if the panel in which the map is to appear has only one map. Otherwise use ":1", ":2" and so on to distinguish the different maps.
  • The Name parameter of one of the CustomDraw objects is "fs9gps:rose".
  • The id parameters can be any text that helps identify the object. It is the Name parameter that must match the variable names in the table above.

To view the radar screen in the simulation take the role of a Tower Controller in a multi-player session. The image below shows the radar screen. Note the Radar Settings gauge has communicated to the radar screen, through the use of local variables, that a compass rose should be shown, along with airports, VORs, and terrain. The blue line is a national boundary.