Main Content

Pilot Joystick

Provide joystick interface on Windows platform

  • Pilot Joystick block

Libraries:
Aerospace Blockset / Animation / Animation Support Utilities

Description

The Pilot Joystick block provides a pilot joystick interface for a Windows® platform. Roll, pitch, yaw, and throttle are mapped to the joystick X, Y, R, and Z channels respectively.

You can also configure the block to output all channels by setting the Output configuration parameter to AllOutputs. For more information, see Pilot Joystick All. The Pilot Joystick and Pilot Joystick All blocks are identical blocks with different Output configuration default settings.

This block does not produce deployable code.

Limitations

  • The Pilot Joystick block is not supported in Simulink Online.

  • If the joystick does not support an R (rudder or twist) channel, yaw output is set to zero. Outputs are of type double, except when Joystick ID is set to AllOutputs mode, which is a uint32 flagword of bits. On non Microsoft® platforms, this block outputs zeros.

  • Pitch value has the opposite sense as that delivered by the FlightGear joystick interface.

Ports

Output

expand all

Roll command, specified in the range [-1, 1], that corresponds to the joystick left and right directions.

Dependencies

To enable this port, set Output configuration to FourAxis.

Data Types: double

Pitch command, specified in the range [-1, 1], that corresponds to the joystick forward or down and back and up directions.

Dependencies

This output port is enabled when the Output configuration parameter is set to FourAxis.

Data Types: double

Yaw command, specified in the range [-1, 1], that corresponds to the joystick twist left and twist right directions.

Dependencies

To enable this port, set Output configuration to FourAxis.

Data Types: double

Throttle command, specified in the range [0, 1], that corresponds to the joystick min and max position.

Dependencies

To enable this port, set Output configuration to FourAxis.

Data Types: double

Parameters

expand all

Specify the joystick ID as

  • Joystick1

  • Joystick2

  • Joystick3

  • Joystick4

  • Joystick5

  • Joystick6

  • Joystick7

  • Joystick8

  • Joystick9

  • Joystick10

  • Joystick11

  • Joystick12

  • Joystick13

  • Joystick14

  • Joystick15

  • Joystick16

  • None

Programmatic Use

Block Parameter: JoystickID
Type: character vector
Values: Joystick1 | Joystick2 | Joystick3 | Joystick4 | Joystick5 | Joystick6 | Joystick7 | Joystick8 | Joystick9 | Joystick10 | Joystick11 | Joystick12 | Joystick13 | Joystick14 | Joystick15 | Joystick16 | None
Default: 'Joystick1'

Joystick output configuration, specified as FourAxis or AllOutputs. For more information on the AllOutputs configuration, see Pilot Joystick All.

Programmatic Use

Block Parameter: OutputConfiguration
Type: character vector
Values: FourAxis | AllOutputs
Default: 'FourAxis'

Specify the sample time (-1 for inherited), specified as a scalar.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: scalar
Default: '1/30'

Version History

Introduced before R2006a

expand all