Quadrotor Control Systems And Kerbal Harriers

Kerbal Space Program, the game that teaches engineers at JPL and SpaceX the basics of rocket design and orbital mechanics, recently had a giant update. There are now science contracts that require you to fly Kerbals all over their tiny globe, collect data, and transmit it back to the Kerbal Space Center. As would be expected, this is a grind for XP, and the contracts sometimes don’t make sense – you need to collect data from cliff faces and mountain tops. Landing a Kerbal jet at these places is hard.

[Matt Thiffault] wanted to do these science contracts more efficiently. The best way to get to a remote location without a landing strip would be a helicopter, but a harrier jump jet would do just as well. This isn’t supported in the stock game, so [Matt] wrote a complete control system for four engines to control a hovering Kerbal jet.

[Matt]’s work is built on kOS, a scriptable autopilot mod for Kerbal that was originally intended to be something like the Apollo Guidance Computer. People have been using it to make computerized skycranes and automated rendezvous and docking programs, but these are actually relatively simple examples; there’s far more math involved in flying a quadcopter than there is getting into orbit.

To build his automated hovering harrier, [Matt] needed an aircraft. His Kerrier has parts from the Kerbal Aircraft Expansion, B9, and Infernal Robotics mods for KSP, but this is only half the problem. Anyone can put four tilt jets on an airplane, and it takes a real wizard to force a control system to hover. Hover control of the Kerbal harrier is accomplished with a complete control system for a four-engined aircraft, with proper PID control loops and code updating at 20Hz.

With kOS, the proper plane, and the right software running on this emulated guidance computer, [Matt] is able to park his plane in mid-air, have a Kerbal descend the ladder, perform some science, and return to base. It’s an impressive amount of work for a video game. A good thing, too: [Matt] is looking to get into controls engineering professionally. Whether this will go on his resume is another question entirely.