For the hackers around here: There is a plug-in by NASA called "XPlaneConnect", that allows you to control aircraft in X-Plane from code See here: https://github.com/nasa/XPlaneConnect
I've used it to write some Python code that mimics upset recovery procedures that we teach human pilots. It's quite fun putting an aircraft in a tricky position and then seeing your code recover it nicely to straight and level flight. (Or seeing your code roll it over and fly it into the ground if you got the math wrong :-))