Monday, 7 July 2008

QAM Open Cockpit Day

The Queensland Air Museum has a wide range of planes and really interesting displays.

One weekend a year they have their open cockpit day. It's a chance to clamber aboard an old DC-3 airliner and other aircraft like the Westland Wessex copter, but the best bit is you can get in the cockpits of some of jets and one of the Spitfires. Was my second visit to the museum and my first open cockpit day.

I jumped in one of the Hawker Hunter jets and the Spitfire (the later Vc model). The Hunter's cockpit was absolutely tiny, really wrapping itself around you with toggle switches and gauges absolutely everywhere. I'm sitting with my shoulders hunched up because it just felt so small.

Hunter

The Spitfire by comparision felt roomy with lots of dials, wheels and levers. It was fantastic had the feel of a vintage radio set.

Spitfire Cockpit

But it's got me stuffed how Douglas Bader got in and out of the thing though - difficult enough with two working legs! I had the family in tow so didn't have the chance to get into the Canberra, Meteor or Sea Venom or the other jet fighters that were available.

You couldn't get into my two favourite planes at the museum, the Fairey Gannet and the Sabre. I don't think they have their pits. The Gannet was a very large carrier plane for anti-submarine warfare with big contra-rotating double four-bladed propellers.The bomb bay could carry two torpedoes and the aircraft was used with the HMAS Melbourne. It is a very big, ugly but interesting aircraft, that I'm glad I've had the chance to see. To see just how much work the museum did to restore the plane, check out the pre-restoration picture on this page.

Gannet

The Sabre at the museum isn't gleaming, but it's still cool, sort of like a '57 Chevy but with a big jet engine and guns. [I've since read on the Australian Aviation Artists Site that this particular aircraft crashed twice before being blown up as target practice, so no wonder it's not shiny!]

Sabre

There was also a display by the ADF with a Navy Seahawk on display out the back. I threw my reluctant son into the cockpit of the Seahawk just so I could stay and have a play. We were a little dissappointed to learn from the very helpful Navy aviator that the dangerous looking red trigger on the stick didn't actually unleash a torrent of hot metal death, but was in fact the push to talk switch for the radio. We pushed it several times anyway. I resisted the urge to hum Ride Of The Valkyries.

Seahawk

The Seahawk had a bloody huge glareshield that seemed to obscure a lot of the view out the front and seemed to be very unhelpful if you were planning to land on a pitching deck of a frigate. I was told this was because the cockpit displays were older versions that didn't handle the glare well at all.

There were also three Navy Squirrel copters from 723 Squadron, two of which did a pretty cool aerial display.

The State Government is planning on developing the land the museum is on (bastards!!) and there's no clear future for the museum, I'm hoping that is some time off and we get the opportunity to to it again next year.

Tuesday, 1 July 2008

Building Custom Controls

Considering building some controls for your PC but not ready to spend ten years and $230,000 to build a 747 simulator in the garage? There are some experts out there like Mikes Flight Deck and the guys at MyCockpit.org. There is also a whole lot of people building custom controls and gauges for car racing sims. You can even buy ship and train controls or make your own arcade controller.

You can build very simple devices like pedals using just the gameport interface of your PC. Like these dodgey rudder pedals I made. To use additional switches and inputs you need something more than the gameport.

To interface your controls with your PC you are going to need a controller. The cheapest is to pull apart a keyboard and locate the controller that will have row and columns using a matrix (more on button matrices below).


Keyboard showing controller and button matrix. The black squares connected to the wires are the row and column matrices.


The following diagram demonstrates the functioning of a button matrix. When a button is depressed a circuit closes for a particular row and column combination. To prevent "phantom" key presses where keys you aren't intending to press are pressed diodes (the triangular & line symbol) are used. Keyboards don't use diodes because they are not designed to have multiple keys pressed simultaneously. If you plan to use a keyboard controller for a custom controller it does become a problem.



