Jump to content
Sign in to follow this  
geoffco

Setting autothrottle N1

Recommended Posts

Hi,Looking for advice rather than code for once!.. well, for now anyway...I want to make a small gauge that sets the maximum N1 allowed for the autothrottle. Is there a single variable that I can set to do this for all engines? The gauge would simply have a readout of teh current setting with a button for up and down and then another one to "set" the value... The aircraft is a multi-engine jet.On a related subject, I have seen this in the aircraft.cfg file but it doesn't seem to have much effect on the autothrottle performance - what does it actually do / limit?autothrottle_max_rpm = 90 Cheers,Geoff

Share this post


Link to post
Share on other sites

There's an N1 hold in FSX.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites

Nope. I know of nothing in FS9 that allows you to limit throttle max at any point in flight.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
Nope. I know of nothing in FS9 that allows you to limit throttle max at any point in flight.
I use for FS9(L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET) Where (L:N1_max,enum) is desired max N1 setting ie. 90, 101 etc. & K:THROTTLE_SET sets all engines limit.

Paul EGLD

Share this post


Link to post
Share on other sites
I use for FS9(L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET) Where (L:N1_max,enum) is desired max N1 setting ie. 90, 101 etc. & K:THROTTLE_SET sets all engines limit.
Thanks very much - I'll give it a go. Does it get reset when the autothrottle is switched off or do I need to set a default... what is the FS default for THROTTLE_SET, is it 16384 of do I also have to scale it somehow?Cheers,Geoff

Share this post


Link to post
Share on other sites

That piece of code just keeps fighting with the autothrottle... it doesn't actually limit anything.THROTTLE_SET is just that... a way to set the throttle position.


Ed Wilson

Mindstar Aviation
My Playland - I69

Share this post


Link to post
Share on other sites
That piece of code just keeps fighting with the autothrottle... it doesn't actually limit anything.THROTTLE_SET is just that... a way to set the throttle position.
I does actually, Maybe it's part with other controls. I am suprised you did't think of that!

Paul EGLD

Share this post


Link to post
Share on other sites
I use for FS9(L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET) Where (L:N1_max,enum) is desired max N1 setting ie. 90, 101 etc. & K:THROTTLE_SET sets all engines limit.
Hi Paul!Nice code, don't understant all the calculations but looks great. I wonder if it works whit the TO/GA mode or if I have to code independently?Javier

Share this post


Link to post
Share on other sites

Hi,It doesn't seem to have any effect on the behaviour of the throttles... My code for the part of the gauge is shown here:<Element><Position X="10" Y="10"/> <Select> <Value>(L:TRP_MASTER, enum)</Value> <Case Value="0"> <Image Name="GC_BAe_AP_sel_Off" ImageSizes="25,10" Bright="No"/> </Case> <Case Value="1"> (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET) <Image Name="GC_BAe_TRP_Master" ImageSizes="25,10" Bright="Yes"/> </Case> </Select></Element>I assume that this operation is attempted every time the gauge is refreshed as long as the master switch (L:TRP_MASTER, enum) is on (1) or is my code bad?Cheers,Geoff(EDIT: the rest of the gauge sets the (L:N1_max,enum) to different values and also prints it so I know the L: var is set...)

Share this post


Link to post
Share on other sites

Hello!Haven't test the code yet, but I guess it has to be placed in the <Value> tag and not in the <Case value> tag. To write values to a L:var given a condition maybe you can use an IF stamet, or GOTO but I don't know the sintax.Javier

Share this post


Link to post
Share on other sites
Hello!Haven't test the code yet, but I guess it has to be placed in the <Value> tag and not in the <Case value> tag. To write values to a L:var given a condition maybe you can use an IF stamet, or GOTO but I don't know the sintax.Javier
Ok, so can somebody write in how to do this? I cannot find any decent examples of this in tutorials etc anywhere... In general, how do you just 'do' a line of calculations to modify a variable in FS gauge XML?? I need to 'operate' the following two functions - they are INSIDE a <case value> system because I need the numbers to be slightly different depending on the mode... (A:AMBIENT TEMPERATURE,kelvin) 256 - -0.166 * 94.04 + (>L:N1_max,enum) (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET)Cheers,Geoff

Share this post


