Sign in to follow this  
rcbarend

Throttle position

Recommended Posts

Do you know how to read the throttle lever position, just like FSUIPC does at offset 332E?In fact, I know how to do it with FSUIPC, but I'd rather avoid using it. I would like to develop an Airbus FADEC system.Do you know if this value is accessible through an DLL offset, just like it can be done for time of the day, pause status, sound status, etc...Any help is greatly welcome.Eric

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Eric, have you looked at the NETPIPES SDK in local mode, in particular, the properties you may be interested in:GENERAL_ENG_THROTTLE_LEVER_1_POSITIONGENERAL_ENG_MIXTURE_LEVER_1_POSITIONGENERAL_ENG_PROPELLER_LEVER_1_POSITIONGENERAL_ENG_THROTTLE_LEVER_2_POSITIONGENERAL_ENG_MIXTURE_LEVER_2_POSITIONGENERAL_ENG_PROPELLER_LEVER_2_POSITIONGENERAL_ENG_THROTTLE_LEVER_3_POSITIONGENERAL_ENG_MIXTURE_LEVER_3_POSITIONGENERAL_ENG_PROPELLER_LEVER_3_POSITIONGENERAL_ENG_THROTTLE_LEVER_4_POSITIONGENERAL_ENG_MIXTURE_LEVER_4_POSITIONGENERAL_ENG_PROPELLER_LEVER_4_POSITIONThis should work if you use the host name localhost as local loopback.

Share this post


Link to post
Share on other sites

I don't know NETPIPES at all (I have just downloaded the SDK), so I will need to understand it before I can try what you suggest.Anyway, I'm afraid these NETPIPES properties are similar to the variables GENERAL_ENGINE1_THROTTLE_LEVER_POS to GENERAL_ENGINE4_THROTTLE_LEVER_POS that are available through the panel SDK.Unfortunately, they are based on a "Boeing" logic, which means the throttle levers move when the auto-throttle system adjusts the power. In the Airbus, it is different: when the levers are moved into the CL, FLEX, or TOGA notch, it arms the FADEC auto-throttle system (Full Authority Digital Engine Control) and the levers don't move any more.I'm afraid this can't be done with FS.Eric

Share this post


Link to post
Share on other sites

One trick might be to use engines that aren't used, and with luck, you don't have a 4 engine plane (that would let you use the throttles but not actually do anything except from what you do inside the code).A commercial add-on Airbus also has the airbus throttle modes implemented using a keyboard, and I think they use FSUIPC to disconnect the controls which probably isn't the mechanism you're looking for :)

Share this post


Link to post
Share on other sites

Hello Etienne,Your answer is very smart, and I have already thought about the solution you described, and I can tell yo a secret: it is the solution I have implemented on the FeelThere CRJ. Fortunately, this aircraft has only 2 engines, so it works. The problem here is that I would like to build a solution that works also for the A340, which has 4 engines, so there is no unused engine...I know the commercial add-on you're talking about, and I don't like the solution they have implemented. I don't want to use the keyboard to control the throttle when I have a throttle lever connected to my PC. I would like to make it work like in the real aircraft (the FADEC setting depends on the position of the throttle lever).If I find no solution, I will use FSUIPC to read the throttle position...Thanks for your help !!Eric

Share this post


Link to post
Share on other sites

Hi Eric,It is possible, but not with the standard autothrottle. The only way to realize a real working FADEC system is to make an own autothrottle. It's a lot of work and a big gauge (the more limitations you have the bigger the gauge will be) but it worths the time. I'm currently programming a DFGC with a FADEC controlled autothrottle coupled to a TRP.What you have to do is to use the THROTTLE_SET command to control the throttle position. Of course you can use the command GENERAL_ENGINE1_THROTTLE_LEVER_POS to scan the position of the throttles but I don't think that it is the way a real FADEC system works. A FADEC system normally scans the engine datas (N1, EGT, or whatever your system scans) and use this datas for the throttle command and not scans the throttle position (please correct me if I'm wrong). Enclose is a small example to show you of how I have programmed my AT, FADEC and TRP system (not coded):If you activate the AT with a speed hold command you should first scan the current throttle position while the AT switch is pressed and set it to a custom variable. This custom variable is used to set the throttles with the THROTTLE_SET command. Take care that the set command is always active when the AT is on and not only with a mouseclick action, because otherwise a hardware throttle sets back the position and deletes all throttle settings. Now scan the actual airspeed and compare it with your desired speed. If your desired speed is higher than the current airspeed, use a time control command to increase the custom variable which sets the throttle in small steps or decrease the variable if the desired speed is lower. The smaller you set the time for changing the custom variable the faster the throttle moves and contrariwise. If your FADEC now has a N1 limit of 97% for example, you could include this limitation to the set command (only increase the throttle if N1 is below 97%). The same with a Climb command of the TRP. If your climb commannd will be active as soon as the engine reaches 75% N1 for example, you can include this to your code. Now give over the AT action to the N1 setting (no longer to the speed setting). On this way you have a full control over everything your autothrottle does.Hope this helps.Best RegardsMatthias

