Posted by Tim Trueman on November 7, 2009 at 4:30pm
Here's an example of how to get data from the simulator: http://gist.github.com/228998It has everything you need to treat it as a virtual IMU. This was instrumental in getting my extended Kalman filter running (to be open sourced soonish) and I hope you find it useful too!(I'll do an updated version that shows you how to control the plane in X-Plane from your code.)
In the example code I'm grabbing the gyros, accelerometers, indicated airspeed, altitude, lat/long and heading. You can read a lot more data if you want (I'm taking probably 1% of the data available for access from X-Plane). Download the demo and go to the input/output menu to see what's available.
I would recommend reading the comments in the code. I actually spent some time explaining what's going on…
Comments
I would recommend reading the comments in the code. I actually spent some time explaining what's going on…