Showing posts with label apache MPD FLT page. Show all posts
Showing posts with label apache MPD FLT page. Show all posts

Sunday, 27 February 2011

FLT page complete

Adding SWITCH/CASE statements to the input handler function of the FLT page finishes off our fully working instrument. At least until testing.

Pressing [SET] toggles the settings mode which replaces some buttons with additional information and adds two arrow keys for adjusting the pitch of the ladder. Pitch can be adjust +-10 degrees. To indicate this 'bias' the waterline takes on a filled "W" appearance and the "-W-" button (when visible) is boxed.

SET sub-mode, adjusting waterline bias
Also a -5 degree bias can be toggled one/off by hitting the "-W-" key.

Some autopilots in Microsoft Flight Simulator allow you to set a HI and LO altitude warning bug. I'm not clear how this is done but for sake of simplicity of control I set the buttons to cycle through some common values that will be prominent in the games mission generator (Cruise height, NOE height etc.).

The "PRES>" button displays current atmospheric pressure at sea level in "inches of mercury". Combat-Helo implements US Standard Atmosphere Model 1976 (wiki) for calculating temperature, pressure and air density for any given altitude.

*edit* Added some slash '/' commands in the in-game chat console to set these bugs. /hibug <feet> and /lobug <feet>


This represents about as much detail as required for this page, completing visual and logical implementation.

-W- waterline bias toggle (on)
Other changes to the logic, calibrated radar altitude to zero when on the ground. Banking no longer results in radar altimeter changes. Bank indicator turns white when helicopter at > 20 degrees of bank.

Bank angle warning > 20 degrees

Here's a video...


*edit* I've since increased the thickness of the pitch ladder to make it much easier to see sitting back.


Post mortem

What seemed like a simple array of standard instruments turned out to be more complex at second glance. Looking at some of the more advanced add-ons for Microsoft Flight Simulator and YouTube videos helped get an idea of how these things should look like in motion.

A week ago we started with a simple screen-shot from a trainer and built a decent replica for our purposes, one component at a time. Much of the logic on the page is in each of these components, very little data exchange is needed. The biggest change I think was adding the atmospheric data to the aircraft Computer class (part of the Avionics sub-class).

Having a small avionics test map allowed for compilation/test/edit in a very small amount of time, typically 10 to 15 seconds build time.

For simply playing the game much of this was not necessary, nor should it be. A player will be able to invest time investigating all these features, or not, their choice.

What comes next?

Well we have some problems with the ENG page since the powerplant simulation evolved into a half-baked set of turbine equations I stole from "Physics for Game Programmers" (published by Apress). Fred might have something better in mind.

The TSD is also a work in progress and important to helicopter operation. Already in game, currently functions as a map but still missing elements. Even worse I don't have a clear specification on what to implement except it can't be too complex. What I DONT want is to have Falcon 4.0 deja-vu, sitting in the cockpit needing a manual just to find where I'm supposed to be going next.

On the subject of the TSD, TSD means Tactical situation Display. you see this in many games, the most conceited one I can think of is the radar in Red Dead Redemption, a top down magic view showing you where to go, where the bad guys are and where points of interest are. It's as simple as that.

My data is scrappy but existing games and simulations do point the way. I have this image from a Discovery Channel video still...


And this from some training software vendor website which is kind of interesting as it's a virtual environment and procedural trainer all in one. Something they didn't often do. I was looking at building such a trainer for crisis training in the Oil and Pipeline industry two years back but I digress.

From some online brochure on training materials.
And it's in GIF format too.

This concludes the FLT page build blog series. Gives you some idea as to the amount of work that goes into making these things from scratch. If I ever have to do it again, I promise I will add more jokes.