November 23, 200916 yr Author 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.JavierGot it working - thanks very much for spotting my mistakes :( Now time for some flight testing to see if my limiter behaves itself...Geoff
November 24, 200916 yr Author Got it working - thanks very much for spotting my mistakes :( Now time for some flight testing to see if my limiter behaves itself...GeoffOk, thanks for the help - it mostly works... The throttles are limited in manual mode (I cannot push the N1 above the setting) but in autothrottle commanded mode, the AT always overrides the gauge setting and runs the engines too hard. Actually, that is ok since the climb phase with this aircraft can be done on the limiter with the AT only being deployed for cruise and descent. However, if anyone is clued up on FS gauges and also bored enough to have a quick look at the code... perhaps they can suggest something to apply to the autothrottles also.<Gauge Name="GC_BAe_TRP" Version="1.0"><Update Frequency="6"/><Image Name="TRP_Back2"/><!--Set initial default modes - only at panel loading--><Update>(L:Init,bool) 0 == if{ 91.04 (>L:TRP_offset, enum) 1 (>L:TRP_state, enum) 1 (>L:Init,bool) }</Update><!--Calculate mode offset with pressure altitude correction--><Element><Select><Value>(L:TRP_MASTER, enum) 1 == if{ (A:PRESSURE ALTITUDE, feet) 3174 / (L:TRP_offset, enum) + (>L:TRP_mod, enum) }</Value></Select></Element><!--Calculate max N1 for temperature and mode--><Element><Select><Value>(L:TRP_MASTER, enum) 1 == if{ (A:AMBIENT TEMPERATURE, celsius) 0.166 * (L:TRP_mod, enum) + (>L:TRP_N1_Max, enum) (A:PRESSURE ALTITUDE, feet) -0.0006 * 94 + (>L:TRP_Z_Max, enum) }</Value></Select></Element><!--Calculate max throttle position for given max N1--><Element><Select><Value>(L:TRP_MASTER, enum) 1 == if{ (L:TRP_N1_Max, enum) 28 - (L:TRP_Z_Max, enum) / 1.016 * (>L:TRP_Set, enum) } els{ 1 (>L:TRP_Set, enum) }</Value></Select></Element><!--Condition of MASTER switch--><Element><Position X="16" Y="16"/> <Select> <Value>(L:TRP_MASTER, enum)</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_Master_on" ImageSizes="21,13" Bright="Yes"/> </Case> </Select></Element><!--Condition of TOGA switch--><Element><Position X="16" Y="40"/> <Select> <Value>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_On" ImageSizes="21,13" Bright="Yes"/> </Case> <Case Value="2"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="3"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> </Select></Element><!--Condition of MCT switch--><Element><Position X="41" Y="40"/> <Select> <Value>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="2"> <Image Name="GC_BAe_TRP_On" ImageSizes="21,13" Bright="Yes"/> </Case> <Case Value="3"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> </Select></Element><!--Condition of CLMB switch--><Element><Position X="65" Y="40"/> <Select> <Value>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="2"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="3"> <Image Name="GC_BAe_TRP_On" ImageSizes="21,13" Bright="Yes"/> </Case> </Select></Element><!--Set and limit Throttle 1--><Element><Select><Value>(A:GENERAL ENG1 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE1_SET) }</Value></Select></Element><!--Set and limit Throttle 2--><Element><Select><Value>(A:GENERAL ENG2 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE2_SET) }</Value></Select></Element><!--Set and limit Throttle 3--><Element><Select><Value>(A:GENERAL ENG3 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE3_SET) }</Value></Select></Element><!--Set and limit Throttle 4--><Element><Select><Value>(A:GENERAL ENG4 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE4_SET) }</Value></Select></Element><!--Set and limit Throttles when autothrottle is live // doesnt work--><Element><Select><Value>(A:GENERAL ENG THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE_SET) }</Value></Select></Element><!--Show the N1 Setting window--><Element><Visible>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Visible><Position X="47" Y="15"/><Text X="37" Y="19" Bright="Yes" Length="11" Font="Quartz" Color="orange" Adjust="Center" VerticalAdjust="Center"><String>%((L:TRP_N1_Max, enum))%!2.1f!</String></Text></Element><Mouse><!--Mouse clickpoints and settings--><!--MASTER--> <Area Left="16" Top="16" Width="21" Height="13"> <Cursor Type="Hand"/> <Click>(L:TRP_MASTER, enum) 1 - abs (>L:TRP_MASTER, enum)</Click> </Area><!--TOGA Mode--> <Area Left="16" Top="40" Width="21" Height="10"> <Cursor Type="Hand"/> <Click>1 (>L:TRP_state, enum) 91.04 (>L:TRP_offset, enum)</Click> </Area><!--MCT Mode--> <Area Left="41" Top="40" Width="21" Height="10"> <Cursor Type="Hand"/> <Click>2 (>L:TRP_state, enum) 93.11 (>L:TRP_offset, enum)</Click> </Area><!--CLMB Mode--> <Area Left="65" Top="40" Width="21" Height="10"> <Cursor Type="Hand"/> <Click>3 (>L:TRP_state, enum) 89 (>L:TRP_offset, enum)</Click> </Area></Mouse></Gauge> Cheers,Geoff
November 24, 200916 yr Ok, thanks for the help - it mostly works... The throttles are limited in manual mode (I cannot push the N1 above the setting) but in autothrottle commanded mode, the AT always overrides the gauge setting and runs the engines too hard. Actually, that is ok since the climb phase with this aircraft can be done on the limiter with the AT only being deployed for cruise and descent. However, if anyone is clued up on FS gauges and also bored enough to have a quick look at the code... perhaps they can suggest something to apply to the autothrottles also.<Gauge Name="GC_BAe_TRP" Version="1.0"><Update Frequency="6"/><Image Name="TRP_Back2"/><!--Set initial default modes - only at panel loading--><Update>(L:Init,bool) 0 == if{ 91.04 (>L:TRP_offset, enum) 1 (>L:TRP_state, enum) 1 (>L:Init,bool) }</Update><!--Calculate mode offset with pressure altitude correction--><Element><Select><Value>(L:TRP_MASTER, enum) 1 == if{ (A:PRESSURE ALTITUDE, feet) 3174 / (L:TRP_offset, enum) + (>L:TRP_mod, enum) }</Value></Select></Element><!--Calculate max N1 for temperature and mode--><Element><Select><Value>(L:TRP_MASTER, enum) 1 == if{ (A:AMBIENT TEMPERATURE, celsius) 0.166 * (L:TRP_mod, enum) + (>L:TRP_N1_Max, enum) (A:PRESSURE ALTITUDE, feet) -0.0006 * 94 + (>L:TRP_Z_Max, enum) }</Value></Select></Element><!--Calculate max throttle position for given max N1--><Element><Select><Value>(L:TRP_MASTER, enum) 1 == if{ (L:TRP_N1_Max, enum) 28 - (L:TRP_Z_Max, enum) / 1.016 * (>L:TRP_Set, enum) } els{ 1 (>L:TRP_Set, enum) }</Value></Select></Element><!--Condition of MASTER switch--><Element><Position X="16" Y="16"/> <Select> <Value>(L:TRP_MASTER, enum)</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_Master_on" ImageSizes="21,13" Bright="Yes"/> </Case> </Select></Element><!--Condition of TOGA switch--><Element><Position X="16" Y="40"/> <Select> <Value>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_On" ImageSizes="21,13" Bright="Yes"/> </Case> <Case Value="2"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="3"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> </Select></Element><!--Condition of MCT switch--><Element><Position X="41" Y="40"/> <Select> <Value>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="2"> <Image Name="GC_BAe_TRP_On" ImageSizes="21,13" Bright="Yes"/> </Case> <Case Value="3"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> </Select></Element><!--Condition of CLMB switch--><Element><Position X="65" Y="40"/> <Select> <Value>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Value> <Case Value="0"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="1"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="2"> <Image Name="GC_BAe_TRP_Off" ImageSizes="21,13" Bright="No"/> </Case> <Case Value="3"> <Image Name="GC_BAe_TRP_On" ImageSizes="21,13" Bright="Yes"/> </Case> </Select></Element><!--Set and limit Throttle 1--><Element><Select><Value>(A:GENERAL ENG1 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE1_SET) }</Value></Select></Element><!--Set and limit Throttle 2--><Element><Select><Value>(A:GENERAL ENG2 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE2_SET) }</Value></Select></Element><!--Set and limit Throttle 3--><Element><Select><Value>(A:GENERAL ENG3 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE3_SET) }</Value></Select></Element><!--Set and limit Throttle 4--><Element><Select><Value>(A:GENERAL ENG4 THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE4_SET) }</Value></Select></Element><!--Set and limit Throttles when autothrottle is live // doesnt work--><Element><Select><Value>(A:GENERAL ENG THROTTLE LEVER POSITION, enum) (L:TRP_Set, enum) > if{ (L:TRP_Set,enum) 16834 * (>K:THROTTLE_SET) }</Value></Select></Element><!--Show the N1 Setting window--><Element><Visible>(L:TRP_state, enum) (L:TRP_MASTER, enum) *</Visible><Position X="47" Y="15"/><Text X="37" Y="19" Bright="Yes" Length="11" Font="Quartz" Color="orange" Adjust="Center" VerticalAdjust="Center"><String>%((L:TRP_N1_Max, enum))%!2.1f!</String></Text></Element><Mouse><!--Mouse clickpoints and settings--><!--MASTER--> <Area Left="16" Top="16" Width="21" Height="13"> <Cursor Type="Hand"/> <Click>(L:TRP_MASTER, enum) 1 - abs (>L:TRP_MASTER, enum)</Click> </Area><!--TOGA Mode--> <Area Left="16" Top="40" Width="21" Height="10"> <Cursor Type="Hand"/> <Click>1 (>L:TRP_state, enum) 91.04 (>L:TRP_offset, enum)</Click> </Area><!--MCT Mode--> <Area Left="41" Top="40" Width="21" Height="10"> <Cursor Type="Hand"/> <Click>2 (>L:TRP_state, enum) 93.11 (>L:TRP_offset, enum)</Click> </Area><!--CLMB Mode--> <Area Left="65" Top="40" Width="21" Height="10"> <Cursor Type="Hand"/> <Click>3 (>L:TRP_state, enum) 89 (>L:TRP_offset, enum)</Click> </Area></Mouse></Gauge> Cheers,Geoff Hi GeoffYou can use this for manual max n1 setting<Element> <Select> <Value>(A:TURB ENG1 CORRECTED N1, percent) 79.0 > (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 60 > & (L:N1_max,enum) 75 > & (A:Radio height, feet) 2500 < & if{ (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET) }</Value> </Select> </Element>Where CORRECTED N1, percent, N1_max,enum 75 > & THROTTLE LEVER POSITION,percent position are the threshold for engagement, Radio height, feet is end of TO max n1 restriction. Above the Radio height the throttle works normally You can play with all the threshold setting to suit your needs Paul EGLD
November 24, 200916 yr Author Hi GeoffYou can use this for manual max n1 setting<Element> <Select> <Value>(A:TURB ENG1 CORRECTED N1, percent) 79.0 > (A:GENERAL ENG1 THROTTLE LEVER POSITION,percent) 60 > & (L:N1_max,enum) 75 > & (A:Radio height, feet) 2500 < & if{ (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE_SET) }</Value> </Select> </Element>Where CORRECTED N1, percent, N1_max,enum 75 > & THROTTLE LEVER POSITION,percent position are the threshold for engagement, Radio height, feet is end of TO max n1 restriction. Above the Radio height the throttle works normally You can play with all the threshold setting to suit your needsThanks. But I'm not sure that does what I want... I am looking for a system that will prevent the throttles going above a certain threshold which is set different in TOGA and CLMB modes depending on temperature. The setting of these values is sorted, as is the algorithm which converts the N1 setting into a throttle position at given pressure altitude...Your code looks like it waits until the throttles are advanced for TO and then sets the max N1 and holds it until above 2500 ft AGL...Are you suggesting though that I could implement the code and have something like this?<Value>(A:TURB ENG1 CORRECTED N1, percent) (L:N1_max,enum) > if{ (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE1_SET) }</Value>I think the reason that my gauge is ignored by the autothrottle is that the AT does not control the (A:GENERAL ENG1 THROTTLE LEVER POSITION, enum) variables...Cheers,Geoff
November 24, 200916 yr Thanks. But I'm not sure that does what I want... I am looking for a system that will prevent the throttles going above a certain threshold which is set different in TOGA and CLMB modes depending on temperature. The setting of these values is sorted, as is the algorithm which converts the N1 setting into a throttle position at given pressure altitude...Your code looks like it waits until the throttles are advanced for TO and then sets the max N1 and holds it until above 2500 ft AGL...Are you suggesting though that I could implement the code and have something like this?<Value>(A:TURB ENG1 CORRECTED N1, percent) (L:N1_max,enum) > if{ (L:N1_max,enum) 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE1_SET) }</Value>I think the reason that my gauge is ignored by the autothrottle is that the AT does not control the (A:GENERAL ENG1 THROTTLE LEVER POSITION, enum) variables...Cheers,GeoffHi GeoffWill this help (L:max_n1 TAGO,number) (L:max_n1 Climb,number) (L:your pressure/temp change at value etc.) > ? 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE1_SET)where above or below your (L:your pressure/temp change value) the code will change from (L:max_n1 TAGO,number) to (L:max_n1 Climb,number) Paul EGLD
November 25, 200916 yr Author Hmmm. I think it will do the same as my code does already. Currently, the big lump of code that I posted does actually work very well for limiting the throttles when I am using the keyboard or my CH-throttle quadrant. In this respect, the gauge is finished and working in the expected way...However, the autothrottle is problematic... it just seems that the autothrottle ignores the gauge setting and pushes the throttles too hard. I think this is because the (A:GENERAL ENG1 THROTTLE LEVER POSITION, enum) value is not what the autothrottle sets and so my code does not catch that the throttle is above the allowed range... I wonder if somebody can tell me what A: variable will output the thrust being set from the autothrottle?Geoff
November 30, 200916 yr Hi GeoffWill this help (L:max_n1 TAGO,number) (L:max_n1 Climb,number) (L:your pressure/temp change at value etc.) > ? 0.996 / 24.9 - 95 / 16384 * int (>K:THROTTLE1_SET)where above or below your (L:your pressure/temp change value) the code will change from (L:max_n1 TAGO,number) to (L:max_n1 Climb,number)Excuse me. I'm still trying to figure out what the values like 0.996 are for in the calculation of max N1, can some one explain please?Javier
Create an account or sign in to comment