Posted by: davenunez | July 2, 2009

Ilda arrives soon

Ilda arrives on July 8 – I have marked the date on my office calendar.

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | June 29, 2009

Homebrew FSX MCP

Confession: This project is the geekiest, nerdiest thing I have done yet. More so than spending a year writing code to support an indie tool to a major anorak piece of software. This one reeeeally takes the cake. It is almost of benheckian proportions. I built the actual hardware almost two years ago, but only this last weekend did I get round to tweaking the software bits to get it to work right.

What it is is building custom hardware for Flightsim. Yes, hardware. In this case a knock off of the Boeing Mode Control Panel, which is used to control the autopilot and autothrottle. During a regular scheduled flight, about 80% of the flying is done by tweaking on this panel, so it is a nice bit of hardware to have.

You can buy these things for flightsim, but they are not cheap. Until recently, the best model to go for was the one by Opencockpits, but it goes for 335 Euros – ouch. Recently I saw a review for a new MCP Combo by VR Insight, which looks just awesome – it is an MCP and a bunch of other functions too (see review at AVSIM here), but again, $375.

So I started thinking – how can you get a bunch of dials and buttons to talk to a PC which is compatible with FSX in a simple way? I knew how to make pushbuttons talk to a PC as if they were programmable key via Ultimarc’s IPac board (which is very reasonably priced at $39), because I used that for the joystick and buttons on my homebrew arcade cabinet. But what about the rotaries?

The IPac, by the way, is dead easy to use. It has rows of connectors (one earth, and then one for each of the 32 buttons it supports), and an USB plug. It takes power from USB, so no batteries or power supply needed. When you plug it into your PC, Windows (or even Mac and Linux!) sees it as a regular old PC keyboard – no special drivers or anything needed. But, if that was not enough, you can program it so that each of the 32 lines produces just the keypress you need. It is a really awesome little device, and perfect for this sort of project, because you can just map a particular key in FSX, and then program the IPac to generate that keypress when you press your button.

A little research showed that you can get a magical part called a rotary encoder. This gizmo turns turns in both directions (like a potentiometer), but clicks as it turns – and each click is a single button press. So you can encode button presses for clockwise and anticlockwise turns as you need. So that’s what I needed. Mouser sells the encoders at $4 each, and Jameco has the push buttons and switches (I used the kind that return to center after toggling them) for $1.50. So that would be pretty cheap. The next problem was the enclosure – a nice box to put it in. You can get lots of plastic enclosures, but they start at about $20 (and I am too cheap for that). A little more web research showed that some companies will send you a single free sample. So I dug up OKW Enclosures, and asked for a “sample” box, which is nit very exciting (sort of off-white and very square), but it does the job great.

Once I got all the parts, the next step was some planning. I drew up a rough sketch of what functions I wanted, and how to lay them out. I also had to be sure not to use up more than 32 button slots on the IPac (that’s all you get on my model). Each rotary eats two, so I scrounged a bit, and ended up needing only 29.

Then came time to lay out the buttons on the enclosure face, and make sure everything fit physically. It is vital to not screw up here, otherwise you will mess up the enclosure. Luckily I had enough space on the faceplate for all I needed, but it was a pretty tight squeeze. In the end it looks good because there is not a lot of empty space, but there is still enough room to fiddle with all the controls.

Here you can see the pushbuttons (square and black), a toggle switch (that’s the flight director toggle between the two columns of buttons), and a rotary encoder (next to the open hole). Notice I soldered a good long length of cable (single core, pretty stiff so I could bend it into shape) to each control as needed before I put them on the face – I did this to avoid burning the face plate if I slipped by accident.

The cabling is pretty simple, even if there is a lot of it:

  • Pushbuttons: Each has two cables – one goes to earth, then other to the IPac’s input for that function (important – these must be the ‘push to make’ buttons which do not stay engaged, like a normal key)
  • Rotary encoders: Each has a two earths (you can wire them together), and then one line for clockwise and one for anticlockwise. Each one of those goes into an IPac function input .
  • Toggle switches: Like the rotaries – two earths, and one line for upwards push and one for downwards push. I used the type that springs back to center, because having the type that stays up would have led to a continuous signal to the IPac, effectively the same as keeping your finger down on the key.

The trick is to go slowly so that you don’t confuse yourself, because there are a lot of wires. And have a multimeter nearby to figure out what cable connects to what!

To know if the thing was plugged in, I added a green LED to the +5v line on the IPac – to do this you also need to add a 100 ohm resistor on that line. After that, I could plug it into my PC and test it – after fixing some loose soldering, it was ready. It was at this point that I got busy on my PhD and work, and the whole project languished for almost two years. When I was packing up for the big move, I decided to put the project into my air shipment, in case I got the chance to work on it during the first few months. And this weekend was that chance. This is what is looks like now (including amazing 1970’s style lettering on the controls!):

I used two shelving brackets to hold it up, and the plywood base is from an old curtain rail. Notice I used butterfly nuts to attach the enclosure to the bracket, as this lets me angle the box as I need (you need to tighten it quite a lot, because the toggle switches and buttons are pretty stiff). Here is a picture with my sexy hand to show you the scale:

The hard part of the project was actually getting FSX to recognize the control, which surprised me. To program the IPac itself is no problem under Vista – just be sure you run the app as administrator (Grrr…). You then upload to the device, and then you can test it by just opening Notepad and pushing the buttons to see you get the right keypresses out.