Link to post
Share on other sites
Ok, so can somebody write in how to do this? I cannot find any decent examples of this in tutorials etc anywhere... In general, how do you just 'do' a line of calculations to modify a variable in FS gauge XML?? I need to 'operate' the following two functions - they are INSIDE a <case value> system because I need the numbers to be slightly different depending on the mode... (A:AMBIENT TEMPERATURE,kelvin) 256 - -0.166 * 94.04 + (>L:N1_max,enum) (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET)Cheers,Geoff
Ok - I think I have to do this by using <Value> statements with IF and ELSE statements inside...<Element><Select><Value>Variable1 Variable2 [Operation] if{ (code to do if the 1st bit is TRUE) } els{ (code to do if the 1st bit is FALSE) }</Value></Select></Element>With this, I get to the following bits of code but they are still not working (all are within their own <Element> / <Select> tags) - can anybody tell me how they should be written?<Value>(L:TRP_state, enum) 0 & if{ 1 (>L:TRP_state) 92 (>L:TRP_offset, enum)}</Value>Here I want to look if L:TRP_state is 0 (it could also be 1,2 or 3) to set the default if there is no mode set. The values to set here are L:TRP_state to 1 and also set L:TRP_offset to 92. During the rest of the gauge operation, these are both set by clickable buttons (which is working fine)<Value>(L:TRP_MASTER,enum) 1 & if{((A:AMBIENT TEMPERATURE,kelvin) 256 - 0.166 * (L:TRP_offset, enum) +) (>L:TRP_N1_Max,enum)}</Value>Now I want to check if the L:TRP_MASTER is set to 1. If it is, I want to calculate the L:TRP_N1_Max variable to (A:AMBIENT TEMPERATURE,kelvin) - 256 * 0.166 + (L:TRP_offset, enum) (setting that in a string reads out the right number)<Value>(L:TRP_MASTER,enum) 1 & if{(((L:TRP_N1_Max,enum) 0.996 / 24.9 - 95 /) (>L:TRP_Set,enum))} els{(1 (>L:TRP_Set,enum))}</Value>Again, I need to see if the L:TRP_MASTER is set to 1. If it is set to 1, I want to set the L:TRP_Set variable to be (L:TRP_N1_Max,enum) / 0.996 - 24.9 / 95 (again, setting that in a string reads out the right number). If the setting of tha master switch is 0, I want to set the (L:TRP_Set,enum) to 1Cheers for any coding advice,GeoffPS: If there are tutorials out there that explain the syntax of these things, please tell me. I can find examples that I dont understand and then incomplete ones at fs2x which refer all the time to more advanced tutorials which were never written...

Share this post


Link to post
Share on other sites
Ok - I think I have to do this by using <Value> statements with IF and ELSE statements inside...<Element><Select><Value>Variable1 Variable2 [Operation] if{ (code to do if the 1st bit is TRUE) } els{ (code to do if the 1st bit is FALSE) }</Value></Select></Element>With this, I get to the following bits of code but they are still not working (all are within their own <Element> / <Select> tags) - can anybody tell me how they should be written?<Value>(L:TRP_state, enum) 0 & if{ 1 (>L:TRP_state) 92 (>L:TRP_offset, enum)}</Value>Here I want to look if L:TRP_state is 0 (it could also be 1,2 or 3) to set the default if there is no mode set. The values to set here are L:TRP_state to 1 and also set L:TRP_offset to 92. During the rest of the gauge operation, these are both set by clickable buttons (which is working fine)<Value>(L:TRP_MASTER,enum) 1 & if{((A:AMBIENT TEMPERATURE,kelvin) 256 - 0.166 * (L:TRP_offset, enum) +) (>L:TRP_N1_Max,enum)}</Value>Now I want to check if the L:TRP_MASTER is set to 1. If it is, I want to calculate the L:TRP_N1_Max variable to (A:AMBIENT TEMPERATURE,kelvin) - 256 * 0.166 + (L:TRP_offset, enum) (setting that in a string reads out the right number)<Value>(L:TRP_MASTER,enum) 1 & if{(((L:TRP_N1_Max,enum) 0.996 / 24.9 - 95 /) (>L:TRP_Set,enum))} els{(1 (>L:TRP_Set,enum))}</Value>Again, I need to see if the L:TRP_MASTER is set to 1. If it is set to 1, I want to set the L:TRP_Set variable to be (L:TRP_N1_Max,enum) / 0.996 - 24.9 / 95 (again, setting that in a string reads out the right number). If the setting of tha master switch is 0, I want to set the (L:TRP_Set,enum) to 1Cheers for any coding advice,GeoffPS: If there are tutorials out there that explain the syntax of these things, please tell me. I can find examples that I dont understand and then incomplete ones at fs2x which refer all the time to more advanced tutorials which were never written...
Perhaps I can use <update> sections instead for this? Can I set K: variables in my updates?Geoff#

Share this post


Link to post
Share on other sites

Hello!There are some sintax errors. As far as I know L:Vars has to have messurements units after its name, parenthesis like "((L:...))" are only allowed in the strigs sintax, "(((...)))" are not allowed anywhere neither to write to L:Vars and there's got to be spaces betwen { and } and the text in whitin. Thats what I could notice in your code.Javier

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...