Fred Banting On Gauge Design

A Mini-Tutorial

This is a typical example of an oil pressure gauge for a twin engine aircraft. It consists of 4 bitmaps or "elements" which are layered according to visual priority. The green areas are actually black but are shown green here for clarity. These areas become transparent in the final gauge so that underlying parts are visible. Each element can be programmed for one of several different lighting effects.
The bottom or background layer has a small "+" in the centre which represents the location of the "pin" on which the needles will rotate. In our example this element is not lighted, effectively becoming part of the main panel image.
The next element is the gauge face and this is programmed to light according to the state of the panel light switch.
Next is the needle for the left engine. The rotation point on the needle is placed over the "pin" on the background layer and the element is programmed to rotate around this point. The gauge code reads the pressure value for engine 1 by accessing a "variable" supplied by the simulator and rotates the needle accordingly.
Finally comes the right engine needle which is done exactly the same way except that it uses the variable for engine 2. Lighting for both needles also follows the panel light switch.

This list shows the different types of elements that can be used in gauges:

STATIC- A non-animated element like a background image which never changes. The background and face of the RPM gauge are STATIC.

ICON- An static element that can be switched on and off. A switch gauge might use two or more Icons, one for each position, controlled by mouse clicks.

NEEDLE- Rotates around a point, as in the RPM example.

SLIDER- Moves horizontally and/or vertically, handy for throttles.

MOVING- Similar to a SLIDER but it is placed behind a MASK containing a window so that only part of it shows through the window. (The window part of the mask is not the normal transparent black 0,0,0 but uses 1,1,1 as it's window colour). The compass works by moving it's scale bitmap back and forth behind a mask.

SPRITE- The SPRITE also works behind a mask but unlike the MOVING element it can also rotate. The common use for Sprites is in attitude indicators.

STRING- Displays text for digital gauges.

Andrew's note - I bet you never imagined there was so much to it!


[ Back | Main Menu | Logout | Help ]

Copyright © 2002 by FlightSim.Com. All Rights Reserved.