- Messages
- 254
- Country

Hi all,
In my pursuit of the perfect 747 classic, I have decided that I want to learn how to program more advanced gauges than just XML gauges so that I can do more advanced things, such as directly controlling Throttles, Axes, etc.
I am a little lost as to where to start with C-programming in the context of FS. Much like how XML has many many uses outside of FS, C and C++ have many features and uses outside of FS and I don't want to spend time learning how to program and use features I won't need to for FS purposes (how much or how little that applies here is unknown to me as I have next to no experience with C). I am happy to sit and read or watch any tutorials and documentation and books necessary, I just want to make sure it will actually be useful for FS gauge creation.
With that in mind, I figure a simple place to start with C-gauge programing would be to attempt to make an Autothrottle. I figure that I will learn how to do most all of the basic operations I will need C-gauge programming for by creating such a gauge.
In my 747, EPR is calculated as a function of N1 via an XML gauge for all mach numbers and N1 speeds based on tables available in PW documentation (Recently I found similar tables for the CF6-50 and RB211-524C2 so I can make the other models too!
). I will either need to recreate these functions in the C-gauge or be able to access the calculated L:var for EPR via the C-gauge. Further, I would like to be able to access other L:vars such as those from my electrical system programmed in XML to properly control when the autothrottle has electrical power, ADC power, etc. or not.
Then I want to be able set the throttle position as a function of a calculated EPR, N1, or whatever. I figure a simple PID will suffice for this. Later, I would like to be able to set an autothrottle speed control using a slightly more complex PID that uses longitudinal acceleration. I then hope to expand this into a full autopilot that properly uses PID's and accelerations.
Will C-gauges do what I need them to for FS2004 i.e. writing directly to the throttle position, as well as accessing XML L-vars? I remember reading somewhere that C gauges can access Lvars but I don't remember where I read that or how it is done. I have been examining the FSUIPC documentation regarding offsets and I feel this might be useful as well but I am not sure if I will need to go that route or if there is a different way.
Some other questions I have:
What compiler should I use?
What program should I use to create the actual code (Is notepad++ sufficient?)
Any recommendations on good tutorials or documentation that will teach be the required knowledge would be great. I am reading through the SDK right now. It sounds to me like I just need to sit down with a good C tutorial and start working away at it.
Thanks!
Chris
In my pursuit of the perfect 747 classic, I have decided that I want to learn how to program more advanced gauges than just XML gauges so that I can do more advanced things, such as directly controlling Throttles, Axes, etc.
I am a little lost as to where to start with C-programming in the context of FS. Much like how XML has many many uses outside of FS, C and C++ have many features and uses outside of FS and I don't want to spend time learning how to program and use features I won't need to for FS purposes (how much or how little that applies here is unknown to me as I have next to no experience with C). I am happy to sit and read or watch any tutorials and documentation and books necessary, I just want to make sure it will actually be useful for FS gauge creation.
With that in mind, I figure a simple place to start with C-gauge programing would be to attempt to make an Autothrottle. I figure that I will learn how to do most all of the basic operations I will need C-gauge programming for by creating such a gauge.
In my 747, EPR is calculated as a function of N1 via an XML gauge for all mach numbers and N1 speeds based on tables available in PW documentation (Recently I found similar tables for the CF6-50 and RB211-524C2 so I can make the other models too!
Then I want to be able set the throttle position as a function of a calculated EPR, N1, or whatever. I figure a simple PID will suffice for this. Later, I would like to be able to set an autothrottle speed control using a slightly more complex PID that uses longitudinal acceleration. I then hope to expand this into a full autopilot that properly uses PID's and accelerations.
Will C-gauges do what I need them to for FS2004 i.e. writing directly to the throttle position, as well as accessing XML L-vars? I remember reading somewhere that C gauges can access Lvars but I don't remember where I read that or how it is done. I have been examining the FSUIPC documentation regarding offsets and I feel this might be useful as well but I am not sure if I will need to go that route or if there is a different way.
Some other questions I have:
What compiler should I use?
What program should I use to create the actual code (Is notepad++ sufficient?)
Any recommendations on good tutorials or documentation that will teach be the required knowledge would be great. I am reading through the SDK right now. It sounds to me like I just need to sit down with a good C tutorial and start working away at it.
Thanks!
Chris
Last edited:



Flightsim internal software
Dungeon.