Now I expected that I would just start up FSX, open the key mapping control and just enter the keypresses into the autopilot functions. And you can do that for some of the functions, but not all for some unexplained reason. For example, increasing and decreasing the altitude readout on the autopilot is not on the key mapping control. So what to do now…

Fortunately, you can access all they keyboard events through hacking the correct XML file. The one in question is called Standard.XML, and you can find it (in Vista anyway, look for it in a similar place in XP) in C:\Users\<your login name>\AppData\Roaming\Microsoft\FSX\Controls\Standard.XML. If you crack open that file, you will see FSX events (as you find in gauges) mapped to keys in XML blocks that look like this:

<Entry>

<Key>Num_6</Key>

<Down>AILERONS_RIGHT</Down>

</Entry>

So you just need to add the events you need to this. One caveat – this file controls the keys which are set before they apply they keys you set in the interface in the game. So if you have used the Q key in your standard.xml, but the have set the Q key to control something else using the key mapping interface in FSX, then the function you set in the game will take preference. So be sure you have removed any duplicates in the interface, or your buttons will mysteriously not work (ooh, some frustrating moments discovering that…).

And there you go! The whole thing cost me significantly less that $100 (probably around $70 or so), a fair bit of work, but it is very satisfying to use.

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | June 22, 2009

Download AircraftTweak here

I realized the other day that with AVSIM being down, there has been no place to download AircraftTweak. So here it is: get v1.1 from my SkyDrive

If you don’t know what this app is, it is a way to install repaints (either manually or automatically in an installer etc.), and apply patches in general to your FSX aircraft. More information on AircraftTweak here.

In other news, I tried the Dry Soda Company’s new Cucumber soda today. Tastes like fizzy cucumber – actually pretty good!

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | June 21, 2009

Good podcasts for the weekend

Lately I have hit a very regular weekend rhythm – Saturday go and look at some neighborhoods where we might buy a house, Sundays go to Chinatown and Pioneer Square for a two hour walk (and pick up some Asian groceries from Uwajimaya, which gives me 2 hours of free parking).

For that Sunday walk, I always take the latest episode of two podcasts along on my Zune – Travel with Rick Steves, and The Splendid Table – new episodes are released each week. These are public radio shows which are also released as free podcasts, and are always interesting and entertaining. Each week they have a new guest who is a specialist on some subject, and good caller comments. Highly recommended if you enjoy either travelling or eating.

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | June 14, 2009

Modified SyntaxBox component

Syntaxbox is a very nice text editing component written by Roger Alsing in C# which features all the trimmings of the Visual Studio code editor – definable syntax highlighting, intellisense (which they call AutoList), and a host of other nice features. I have been using it as part of a new FSX tool project, and needed to make a change.

The AutoList closes automatically on a number of keyboard events (such as pressing tab). One of those events was pressing space – which means that you cannot have a phrase in the Autolist to search for which includes a space (which I needed). So I made a small change that allows this. I added a new property to the EditViewControl class, bool AutoListAutoCompleteOnSpace. If this is set to true, the old behaviour continues (pressing space closes the AutoList). Setting it to false lets you have spaces in your AutoList contents. The default setting is true, so as to not break anyone’s code.

You can download the modified component on my Skydrive.

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | June 9, 2009

Koko is living the good life

Got Koko’s medical records to claim the insurance yesterday. The vet describes her as:

Eats a good diet- Timothy hay, veggies and 2 tbsp pellets per day.  Large cage and housed with boyfriend.

Isn’t that the life everybody wants? :-)

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | June 8, 2009

Google competition Fail

So Microsoft has rolled out its new search engine, Bing.com, to compete with Google. How does Google respond? By very helpfully pointing you to its competitor:

There is a lot of smoke about how Bing fares compared to Google, so one helpful person has set up an experiment – the Blind Search Taste Test. You enter a query, and it returns you results from Yahoo!, Google and Bing which have been made blind. Then you choose which of the three result sets you prefer. More on the taste test here.

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | May 26, 2009

I finally saw the B-17!

I was lamenting earlier how I missed the restored B-17 flying over Seattle. Well, this Monday it was once again flying as part of memorial day – and I finally saw it! I managed to get this sasquatch like picture of it. I assume it was heading towards Boeing Field to land, because it was headed that way, and I didn’t see it fly for the rest of the day.

If you know what a B-17 looks like you will agree that it was indeed a flying fortress. For normal people, you can compare it against this plan and see if you agree:

Courtesy of Wikipedia

Courtesy of Wikipedia

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | May 24, 2009

Dates are all set

Ilda set her dates for the next trip over.

Kimono bunny is welcoming Ilda

Kimono bunny is welcoming Ilda

Hurry over Ilda! :-)

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Posted by: davenunez | May 23, 2009

Vintage Seattle Blog

Being on the West coast, Seattle is not an old city.Within a 30 minute walk you can see some of the oldest buildings (on the South end of downtown) to some of the newest (such as the Columbia tower). These ‘time travel walks’ are one of the features of the city I really enjoy.

Courtesy of Vintage Seattle blog

I discovered the great Vintage Seattle blog, where people send in old photos of the city. It is quite interesting to see how different and sometimes how similar places you know really well used to look in the past.

add to del.icio.us : Add to Blinkslist : add to furl : Digg it : add to ma.gnolia : Stumble It! : seed the vine : : : post to facebook

Older Posts »

Categories