Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Overview

Microsoft ESP 1.0

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

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.


Variable
Units
Description
PriorityBoolSet to True to draw the map as a priority.
ZoomFloatRange of 80 to 500000 pixels per meter. Default is 5 x 1852 (1852 is meters per nautical mile).
PanVerticalFloatDistance to pan vertically in pixels. Negative will pan up.
PanHorizontalFloatDistance to pan right in pixels. Negative will pan left.
PanResetBoolSet to True to return to the original position prior to any panning.
MapLoadingBoolSet to True if the map is currently being loaded.
LatitudeFloatThe latitude that is to be the center point of the map (usually the user aircraft, though could for example be an airport tower).
LongitudeFloatThe longitude of the center point of the map.
HeadingFloatThe heading (usually of the user aircraft).
TrackUpBoolSet to True if the map should be drawn with the track of the aircraft facing up. False gives North facing up.
CenterXFloatThe 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.
CenterYFloatThe Y position of the aircraft on the map, in pixels.
UpdateAlwaysBoolSet 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.
SelectedVehicleIntThe ID of the selected vehicle. Refer to the ITrafficInfo custom variables described in the Creating XML Gauges document for more details.
TagPositionIntOne of:
0 = UPPERRIGHT
1 = RIGHT
2 = LOWER_RIGHT
3 = BOTTOM
4 = LOWER_LEFT
5 = LEFT
6 = UPPER_LEFT
7 = TOP
BackgroundColorIntRGB value
IceColorIntRGB value
WaterColorIntRGB value
Elevation0ColorIntRGB value
Elevation1000ColorIntRGB value
Elevation2000ColorIntRGB value
Elevation3000ColorIntRGB value
Elevation4000ColorIntRGB value
Elevation5000ColorIntRGB value
Elevation6000ColorIntRGB value
Elevation7000ColorIntRGB value
Elevation8000ColorIntRGB value
Elevation9000ColorIntRGB value
Elevation10000ColorIntRGB value
Elevation11000ColorIntRGB value
Elevation12000ColorIntRGB value
Elevation13000ColorIntRGB value
Elevation14000ColorIntRGB value
Elevation15000ColorIntRGB value
Elevation16000ColorIntRGB value
Elevation17000ColorIntRGB value
TerrainShadowBoolSet to True if terrain shadows are to be rendered
LayerTerrainBoolSet to True if this layer is to be rendered
LayerBordersBoolSet to True if this layer is to be rendered
LayerGridLinesBoolSet to True if this layer is to be rendered
LayerAirportsBoolSet to True if this layer is to be rendered
LayerVORsBoolSet to True if this layer is to be rendered
LayerILSsBoolSet to True if this layer is to be rendered
LayerNDBsBoolSet to True if this layer is to be rendered
LayerIntersectionsBoolSet to True if this layer is to be rendered
LayerAirspacesBoolSet to True if this layer is to be rendered
LayerApproachBoolSet to True if this layer is to be rendered
LayerFlightPlanBoolSet to True if this layer is to be rendered
LayerVehiclesBoolSet to True if this layer is to be rendered
LayerAirwaysBoolSet to True if this layer is to be rendered
LayerRangeRingsBoolSet to True if this layer is to be rendered
LayerRacePointsBoolSet to True if this layer is to be rendered
DetailLayerTerrainInt-1 = Default
0 = Draw nothing
1 = Water only
3 = In color
DetailLayerBordersInt-1 = Default
0 = Draw nothing
1 = Geopol boundary
DetailLayerGridLinesInt-1 = Default
0 = Draw nothing
DetailLayerAirportsInt-1 = Default
0 = Draw nothing
1 = Dot
2 = Circle
3 = Circle runways
4 = Block runways
5 = Runways
DetailLayerVORsInt-1 = Default
0 = Draw nothing
1 = Dot
2 = Symbol
DetailLayerILSsInt-1 = Default
0 = Draw nothing
1 = ILS
DetailLayerNDBsInt-1 = Default
0 = Draw nothing
DetailLayerIntersectionsInt-1 = Default
0 = Draw nothing
1 = Waypoint dot
2 = Waypoint symbol
DetailLayerAirspacesInt-1 = Default
0 = Draw nothing
DetailLayerApproachInt-1 = Default
0 = Draw nothing
1 = Approach
2 = Missed
3 = Arrow Head
DetailLayerFlightPlanInt-1 = Default
0 = Draw nothing
1 = Solid line
2 = Dashed line
DetailLayerVehiclesInt-1 = Default
0 = Draw nothing
1 = ATC symbol
2 = TCAS symbol
3 = Realistic symbol
DetailLayerAirwaysInt-1 = Default
0 = Draw nothing
1 = Thin lines
2 = Thick lines
DetailLayerRangeRingsInt-1 = Default
0 = Draw nothing
DetailLayerRacePointsInt-1 = Default
0 = Draw nothing
TextDetailLayerTerrainInt-1 = Default
0 = Draw nothing
TextDetailLayerBordersInt-1 = Default
0 = Draw nothing
TextDetailLayerGridLinesInt-1 = Default
0 = Draw nothing
TextDetailLayerAirportsInt-1 = Default
0 = Draw nothing
1 = ICAO
2 = Name
3 = Name and elevation
4 = Name, elevation and frequencies
5 = Runways
TextDetailLayerVORsInt-1 = Default
0 = Draw nothing
1 = ID
2 = ID frequency
3 = ID Morse
TextDetailLayerILSsInt-1 = Default
0 = Draw nothing
1 = ID
2 = ID frequency
3 = ID Morse
TextDetailLayerNDBsInt-1 = Default
0 = Draw nothing
1 = ID
2 = ID frequency
3 = ID Morse
TextDetailLayerIntersectionsInt-1 = Default
0 = Draw nothing
1 = Waypoint ID
TextDetailLayerAirspacesInt-1 = Default
0 = Draw nothing
TextDetailLayerApproachInt-1 = Default
0 = Draw nothing
TextDetailLayerFlightPlanInt-1 = Default
0 = Draw nothing
TextDetailLayerVehiclesInt-1 = Default
0 = Draw nothing
1 = Realistic
2 = Detailed
TextDetailLayerAirwaysInt-1 = Default
0 = Draw nothing
TextDetailLayerRangeRingsInt-1 = Default
0 = Draw nothing
TextDetailLayerRacePointsInt-1 = Default
0 = Draw nothing
ObjectDetailLayerTerrainInt-1 = Default
0 = Draw nothing
ObjectDetailLayerBordersInt-1 = Default
0 = Draw nothing
0x1 = Coastline
0x2 = Boundary
ObjectDetailLayerGridLinesInt-1 = Default
0 = Draw nothing
ObjectDetailLayerAirportsInt-1 = Default
0 = Draw nothing
0x1 = Towered
0x2 = Not towered
0x4 = Hard
0x8 = Soft
0x10 = Water
0x20 = Heli
0x40 = Private
ObjectDetailLayerVORsInt-1 = Default
0 = Draw nothing
0x1 = VOR
0x2 = VOT
ObjectDetailLayerILSsInt-1 = Default
0 = Draw nothing
0x1 = Cone
0x2 = Line
ObjectDetailLayerNDBsInt-1 = Default
0 = Draw nothing
ObjectDetailLayerIntersectionsInt-1 = Default
0 = Draw nothing
ObjectDetailLayerAirspacesInt-1 = Default
0 = Draw nothing
ObjectDetailLayerApproachInt-1 = Default
0 = Draw nothing
ObjectDetailLayerFlightPlanInt-1 = Default
0 = Draw nothing
0x1 = Enroute
0x2 = Approach
0x4 = Missed approach
0x8 = Waypoints
ObjectDetailLayerVehiclesInt-1 = Default
0 = Draw nothing
0x1 = Track line
0x2 = Ground vehicles
0x4 = Airborne vehicles
0x8 = Racing vehicles
ObjectDetailLayerAirwaysInt-1 = Default
0 = Draw nothing
0x1 = Victor
0x2 = Jet
ObjectDetailLayerRangeRingsInt-1 = Default
0 = Draw nothing
ObjectDetailLayerRacePointsInt-1 = Default
0 = Draw nothing
ColorLayerTerrainIntRGB value
ColorLayerBordersIntRGB value
ColorLayerGridLinesIntRGB value
ColorLayerAirportsToweredIntRGB value
ColorLayerAirportsUntoweredIntRGB value
ColorLayerVORsIntRGB value
ColorLayerILSsIntRGB value
ColorLayerNDBsIntRGB value
ColorLayerIntersectionsEnrouteIntRGB value
ColorLayerIntersectionsTerminalIntRGB value
ColorLayerAirspacesIntRGB value
ColorLayerApproachIntRGB value
ColorLayerFlightPlanIntRGB value
ColorLayerVehiclesIntRGB value
ColorLayerVehiclesSelectedIntRGB value
ColorLayerAirwaysVictorIntRGB value
ColorLayerAirwaysJetIntRGB value
ColorLayerRangeRingsIntRGB value
ColorLayerRacePointsGateIntRGB value
ColorLayerRacePointsPylonIntRGB value
ColorLayerRacePointsVolumeIntRGB value
TextColorLayerTerrainIntRGB value
TextColorLayerBordersIntRGB value
TextColorLayerGridLinesIntRGB value
TextColorLayerAirportsIntRGB value
TextColorLayerVORsIntRGB value
TextColorLayerILSsIntRGB value
TextColorLayerNDBsIntRGB value
TextColorLayerIntersectionsIntRGB value
TextColorLayerAirspacesIntRGB value
TextColorLayerApproachIntRGB value
TextColorLayerFlightPlanIntRGB value
TextColorLayerVehiclesIntRGB value
TextColorLayerAirwaysIntRGB value
TextColorLayerRacePointsIntRGB value
FlightPlanLineWidthFloatWidth in pixels.
ActiveColorLayerFlightPlanIntRGB value
PastColorLayerFlightPlanIntRGB value
LayerApproachAirportStringICAO of approach airport.
LayerApproachApproachIntIndex into list of available approaches.
LayerApproachTransitionIntIndex into list of available transitions.
LayerApproachLegIntIndex into list of available legs.
LayerApproachLineWidthIntLine width in pixels.
LayerApproachLineColorIntRGB value
LayerApproachLineActiveColorIntRGB value

XML Compass Rose Variables

Variable
Units
Description
Heading FloatThe heading of the compass.
CenterX FloatThe X position of the center of the compass on the map.
CenterY FloatThe Y position of the center of the compass on the map.
Radius FloatRadius of the compass in pixels.
Color IntRGB value of the compass lines and text.
BackgroundColor IntRGB value. The default, if no color is set, is transparent (so an underlying map will be visible).
LineWidth FloatCompass line width in pixels.
Font StringThe font to use for the compass labels. If no font is specified "Arial" is the default.
FontSize FloatFont size for compass labels.
BigFontSize FloatSee LabelAllTicks.
FullCircle BoolSet to True to ensure compass rose is a full circle. False indicates that an arc will be rendered.
LabelAllTicks BoolSet 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 BoolSet 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.


Show:
© 2015 Microsoft