For aircraft designers

First, aircraft designers must tell X-Plane whether the cockpit flight controls are linked (most small aircraft, Boeing aircraft, older non-FBW Airbus aircraft) or are electronically added (new Airbus and other FBW aircraft with stick input). To animate the cockpit controls correctly the following datarefs should be used:

  • For linked (“Boeing”) flight controls, the pilot side yoke/stick should be animated with sim/cockpit2/controls/total_pitch_ratio and sim/cockpit2/controls/total_roll_ratio. The co-pilot side yoke/stick should use sim/cockpit2/controls/total_pitch_ratio_copilot and sim/cockpit2/controls/total_roll_ratio_copilot. X-Plane will ensure the controls move together based on flight control linkage, and with autopilot input.
  • For independent (“Airbus”) flight controls, the pilot side stick should be animated with sim/cockpit2/controls/yoke_pitch_ratio and sim/cockpit2/controls/yoke_roll_ratio. The co-pilot side stick should be animated using sim/cockpit2/controls/yoke_pitch_ratio_copilot and sim/cockpit2/controls/yoke_roll_ratio_copilot. X-Plane will ensure the control inputs are added or filtered as needed and also not deflect the sticks with the autopilot. See below for commands for the priority pushbuttons.

For animating the flight control surfaces on the wings and tail, it is imperative that the correct animation datarefs are used on each wing, and not simply animations mirrored between right and left or keyframed for differential deflections. Please refer to the article on wings on how to animate flight control surfaces. If in doubt, you can use the X-Plane flight model output (Ctrl+M) to visualize the control forces and then make sure the physics model matches your animations when the flight controls are split.

For cockpit builders

X-Plane supports assignment of joystick hardware axes to roll, pitch and yaw controls for both the pilot and the copilot side. The default axes, named “Roll”, “Pitch” and “Yaw” should be assigned for the flight control hardware installed on the pilot’s side. The copilot flight control hardware should be assigned the axes “Copilot Roll”, “Copilot Pitch” and “Copilot Yaw”.

  • For linked (“Boeing”) flight controls, the greater deflection wins. This means that both mechanically linked hardware, as well as electronically linked control-loading hardware will work.
    • Electronically control-loading hardware should watch the datarefs sim/cockpit2/controls/torque_tube_split_roll and sim/cockpit2/controls/torque_tube_split_pitch to know whether the control deflections between both sides should be synced. In some cockpits, there is a red handle that allows the splitting of the flight controls in case of failure. If this handle is present in hardware in the cockpit, it would change one or both of these datarefs to tell X-Plane about the split, and these datarefs should tell the control loading software to stop syncing the movements between pilot and copilot side in the respective axis.
    • In some airplanes, flight controls are split not by pulling a handle, but by force applied to the flight controls in opposite directions. X-Plane detects this force if the pilot/copilot controls are deflected away from the center in opposite directions. Moving one side while the other remains centered will not cause this force. If the opposing deflections are strong enough, the datarefs sim/cockpit2/controls/torque_tube_split_roll and sim/cockpit2/controls/torque_tube_split_pitch will indicate the split in the respective axis.
  • For independent (“Airbus”) flight controls, the pilot and copilot deflections are added algebraically. It is also possible to gain priority by triggering the commands sim/autopilot/priority_pb_left or sim/autopilot/priority_pb_right respectively, in which case the last pressed side wins priority for as long as the button is held. The opposite side is then ignored until the button is released. It is also possible to hold the button for 40 seconds, in which case the priority will remain even when the button is subsequently released. The current priority can be read from the dataref sim/joystick/priority_side int y enum 0 = Normal, 1 = Priority Left, 2 = Priority Right which can be used to drive the according lights or callouts announcing priority.

For plugin developers

Plugins for cooperative multiplayer flying (“shared cockpit”) should use the overrides sim/operation/override/override_joystick_heading_copilot, sim/operation/override/override_joystick_pitch_copilot, and sim/operation/override/override_joystick_roll_copilot to then write to the datarefs sim/cockpit2/controls/yoke_heading_ratio_copilot, sim/cockpit2/controls/yoke_pitch_ratio_copilot, and sim/cockpit2/controls/yoke_roll_ratio_copilot to get remote flight control input into X-Plane. This will work both with “Boeing”-type aircraft, where the control inputs will not be added (largest deflection wins) and with “Airbus”-type aircraft, where the control inputs will be added. In both cases, if the flight control hardware is reasonably well calibrated, a centered joystick will not alter any input generated by the deflected joystick. If a single-sided takeover of the flight controls is desired, the plugin should use the sim/joystick/priority_side dataref, which will also work in the “Boeing”-case, to suppress input from one side.