Sign in to follow this  
pve

Setting mach Var

Recommended Posts

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.

Share this post


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

(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

Share this post


Link to post
Share on other sites

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) } }

Share this post


Link to post
Share on other sites

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..."

Share this post


Link to post
Share on other sites

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) }

Share this post


Link to post
Share on other sites

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 }

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