FS2004 Autopilot for Helicopter

Hello friends

After a long... long absence, I am back to bother you with more questions and hopefully, finish and refine my current projects (not sure if "current" counts after almost eight months of doing nothing with them :duck:).

I want to write an XML autopilot for my helicopters. The ones availables for FS9 are written in C and I can't study them; they work fine until I determined the code has a flooding issue -with Bjorn and Roman's help-.

This is a general question: the autopilot's XML code design for a helicopter should follow the same rules as the standard Cessna's 182 autopilot?
If it is so, I will try to implement the code to work in a VC (with 3d parts and buttons working in tandem with 2D autopilot).

In advance, thank you all.
Last edited:

Roy Holmes

Resource contributor
I would think that before you start code design for a helicopter autopilot you should list what you want it to do. That clearly depends on what you want the helicopter to do. Sort those out and make a requirements list.
Then work on how to meet those requirements.
For an obvious example you might want it to hover automatically. That would be a complete departure from anything the Cessna does.
And a hover autopilot is not that hard to achieve.
Requirements always come before design.

Roy, thanks for the head up. My real intention here is to get a hint on what I should read to test the ideas you've mentioned and a few others wich resembles Antti Pankkonen's helicopter autopilot; this is another case where I will use XML for FS9 to achieve this goal. Unfortunately for me, all standard FS9's autopilot gauges are written in C language as well; therefore, I cannot even get the faintest idea on how to proceed.

Any hint for a good reading in this regard?
For now, I will keep looking here in the forum to get some ideas.
Thanks again,
Last edited:


Resource contributor

The 747 AP gauge(s) are written in XML, but they won't do you any good because they just turn standard FS events on and off, with no real logic.
Hi Tom

I suspected that, because "Flight Instrumentation Data" about the A:Vars and K:Events in the SDK's is pretty grim. So this is one instrument that will require "some" engineering knowledge which I don't have; Automatic Control Systems Theory and Laplace Transformations are not precisely my favorite cup of tea... :eek:

Thank you.
Last edited:

Roy Holmes

Resource contributor
I have one I made that will hold a baro alt you set and you can vary airspeed by the cyclic. It also has a hover mode where you can set airspeed in increments which means you can be in the winch mans position and dangle the winch cable so as to pick up SimObjects.
If that interests you, PM me
If you want to see how the C++ helo AP works you could use FSUIPC logging (send to cmd window for ease) with the following checked and while the AP on. "non axis events" & "axis events"
This will, at least, give you what commands are used to manipulate the attitude of the helo.
I can bet that the flooding issue you are having may not be able to be fully solved.. There may be a command in there that does not have a read var to keep from the flood.
For instance, the terrain following in our F-111 project has slight flooding, only in a certain TF mode. There was just no way to check the returned values.
If Roy's gauge is XML then you will have a good example to make your own..

Good luck.
Hi Roman

Thank you for the head up; however I'm affraid I am not enough versed coding in C++. Furthermore, I am not sure if I understood what you said about FSUIPC logging (I never used it before). I will launch the simulator and try to do what you've teached me.

I can bet that the flooding issue you are having may not be able to be fully solved
My money is on you again, I'm afraid it won't be possible to fix that gauge since I don't have the source code.

On the other hand, Roy was very kind and will send to me his own XML autopilot code to do my research.

By the way, If you're working with Karol in the same F-111 project, dear Lord, those gauges are very impresive!

Thank you; as always, your input is very much appreciated.
Kindest regards,
Last edited:


Resource contributor
Hello Sergio
I'v found some papers, which can be helpful to understand how a helicopter autopilot does its trick
https://scholarcommons.usf.edu/cgi/viewcontent.cgi?article=1113&context=etd <- very extensive document
https://www.helitrak.com/autopilot - commercial Helicopter Autopilot System
https://genesys-aerosystems.com/sites/default/files/files/HeliSAS_Technical_Overview-Genesys.pdf - commercial Helicopter Autopilot System - HeliSAS presentation
https://www.faa.gov/regulations_pol...advanced_avionics_handbook/media/aah_ch04.pdf FAA document on Automated Flight Control
https://spinoff.nasa.gov/Spinoff2008/t_2.html - NASA document on auto-pilots
https://deankmiller.com/aircraft-autopilot-system-description/ - Autopilot functional block diagrams
https://helicoptermaintenancemagazi...icopter-automatic-flight-control-systems-afcs - Autopilot block diagram and internal mechanics
https://citeseerx.ist.psu.edu/viewd...D4F1F9DD?doi= Another white design paper
https://www.helisimmer.com/news/helicopter-autopilot-p3d-released - website of someone how already has created one
https://www.sae.org/publications/technical-papers/content/2012-01-2098/ - payware document

I hope that there is something useful to be found inside these resources for you.