Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, I nearly killed myself with a line of bad code. I made a silly change to a flight simulator's "unusual attitude" logic. Unusual attitude training consists of putting the aircraft in a very difficult orientation (45 deg nose down, 60 deg left bank, etc.) and training pilots to recover.

Here's what the simulators look like: http://blafsen.net/photos/simulator.jpg

I changed the code, and brought the simulator up on motion to test it... and the machine started bucking like a horse and tossing me around the cabin. I had the instructor console right in front of me, and for a while it was physically impossible to hit the freeze button - I was being tossed around too badly.

That day I learned a lesson about testing: first check it with motion OFF.



It's still incredible that you controlled those massive machines. I would love to hear more about that.


(blush) thanks. We use these simulators for training - it's cheaper/safer than the real aircraft.

- The pilots and instructor inside the cabin manipulate controls/switches/CBs/panels, sending signals to an bunch of interface cards.

- The interface cards convert voltages to values, and move them into a big chunk of shared memory on the host computer.

- The host computer recalculates the new state of the simulation, updating everything in the shared memory, 60 times a second.

- New values in the shared memory are sent to the interface cards.

- The interface cards convert values to voltages, driving the instruments, sound, visual and motion systems.

It all happens so fast that the pilots never sense the latency between their action and the effects in the cockpit. The host computer is the brain of the system, that's why a small bug there can be dangerous.


Ha, cool, I used to work at Rediffusion and I heard a similar story about when a UPS pilot got the SC to do the phugoid behaviour 'properly' by taking him up in a plane to experience it.

When they tried it in the sim, both of them were similarly thrown around and a terrified few seconds as neither were able to reach the panic button :-)


Any chance you worked on an MD-82 for Alitalia a long time ago? I think they have two over there, and I worked on relocating one of them to CAE Madrid. My first taste of a Rediffusion machine - similar architecture, nicer code.


No, think there was an Alitalia on the factory floor when I worked there, but I can't remember.

Most memorable event on the factory floor was when a hydraulic jack failed on a sim, and the resulting jet of fluid punched a hole through six layers of hand wire-wrapped PCBs on the sim next door.

I think it put them back six weeks. Luckily the penalty clause for lateness was only $50,000 per day. Gulp.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: