Sunday 20 February 2011

FLT page - a study in design pt1

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.

5 comments:

  1. Flexman are using psychological terrorism, can not wait for the simulator :(
    Btw your impression of tdu2? Imho this delicious game, one of the best races in recent years on pc.

    ReplyDelete
  2. TDU2 has some very weird moments, awful awful characters. But I really like the cruising around. It carries a feeling of possibility.

    I'm driving the PS3 version, just got to Hawaii to see if it's like how I remember from the first TFU, and I'm glad to say it is. Some changes but I remember the roads still.

    It has some problems, could have used a bit more feedback on the early discoveries. Oddities with vanishing cars. But a lot of really nice touches plus I'm a fan of the on/offline concept.

    One I'll still be playing in weeks to come, which doesn't happen with many games. Gran Turismo 5 only got a few hours from me, I hate the loading and waiting. Maybe you need an expensive steering wheel set-up to really enjoy them.

    ReplyDelete
  3. I do not know how the ps3 version, the latest PC patch already improved a lot, and still improving.
    Incredible sound engines, a good driving physics, And a lot of free driving.
    Such games did not do in these times, contrary to appearances, CH and TDU2 in terms of complexity and size of project have much in common with each other;)- Are unique.
    Only SHIFT 2 can be better this year, and certainly will be.
    Thank you for two very interesting entries on the design of MFD,how you write, it seems very simple;)

    ReplyDelete
  4. I like to think it's simple. The complicated bit is to come.

    I could spend the day writing up each code changes, I'm not sure what that would accomplish. Thinking about how best to approach the final parts.

    I saw a trailer for SHIFT 2, my long lasting impression was if anyone gives the equiv of the Oscar for game audio, this deserves it. The audio grabbed and held me. Stunning.

    ReplyDelete
  5. That's true , only 2 words- CAR PORN ;)
    http://www.youtube.com/watch?v=atqsgQ2sTrk&feature=feedu
    Btw as I understand it, part of the graphics games you have already complete, and it was just polishing detail, whether it is still much to be done when it comes to textures objects?

    ReplyDelete