Share this post


Link to post
Share on other sites

Hello Matthias,Your explanations are very helpful, but my problem is not to develop a new auto-throttle system, I will do it anyway.My problem is the following:On the Airbus, you set the FADEC position (IDLE, CLIMB, FLEX, TOGA) by moving the throttle lever into a specific notch. Between the IDLE and the CLIMB notches, the throttle lever is used as a standard throttle system, it controls the engine power according to the lever position. When you push the lever into a predefined position (notch), the FADEC will control the engine automatically. This is different from the Boeing logic.For this reason, I absolutely need to read the throttle lever position, and not the engine values (N1, N2 or whatever), to know if the lever is in a predefined notch that controls the FADEC. It works fine if I use FSUIPC to read the throttle lever position (I did this on my Airbus freeware panels), but now I would like to do it without FSUIPC.Thanks for your help.Eric

Share this post


Link to post
Share on other sites

Hi Eric,Well, you can do it anyway. I do not know the Airbus FADEC system but if I understand you correct, you're just looking for a signal from the throttles to switch on or off the AT. You can do it with the standard variables and standard autothrottle but here you do not have as much possibilities to control it as with an own designed autothrottle.First you should use a custom variable for the AT switch. Do not use the standard autothrottle arm variable for it. The signal to activate the AT in a Climb, Flex or Toga mode could be scanned with the A: variable GENERAL_ENG_THROTTLE_LEVER_1_POSITION. Your code just have to be like: If GENERAL_ENG_THROTTLE_LEVER_1_POSITION is larger a specific position or between two positions (to include a small tolerance for the activation position) than switch on another custom variable. Another code scans if the custom variable and the custom variable for the autothrottle is on. If yes, it activates the autothrottle and prevent that no other mode (Flex and Toga) could be activated, if not, the AT is deactivated (switched off). When switching off the custom AT switch or another mode to control the throttles, the second custom variable which was switched on from the throttle position, will be set back to zero and so the AT is off. Of course you could include other variables to deactivate the custom variable of the throttle positions and so for the authrottle function. To prevent that you could activate a mode which lies in front of another mode (Toga in front of Climb for example) you could integrate a small delay for the custom variable. On this way the throttle must be in the predefined position (Climb for example) for at least 2 secondes to activate the custom variable sand so the autothrottle.When using the GENERAL_ENG_THROTTLE_LEVER_1_POSITION you have 100 positions to place the Climb, Flex and Toga modes on the throttle area (much more when using decimals).Best RegardsMatthias

Share this post


Link to post
Share on other sites

Hello Matthias,Thanks for your help.I'm not sure I totally understand your point, but I think it does not work, and I explain you why:I can use the GENERAL_ENG_THROTTLE_LEVER_1_POSITION to get the lever position, and the values determine the FADEC setting: - 0: IDLE notch - between 0 and 80: normal position, no FADEC - between 80 and 85: CLIMB setting - between 85 and 90: FLEX setting - over 90: TO/GA settingObviously, you can switch from a setting to another without switching AT off. For example, you take off in TO/GA mode, and pull the lever to engage the CLIMB mode at 1500 ft AGL.Now let's imagine I push the throttle to 80 and engage the CLIMB mode. Then the auto-throttle will command N1 to 95% according to the FADEC logic. This will be done by commanding the engine power through the throttle lever, so the lever position that I read with GENERAL_ENG_THROTTLE_LEVER_1_POSITION will come to 95% or so. Consequence: the FADEC will engage the TO/GA mode, and I don't want this !!In fact, THE problem is to make the difference between the throttle movement commanded by the user, and the throttle movement commanded by the auto-throttle system. And the problem is the same if I develop my own auto-throttle system.The more I talk with you, the more I think we will find the solution to this problem.

Share this post


Link to post
Share on other sites

