Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?
-
The autopilot master button is just (>K:AP_MASTER). The autopilot disconnect can be done with either the native (>K:AUTOPILOT_DISENGAGE_TOGGLE), though be aware that this is a toggling function, so you will have to press that button again to reengage the autopilot. If you want more custom functionality, then the following RNP code will do the trick.
(A:AUTOPILOT MASTER, bool) if{ (>K:AP_MASTER) (A:AUTOPILOT YAW DAMPER, Bool) if{ (>K:YAW_DAMPER_TOGGLE) } } els{ (A:AUTOPILOT FLIGHT DIRECTOR ACTIVE, Bool) if{ (>K:TOGGLE_FLIGHT_DIRECTOR) } }
Sorry that my older aircraft are not quite as easy to interface with as the newer ones. I hope that solves your problem, though. Please let me know how it goes!
-
The autopilot master button is just (>K:AP_MASTER)
Works differently than clicking on AP ENG with mouse!
Clicking AP ENG with the mouse activates “YAW ENG” as well.
Further, if additional AP functions are activated, e.g. -HDG, NAV, etc., then when you disable AP by clicking on AP ENG - everything is disabled!When activating and deactivating AP through the event- (>K:AP_MASTER):
- YAW ENG is not activated
- Deactivating AP does not disable additional AP functions (HDG, NAV, etc.)
Here is the videos:
- When controlling “AP ENG” with the mouse
https://youtu.be/pKqobwmYEYc
When controlling via (>K:AP_MASTER)
https://youtu.be/D3HA0iRtGNE
following RNP code will do the trick.
(A:AUTOPILOT MASTER, bool) if{
(>K:AP_MASTER)
(A:AUTOPILOT YAW DAMPER, Bool) if{ (>K:YAW_DAMPER_TOGGLE) }
}
els{
(A:AUTOPILOT FLIGHT DIRECTOR ACTIVE, Bool) if{ (>K:TOGGLE_FLIGHT_DIRECTOR) }This code for "PITCH TRIM AP/YD" on yoke works great!
-
Perhaps I should have asked how familiar you were with the RPN code. Some of my users are not sure what to do with it when I give it to them, so I try to simplify things into mostly native commands. Since the other code worked well for you, here is the code for the AP master button that will have the exact functionality you're looking for.
(A:AUTOPILOT MASTER,bool) ! if{ (>K:AP_MASTER) (A:AUTOPILOT YAW DAMPER, Bool) ! if{ (>K:YAW_DAMPER_TOGGLE) } (>K:AP_HDG_HOLD_OFF) (>K:AP_NAV1_HOLD_OFF) (>K:AP_APR_HOLD_OFF) (>K:AP_ALT_HOLD_OFF) (>K:AP_LOC_HOLD_OFF) (>K:AP_FLIGHT_LEVEL_CHANGE_OFF) 0 (>L:var_iasHoldMode, bool) } els{ (>K:AP_MASTER) (A:AUTOPILOT YAW DAMPER, Bool) if{ (>K:YAW_DAMPER_TOGGLE) } (A:AUTOPILOT FLIGHT DIRECTOR ACTIVE, Bool) if{ (>K:TOGGLE_FLIGHT_DIRECTOR) } 2 (>L:BKSQ_AUTOPILOT_DISCONNECT_SOUND, bool) (>K:AP_HDG_HOLD_OFF) (>K:AP_NAV1_HOLD_OFF) (>K:AP_APR_HOLD_OFF) (>K:AP_ALT_HOLD_OFF) (>K:AP_LOC_HOLD_OFF) (>K:AP_FLIGHT_LEVEL_CHANGE_OFF) 0 (>L:var_iasHoldMode, bool) }
Let me know how that goes for you!
-
@Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:
Let me know how that goes for you!
This RPN code works great as well!
Thank you very much!
Great mod and support!P.S
Maybe you can give me the RPN codes for:- “CLIMB” and "DSC" buttons.
- Rocker switch UP-DN
-
Glad it worked for you. No problem!
Climb:(L:var_iasHoldMode, bool) if{ 0 (>L:var_iasHoldMode, bool) (A:INDICATED ALTITUDE, FEET) 30000 > if{ 120 (>K:AP_SPD_VAR_SET) } els{ (A:INDICATED ALTITUDE, FEET) 30000 > if{ 140 (>K:AP_SPD_VAR_SET) } els{ 160 (>K:AP_SPD_VAR_SET) } } } els{ (>K:FLIGHT_LEVEL_CHANGE) (A:INDICATED ALTITUDE, FEET) 30000 > if{ 120 (>K:AP_SPD_VAR_SET) } els{ (A:INDICATED ALTITUDE, FEET) 30000 > if{ 140 (>K:AP_SPD_VAR_SET) } els{ 160 (>K:AP_SPD_VAR_SET) } } }
Descend:
(L:var_iasHoldMode, bool) if{ 0 (>L:var_iasHoldMode, bool) 262 (A:INDICATED ALTITUDE, FEET) 0.001926 * - 10 - (>K:AP_SPD_VAR_SET) } els{ (>K:FLIGHT_LEVEL_CHANGE) 262 (A:INDICATED ALTITUDE, FEET) 0.001926 * - 10 - (>K:AP_SPD_VAR_SET) }
Rocker Up:
(A:CIRCUIT ON:29, bool) if{ (A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{ 1 (>L:var_iasHoldMode, bool) (>K:AP_SPD_VAR_INC) } els{ (>K:AP_VS_VAR_INC) } }
Rocker Down:
(A:CIRCUIT ON:29, bool) if{ (A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{ 1 (>L:var_iasHoldMode, bool) (>K:AP_SPD_VAR_DEC) } els{ (>K:AP_VS_VAR_DEC) } }
-
No problem!
IAS:
(A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{ (L:var_iasHoldMode, bool) if{ (>K:FLIGHT_LEVEL_CHANGE) 0 (>L:var_iasHoldMode, bool) } els{ (A:AIRSPEED INDICATED, knots) (>K:AP_SPD_VAR_SET) 1 (>L:var_iasHoldMode, bool) } } els{ (>K:FLIGHT_LEVEL_CHANGE) (A:AIRSPEED INDICATED, knots) (>K:AP_SPD_VAR_SET) 1 (>L:var_iasHoldMode, bool) }
The pitch sync button is not implemented in the currently public version of the King Air as it is in my newer aircraft, but you might have some luck with the following native command:
(>K:SYNC_FLIGHT_DIRECTOR_PITCH)
-
Thanks!
And one more thing...:-)
Code for quickly switch the view of this AP panel ?
https://youtu.be/lYp-W9GI5uQ
It is convenient to quickly see which AP modes are in use. -
Easy! Just toggle (L:var_optionalAutopilotModePanel, bool). Enjoy! Glad this has all been working for you so well.
-
@Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:
Easy! Just toggle (L:var_optionalAutopilotModePanel, bool)
AP_Panel_View#(L:var_optionalAutopilotModePanel, bool)
Hmmm... this code doesn't work :-( -
I'm not sure what the scripting looks like in FSUIPC, but if I were to give you RPN code to toggle the panel on and off the same way I did for the others, it would look like this:
(L:var_optionalAutopilotModePanel, bool) ! (>L:var_optionalAutopilotModePanel, bool)
-
@Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:
I'm not sure what the scripting looks like in FSUIPC, but if I were to give you RPN code to toggle the panel on and off the same way I did for the others, it would look like this:
(L:var_optionalAutopilotModePanel, bool) ! (>L:var_optionalAutopilotModePanel, bool)
Wow, it works!
I guess FSUIPC requires RPN codes. -
Actually, if I take a guess at what you might have been trying to do with FSUIPC above, you might be able to get your code to work with the addition of one character, if it was useful to you.
AP_Panel_View#(>L:var_optionalAutopilotModePanel, bool)
The ">" means that you would like to write the preceding value to the L:Var, not simply read it.
-
@Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:
The ">" means that you would like to write the preceding value to the L:Var, not simply read it.
Checked
(>L:var_optionalAutopilotModePanel, bool)This code only switches the view from:
to this:
It doesn't switch back!
-
I have simplified this one already in the next version of the King Air that has yet to be released, but to be safe, here is the full code:
OPEN: (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 0 (>L:var_environmentalBleedDisabled_L, bool) } 0 (>L:var_bleedState_L, number) ENVIR OFF: (A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 1 (>L:var_bleedState_L, number) ALL OFF: (A:CIRCUIT ON:78, bool) if{ 0 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 1 (>L:var_environmentalBleedDisabled_L, bool) } 2 (>L:var_bleedState_L, number)
Just replace the "_L" with "_R" for the right-hand engine.
-
@Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:
here is the full code
-
@Black-Square said in Black Air King Air 350- "PITCH TRIM AP/YD" и " AP ENG" events ?:
Just replace the "_L" with "_R" for the right-hand engine.
Correction after testing...
The left one is fine, but the right one.... problem!For the right-hand engine I replace the "_L" with "_R" (as you wrote):
OPEN:
(A:CIRCUIT ON:78, bool) if{ 1 1 (>K:2:ENGINE_BLEED_AIR_SOURCE_SET) 0 (>L:var_environmentalBleedDisabled_R, bool) } 0 (>L:var_bleedState_R, number)
When controlling the mouse - switch animation and indication "R BL AIR OFF" everything is normal.
But when controlling from the assigned RPN code - the switch animation works visually normally, but the "R BL AIR OFF" display does not go out!Video:
https://youtu.be/lgZ4bfgMBck -
I'm sorry. That's my fault. You also need to change the last number before the "(>K:2:..."
For the right engine, the three lines should contain...
if{ 0 2 (>K:... if{ 1 2 (>K:... if{ 1 2 (>K:...
I hope that makes sense! Let me know.