Updated element list with new info 20,02,2011
With thanks to the accuracy police :)
The good folks of the Leadwerks community are hard at work on their "game in a month" projects, I'm really pleased to see so many nice ideas and follow their progress. In the spirit of describing the workflow or design process (and needing to tie up some loose ends) I am documenting the construction of a single avionics page for Combat-Helo, from start to finish.
To outline, our helicopter has numerous digital displays called MPDs (multi-page displays) these show large quantities of information to the pilots in a concise piloty way (I know it's not a real word but if Tony Blair can make up purile words then so can I). It's a good example of an inherited class, a base class for initialising and drawing. And we have the extended class specific to the Apache. The Apache helicopter has five MPDs, it's no surprise we have five instances of the class.
Each MPD has a page and sub-page mode used to tell it what information to present and process. Just like any game menu, it has a render function that contains a SELECT CASE construct to render any given page. You select which page to display by pressing buttons typically arranged around the edges.
Apologies if this is obvious to you the reader, I had to explain this to someone and realised that not everyone speaks like a geek.
We already have a lot of basic functions in our MPD class for drawing commonly used symbols, vector font, buttons, toggles, events. So all we need to do to add a new page is source our content, replicate it in an overloaded ExtendedDraw() function and add some logic behind it in ProcessEvent()
Wha? Lost already? Suffice to say that each instrument has a draw function, and all inputs such as mouse clicks and network messages directed at that instrument go through an overloaded method which calls the appropriate logic for the current page. For now, lets get down to the content, we're going to build the FLT or Flight page from scratch starting tonight.
FLT - Flight Page
So what does one look like? You can scour Google Images for Apache cockpit (curiously you see a lot of combat-helo images cropping up which doesn't help me at all). Or Aircraft MFDs. Boeing were gracious to send me many years ago a large wall-sized poster of a cockpit but it's a little out of date now. And mono.
From several photos (there's actually some nice YouTube clips too) I will use this one as source for this article, it's from a desktop simulator used for procedural training. As such it's possibly not 100% accurate but we'll run with it.
Picture please....
|
Here's one someone else made earlier |
It's quite nice. Shows some colour and importantly (which is why I chose it) a video underlay so you can see what elements of the symbology are masked. The black areas make important data stand out from any video image.
Another thing that stands out is half-intensity masking. I don't have this facility in Combat-Helo since I wasn't aware of it. We'll leave it as something you can adjust with the brightness knob on the display bezel, this is how all pages work by default, the knob controls the alpha of the symbology. Masking is done at the shader level where the video underlay is mixed.
Examining this image we can gather some data. Start by listing what we see.
Elements
1. Pitch ladder
2. Heading tape
3. Radar altimeter
4. Rate of climb
5. Altitude digital
6. Combined Torque %
7. Slip indicator
8. Turn rate indicator
9. Stabilator position
10. Waypoint Data
11. Virtual Waypoint and Flight Path Indicator
12. FLT Page Buttons
Updated
Utility Page Options
· Switches to same UTIL page used by ENG (engine) mode.
Sub modes
· SET (settings) adjusts barometric pressure, hi/log bug, G metre.
OK, so far so good. Our images don't tell us about the UTIL page but this swaps to the same UTIL pages as used by the ENG mode. A sub-mode is presented pressing SET (for settings), the same page logic will be used so no special code is required beyond some conditional code that adds the buttons around the page.
Next we go through each element we listed and describe it's behaviour for this page.
Updated
Element Breakdown
1. Pitch Ladder
Bi-colour, sky is cyan, ground is red/brown.
Provides pitch and roll indication.
Stepped by angle. Digital pitch numerics are masked.
Different from HMD, no head tracking offset.
Waterline “W” provides mid-point reference, can be biased or non-biased.
Biased has it shows a minus 5 degree, on the horizon when on the ground, unbiased will show positive 5 degrees when on the ground. (query: is this bias sent to the HMD system?)
Waterline bias toggled via button #19, SET sub-mode allows manual bias setting.
2. Heading tape
Same as HMD tape. +- 90 degrees off nose.
3 digit masked heading at centre.
3. Radar altimeter
As HMD. Tick marks in 10ft increments to 50ft on right, then 50 to 150ft on right.
4. Rate of climb or VSI
As HMD. Right Triangle indicating climb or descent. Upper scale = 1000 fpm, small tics represent 100 fpm up to 500 fpm.
Digital display of radar altitude. Align right. Blanks at 1428 ft,
5. Altitude barometric
Barometric altitude readout shown above the VSI scale.
6. Combined Torque %
Engine 1 and 2 combined torque percentage. Flashes on 12% differential. (ABS(ABS(TQ1)-ABS(TQ2))>12)
7. Slip indicator
Slip-ball indicator range is +- 0.15G??? Or 0.5G? Need confirmation.
8. Turn rate indicator
Analogue display of degrees per second of yaw. Scale is +- 5 degrees.
9. Stabilator position
Indicates literal angle of tail stabilator. I’ve seen this in different colours.
Not displayed when position is automatic.
White, manual control selected.
Yellow, auto mode has failed and must be controlled manually.
Red, airspeed too high for current position.
Question mark indicates unknown angle.
10. Waypoint Data
As per TSD and MAP page. Same object, selected waypoint, go-to time, distance and ground speed (IGS).
11. Virtual Waypoint and Flight Path Indicator
This works differently to the HMD implementation. Same object but non-virtual. Positioning the flight path indicator over this symbol will result in the aircraft flying to this point.
Flight Path Indicator, as HMD but non-virtual (use commented out calculation in source).
Elements clipped to main display region (glScissor).
12. FLT Page Buttons
ENG (engine), FUEL, PERF (performance), UTIL (options), ACQ (acquisition mode) are used elsewhere as direct page callups. M (menu) key is uniform.
Two buttons remain unresolved, “W” (presumably Waterline) and “SET”. W possible toggles an offset to the pitch ladder waterline. I’ve seen this on Boeing simulations but sometimes manufactures of these black boxes do some screwy things just to mess with the pilots heads I'm sure. As in archery, consistency is the aim, and sometimes you shoot yourself in the leg (I won't show that photo).
UTIL sub-mode and SET
Unknown what sub mode is available in the flight page at this time. I would guess some means to adjust the Waterline offset. Also possible, barometric adjustment and units of measurement.
Since I won’t add these unless we do an advanced pro-simulator I will leave them for now.
That's the end of the first stage. The second stage is usually I get some sleep and remember something I left out, and/or waking up to an emails from angry AH crewmen correcting my wild assumptions, and my editing the blog with thanks to their due diligence in being the accuracy police.
What's next?
On the whole, it shouldn't take too long. Some elements were already constructed and used in the head up display class. The hardest part will be constructing a new pitch ladder and possibly a glyph for the stabiliator (that's the funny white squiggle in the image above, it represents the tail wing position as seen from the side).
Tomorrow I'll review all the elements and make room in the MPD class to take a new page and process its events. Some delay may occur, first it's Sunday and I'm encouraged not to work on Sundays, second my wife has a nasty cold/flu and requires a bit of TLC.