" And the problem is the same if I develop my own auto-throttle system""Hi Eric,If I may jump in .... :-)NO, that's NOT the same, since with your own AT system you have more info !!! See below.First of all, your requirements are very clear.Unfortunately, FS does have only one function for throttle position: both used for physical lever position AND to command the "logical" FS throttle.Assuming that you also make your own auto-throttle system (the FS9 implementation is crap anyway IMHO), a solution to your problem could be the following: Compare the actual throttle position with the previous one your have commanded:- If it's the same: the pilot has NOT touched the physical lever.- If it's NOT the same: the pilot HAS moved the lever, and you should act accordingly.DO you get my point ??Of course, when comparing you should also compare with the original throttle setting by the pilot (with a little marging), since due to axis jitter the read throttle position may jump back to the pilot-set value of the physical lever without the pilot touching them.Example:- If you detect throttle at 80%: start AT-climb mode.- As long as the read throttle position is equal to your previous written value OR equal to the original pilot-setting (80%), you're still in AT-climb mode. Because of jitter, do not compare with 80% but to between eg. 79.5 and 80.5%.- If the read value is unequal to your last written position AND unequal the pilot-start setting, the pilot obviously has moved the physical lever, and you should act based on this new value.Now, this doesn't work if you use the standard AT system, since there's NO way to detect if a read throttle position is commanded by the pilot or the AT system, which you DO know if you have your own AT system.The above could be very easily implemented in an XML gauge (or C gauge), especially if you combine the FADEC logic and AT-system in one gauge. If fact I just tried this basic operation just now in my Taxispeed gauge (which uses an AT-system for taxiing) :-)Unless I missed something of course.Hope this helps...Cheers, ROb Barendregt

Share this post


Link to post
Share on other sites

This time, I totally understood your point, and... I thinkI missed something.If I develop my own AT system (I will do it anyway), how do I command the engine power?The only way I know to do this is to use the KEY_THROTTLE_INCR and KEY_THROTTLE_DECR key events. These events command the engine AND the throttle position.If I am right, it means your solution does not work, because you may detect a change in the throttle position value because of the engine command by the AT and NOT because of a pilot command.So I ask the question again: How can I make the difference between a throttle movement that comes from the pilot and a throttle movement that comes from the AT system?This is the question...Thanks for your help !!Eric

Share this post


Link to post
Share on other sites

Hi Eric,Okay, now I understand the problem. Here is a first attempt for a solution:First I would include a small delay for the activation of the Autothrottle. For example: Program your gauge on this way, that if you move the throttle to 86% (Flex setting) it takes 2 seconds until the custom variable (L:Flex active, bool) is set to 1. The MS autothrottle gets the condition that it should only work if the AT switch is on and either (L:Flex active, bool), (L:Toga active, bool) or (L:Climb active, bool) is on. As soon as one FADEC mode is on, (L:Flex active, bool) for example, another FADEC mode won't work. This could be included in the code you're going to do for the throttle positions. Here you scan if another mode is active. If yes, do nothing and if no, activate the mode of the current throttle position. This prevents that another mode could be activated as long as this mode is active and controls the autothrottle.Much more complicate will be the way to deactivate the actual mode and to activate another one with throttle movements. At the moment I just have one idea (maybe I get another one later). As you wrote you have three defined positions for the throttle to activate a FADEC mode. For my idea you should change the throttle gauge on this way that this gauge is assigned to the A: throttle variable only if all FADEC modes are off. As soon as one Fadec mode is on, the throttle bitmaps should freeze in it's position. The code for this is very simple as you can use an "If" command (if (L:Flex active, bool) 0 == and all other FADEC commands, than use the standard A: variable for the throttle). Now program a clickarea under the corresponding throttle position which sets the FADEC command, the (L:Flex active, bool) command for example, back to zero. As soon as the FADEC command is zero the throttles will show the actual throttle position and could be moved to another position and maybe activate a new FADEC mode than. I know that you don't want to use keyboard or mouse commands for this but at the moment I have no other idea. But with this way you just have to use one mouseclick command to deactivate a mode. After this the throttles come back to live and could be controlled with a hardware throttle or the keys.Best RegardsMatthias

Share this post


Link to post
Share on other sites

Hi All,Oops, there were two replies while I was writing mine."The only way I know to do this is to use the KEY_THROTTLE_INCR and KEY_THROTTLE_DECR key events"I highly recommend not to use the throttle incr and decr commands as they work not very precise (move the throttles too fast). A better way is to use the throttle_set method. In my first reply to this problem I post a way to use the throttle_set for an own designed autothrottle.Best RegardsMatthias

Share this post


Link to post
Share on other sites

Agreed. I also use KEY_THROTTLE_SET instead in the CRJ. But the problem is still the same: this event both command the engine AND the throttle position.Eric

Share this post


Link to post
Share on other sites