You'd think having USB and lots of buttons keyboards would be cheap and easy. But keyboard controllers are a major pain, because they appear to your PC as, well, a keyboard. This makes them extremely fiddly because you have to laboriously determine which row/column combination generates which key and then ensure you are wiring your switches to the right row/column combination. Gets even more complicated if you have to simulate two keys like CONTROL + M. Take a look at the top image of the keyboard, tracing keys back to the row/column inputs isn't easy. Alternatively you can randomly connect up the controller to your switches and then remap your keys in your simulation to suit the keypresses your switches end up generating. Remapping within the simulation isn't a good solution because you have to remember this remap as you may have to still use the keyboard if say a switch is in the wrong position and you can't move the switch but you still want to send the command.

One option might be to use Petr Medek's very clever HID Macros utility that allows you to remap the keys on a particular USB keyboard if you have multiple keyboards plugged into your computer. That may save you the hassle of working out the key matrix and just remapping the keys. Keyboards however don't have any axes for rotary or movement inputs like pedals, flaps, rudder, trim or throttle inputs and really aren't designed to have a lot of keys depressed at once.

The biggest problem with a keyboard interface is that they are designed for momentary switches (switches that you press and release) and not toggle switches. If you are using a toggle switch, when you turn the switch "on" the keyboard keeps repeating the keystroke. The only way around that is adding complexity with circuitry to eliminate the continued keypresses or pretty complicated reengineering of the toggle switch. There is some information on keyboard hacking for controllers at the 777 Project.

The next option is to pull apart a controller like a gamepad or joystick. This allows your controls to appear to Windows as a game controller allowing you to assign commands to the inputs. However the number of buttons on something like a gamepad or old joystick may become a limiting factor. You can use free software like SVMapper to only generate one keypress/button press with toggle switches and game controllers. SVMapper is a free utility found on the Sokhoi forums that allows you to map keys to game controller inputs, it can also handle toggle switches including mapping keys to the release of the toggle switch.

The next option is to make a USB controller from plans on the Internet. There are designs like the MJoy16. The original mindaugas.com site for the Mjoy16 is now offline, but the content is available from Webarchive.org. I gave this a go but could never get the thing to work, but was probably my fault. There there are several versions of this board (including versions not on the original website) some that don't work and several versions of the firmware. I've also read it can be fussy about the USB it is plugged into. But I probably cooked a component with my clumsy soldering. You can also buy DIY kits for Flight Simulator with components like the Master Card Kits from OpenCockpits or the FSBus project and Pic Home Cockpit Controller. Or you could completely custom build a PIC or AVR solution.

If you don't want to build, you can buy a USB controller and there is a LOT to choose from. Choosing the boards basically comes down to how much you want to spend, what you need to do (in terms of number of switches and axes you need) and whether you want to integrate gauges and light.

For a basic button and analogue inputs (for dials, pedals, throttles etc) Leo Bodnar has a couple of very inexpensive and feature rich boards including boards that support load cells. Load cells are force sensitive devices that allow you to push down on a pedal and have that force translate into throttle or braking without the pedal having to move. Load cells are popular with people building car racing controls. Leo also has a new board that allows direct cabling into the board and does not require any diodes:




I have one of his earlier boards that use a matrix:



There are others like the EPIC and Hagstrom boards, but these are more expensive than Leo's board and aren't as feature rich or easy to implement as the slightly more expensive Beta Innovations boards. Beta Innovations provides software called Falcon 4 Interface Manager that supports the Falcon 4 Shared Memory allowing lights and gauges to be driven. It is the easiest and best interface solution for Falcon 4. Beta Innovations has similar software called RSim for car racing sims including Rfactor, LFS and GTR allowing you to have speedometers and tachometers. Recently the Beta Innovations Plasma MM2 is price competitive with the Leo Bodnar board with a similar feature set.

If money is no object you can buy complete setups from places including:

FlightDeck Solutions
Fly Engravity
Cockpit Sonic
Hisapanels

Labels: