Creating an autopilot in X-Plane using Python
austinsnerdythings.com
Creating an autopilot in X-Plane using Python
1–10 of 34 posts
Re: Creating an autopilot in X-Plane using Python
#2The Connect API for X-plane is a great toy. I wrote a "recover from upset" script some years ago after having a discussion on the best methods for upset recovery by human pilots. You can easily implement something that does what a human would do and then compare other options that may be possible.
The one thing that does make it a bit "easy mode" is that all data is clean and exactly as you would expect mathematically. While real input data for avionics is more noisy and has several types of sensor errors.
Re: Creating an autopilot in X-Plane using Python
#3Wow. Wouldn’t have guessed that a commercial game gets used in certified simulators
Re: Creating an autopilot in X-Plane using Python
#4if you want more than just an autopilot I have a almost all 747 400 systems modelled in lua open sourced for xplane 12 at
https://github.com/mSparks43/747-400
CBTs linked in an issues milestone.
Re: Creating an autopilot in X-Plane using Python
#5Oh man, this is creating a new itch in me, thanks! I hope it's a gateway for me to write a flight controller for my RC planes.
Re: Creating an autopilot in X-Plane using Python
#6Wow. Wouldn’t have guessed that a commercial game gets used in certified simulators
Kind of makes sense that a company with relevant expert domain knowledge can double-dip making both pro and game stuff.
Re: Creating an autopilot in X-Plane using Python
#725 years ago I did the same thing with MS flightsim as an interesting project. I took a similar approach except I was using Java.
I got as far as being able to navigate to lat/long fixes.
Learnt quite a bit in the process
Re: Creating an autopilot in X-Plane using Python
#8[flagged]
Re: Creating an autopilot in X-Plane using Python
#9if you want more than just an autopilot I have a almost all 747 400 systems modelled in lua open sourced for xplane 12 at https://github.com/mSparks43/747-400 CBTs linked in an issues milestone.
Sparky!
Re: Creating an autopilot in X-Plane using Python
#10You can also do this for Kerbal Space Program using the kRPC mod: https://forum.kerbalspaceprogram.com/topic/130742-18x-to-112.... It's a much less polished experience, but you get more of the experience of an actual avionics/robotics project doing it this way - multiple sensors that may not necessarily agree with each other (for example, IIRC accelerometers installed at different ends of the ship will register different readings!), you have to be quite a bit more careful when interfacing with engines and may not have access to a simple "go left" control input, you have to deal with whatever nightmare vehicle you built that you need a computer to handle, that kind of thing.