March 26, 200620 yr Hi all Can't get the maths right in this code. (L:VNAV,bool) 1 == if{ (L:Var9,number) 0 == ! (A:Indicated Altitude, feet) 10000 < && if{ 240 } } (L:Var9,number) 0 == ! (A:Indicated Altitude, feet) 10000 > && if{ 280 } (L:Var9,number) 0 == (A:Indicated Altitude, feet) s0 26000 < l0 20000 > && && if{ 310 } (L:Var9,number) 0 == (A:Indicated Altitude, feet) 26000 > && if{ 0.77 } This macro gives all the correct numbers in test gauge and sets the airspeeds OK but the last one 0.77 for setting the mach with (>K:AP_MACH_VAR_SET) gives . 1 in ((A:Autopilot mach hold var, mach) 100 * 99 min ) string. Paul EGLD
March 27, 200620 yr (L:VNAV,bool) 1 == if{ (L:Var9,number) 0 == ! (A:Indicated Altitude, feet) 10000 < && if{ 240 } } ****Is this bracket right?(L:Var9,number) 0 == ! (A:Indicated Altitude, feet) 10000 > && if{ 280 } (L:Var9,number) 0 == (A:Indicated Altitude, feet) s0 26000 < l0 20000 > && && if{ 310 } (L:Var9,number) 0 == (A:Indicated Altitude, feet) 26000 > && if{ 0.77 } ****..or should be here?(L:Var9,number) 0 == is ok or should be always 0 == ! ??And how are you assigning the value to (>K:AP_MACH_VAR_SET) ?Tom
March 27, 200620 yr Author Hi Tom Thanks for your help yet again. You are right the brackets should be at the end. This is the loading code:- (L:VNAV,bool) 1 == if{ (L:Mach-IAS select, bool) if{ @AltSpeedSet (>K:AP_MACH_VAR_SET) } els{ @AltSpeedSet (>K:AP_SPD_VAR_SET) } } Paul EGLD
March 27, 200620 yr Hi,You will have a lot of K-firing with this code.May be this "trick" will help you:(A:AUTOPILOT MACH HOLD VAR,mach) 100 * 69 < (A:AUTOPILOT MACH HOLD VAR,mach) 100 * 71 > | if{ 70 (>K:AP_MACH_VAR_SET) } els{ 0 } Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
March 27, 200620 yr Author Jan Use this for firing, seems OK but will recheck(A:Indicated Altitude,feet) s0 26000 < l0 25980 > && (L:CLB,bool) && if{ 1 (>L:Mach-IAS select, bool) 1 (>K:AP_PANEL_MACH_HOLD) }(A:Indicated Altitude,feet) s0 23500 < l0 23480 > && (L:DES,bool) && if{ 0 (>L:Mach-IAS select, bool) 1 (>K:AP_PANEL_SPEED_HOLD) } Paul EGLD
March 27, 200620 yr Author Jan It was firing, I used your code to fix it and modified it slightly to allow changing the the mach value in the fmc. Thanks again! (L:VNAV,bool) 1 == if{ (L:Mach-IAS select, bool) 1 == if{ (A:AUTOPILOT MACH HOLD VAR,mach) 100 * @AltSpeedSet 1 - < (A:AUTOPILOT MACH HOLD VAR,mach) 100 * @AltSpeedSet 1 + > | if{ @AltSpeedSet (>K:AP_MACH_VAR_SET) } els{ 0 } Paul EGLD
Create an account or sign in to comment