Hi Eric,"How can I make the difference between a throttle movement that comes from the pilot and a throttle movement that comes from the AT system"You cannot indeed !! But if you make your own ATsystem, you KNOW which throttle position value you commanded last time; so if the actual value and previous value deviate, you KNOW it's either because the pilot moved the throttle lever OR the throttle lever has jittered.You're right, if you use Incr-Decr. Throttle commands, it doesn't work since than you don't know the last commanded throttle position (only if you incremented or decremented).But a far more better for an AT system is to use the axis events for throttle, because that allows you to set a specific position (and therefore decide your own increments each time).In XML this is event:x (>K:THROTTLE_SET), where "x" is value 0 (idle) to 16384 (full)(assuming that you want to command all throttles equally).So translated into the example (in XML):- Suppose the AT-system is OFF and you read a pilot-set throttle position between 80% and 85% via variable (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent).- Save this value into a variable ""start-position", set you ATsystem to ON and start your climb AT logic.Suppose your ATlogic commands value of 70% via:11468 (>K:THROTTLE_SET)Now, if in the next schedule of the gauge the variable (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) reads outside the range:- "start-position" +/- 0.5% (jitter)OR- 69.99% and 70.01% (use a margin of 0.01% to allow for rounding errors in FS)then you KNOW the pilot has moved the Throttles manually and you must act according to this new value. (if below 80%, set ATsystem OFF).If it IS in these ranges, the pilot has NOT moved the throttle levers, and you calculate and command the next AT throttle value, and repeat the above with the new value.This assumes of course that the pilot DIDNOT set the throttle MANUALLY to a position in the 0.01% range of your last given AT command but that would be extremely unlikely.Get it now ????If not, I can send you some sample code (XML only).Cheers, Rob

Share this post


Link to post
Share on other sites

Hi Eric,See my explanation above in another part of the thread....Summerised:1. You CANNOT see a difference between a AT-commanded and Pilot-Commanded throttle setting.2. But (if in an AT-mode) a read throttle position is DIFFERENT then the throttle position the ATsystem commanded previously, you KNOW the the pilot has moved the throttle.Sjeezz.. This gets confusing without an "answer" token :-) ...And you could solve the "displayed" throttles in the panel like Matthias described: you show the bitmap of the throttles depending on the AT state.Rob

Share this post


Link to post
Share on other sites

OK !!!!!I finally got your point !! It took some time to understand, but now I get it. I'm silly sometimes...I understood. As I develop my own AT system, I know which value is commanded by the AT, so I make the difference with the value that comes if the pilot moves the throttle lever. You're right, it is a great idea. I will implement this ASAP and let you know how it works.EricPS. Can you send me an e-mail to marciano.eric@free.fr. I would like to tell you something "privately".

Share this post


Link to post
Share on other sites

Hi Eric,See your Email .. (I just sent you one).That is, if you intended this request for me, and not Matthias :-) And to Matthias: clear to you as well :-) ???Cheers, Rob

Share this post


Link to post
Share on other sites

Yes, please, Matthias, send me an e-mail also, so that I can get your address. Mine is marciano.eric@free.frThanks.Eric

Share this post


Link to post
Share on other sites

Hi Rob,Absolutely clear. The idea to use the variable of the throttle set command and compare it with the current throttle position is very good. Seems a good way to solve Eric's problem.Best RegardsMatthias

Share this post


Link to post
Share on other sites

Hi Eric,No problem. I write you this evening as I'm not at home at the moment.Best RegardsMatthias

Share this post


Link to post
Share on other sites

Hi,Very interesting discussion!May be a small addition:In my 767 i use the Thrustmode Panel to set computed N1 for TOGA, CL, CL1, CL2, CON and CRZ (Weight, Weather, etc..)With AT and N1ref ON, the actual N1 is monitored and compared with the calculated N1.The difference between has influence on the Axis_Throttle_Set command, so that eventually there is a "balance" and the actual N1 remains steady.Still the throttle shows "oscillation" and to prevent that i give the throttle bitmaps a predefined position just for the look according their ownn variable, only when N1ref and thrustmode is ON.Back to AT and SPD or Mach the bitmaps show the throttle position according the normal A:Var thr. pos.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Hi Jan,Of course this was/is an interesting discussion, with this input from these talented designers :-) :-)...Cheers, Rob

Share this post


Link to post
Share on other sites

Hi Rob and Jan,"with this input from these talented designers..."LOL, you're absolutely right :-beerchug :-lolJan, I know the throttle oscillation problem also from my TRP. I think the reason is because of a hardware throttle. The flightsimulator always tries to catch the position of the hardware throttle but gets also the order to stay in it's current position by the throttle_set command. I also think that the only way to prevent this is to freeze the bitmap in it's position if a TRP function is active. Would be nice if MS could make us the gift to disconnect and connect hardware (like throttles) with a code or to change aircraft.cfg settings while running.Best RegardsMatthias

Share this post


Link to post
Share on other sites

Hi,Most of the time, with Thrustmode Selected, (Fadec ON?) I read a movement of the axis_throttle_set between 16384 and say 7000 to keep N1 in balance.Does that has much impact on Framerates?Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this