• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Autopilot for Helicopter

Messages
1,451
Country
mexico
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.
Sergio.
 
Last edited:

Roy Holmes

Resource contributor
Messages
1,803
Country
us-virginia
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
 
Messages
1,451
Country
mexico
Hello

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,
Sergio.
 
Last edited:

tgibson

Resource contributor
Messages
11,324
Country
us-california
Hi,

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.
 
Messages
1,451
Country
mexico
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.
Sergio.
 
Last edited:

Roy Holmes

Resource contributor
Messages
1,803
Country
us-virginia
Sergio,
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
Roy
 
Messages
440
Country
us-wisconsin
Sergio,
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.
 
Messages
1,451
Country
mexico
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,
Sergio.
 
Last edited:
Messages
1,451
Country
mexico
Hi!

Just want to thank Roy; he shared with me his own FSX helicopter gauge. :wizard: :wizard: :wizard:

Time to learn about it!
Cheers,
Sergio.
 

Ronald

Resource contributor
Messages
974
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.sciencedirect.com/science/article/pii/S1474667016440735
>>
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=10.1.1.31.8317&rep=rep1&type=pdf 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.
 
Messages
1,451
Country
mexico
Hello Ronald

Thank you very much, I have some of them already. The more, the merrier!

Kindest regards,
Sergio.
 
Messages
1,451
Country
mexico
Hello lads

The code for the autopilot kindly provided by Roy is for FSX; I made my best to translate it to a version meant to be used in FS9.

The FSX version code is writen in this order:
  1. Gauge event logic.
  2. Macros.
  3. Mouse Area.
  4. Update section.
I took a look at the original FS9 Garmin 500 where all Macros were defined in first place; on the other hand, Bjoern teached me in one fully operational gauge to set up the update section in the first place. I have a one question though...

Should be necessary to rearrange the order for the FS9 version? Lets say, this order:
  1. Update section.
  2. Macros.
  3. Gauge event logic.
  4. Mouse Area.
If some kind soul has the time to take a look, I attached the FS9 code written in the same order used in the FSX version. As a side note, I am not sure if I missed some K:Events in their respective FS9's equivalents. Since I don't have any images for this gauge yet, all mouse areas needs to be tested as well... o_O

In advance, thank you.
Sergio.
 

Attachments

  • RH_Heli_Autopilot.zip
    3.5 KB · Views: 203
Last edited:
Messages
1,451
Country
mexico
Hello

Roy:
All files have been received and ready to be studied. Thank you very much!

Kindest regards,
Sergio.
 
Top