Main Content

Pilot Joystick All

Provide joystick interface in All Outputs configuration on Windows platform

  • Pilot Joystick All block

Libraries:
Aerospace Blockset / Animation / Animation Support Utilities

Alternative Configurations of Pilot Joystick All Block:
Pilot Joystick

Description

The Pilot Joystick All 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.

The Pilot Joystick and Pilot Joystick All blocks are alternative configurations of the same block.

  • Pilot Joystick — Outputs four axes.

  • Pilot Joystick All — Outputs all channels.

To generate deployable code, select one of the configuration parameter Microsoft® Visual Studio® C++ nmake toolchains from Code Generation > Toolchain.

Examples

Limitations

  • The Pilot Joystick All 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

Analog output, returned according to:

Array Number

Channel

Output Range

Joystick

Description

1

X

[-1, 1]

[left, right]

Roll command

2

Y

[-1, 1]

[forward/down, back/up]

Pitch command

3

Z

[ 0, 1]

[min, max]

Throttle command

4

R

[-1, 1]

[left, right]

Yaw command

5

U

[ 0, 1]

[min, max]

U channel value

6

V

[ 0, 1]

[min, max]

V channel value

Data Types: double

Button output, returned as a flagword containing up to 32 button states on the buttons channel. Bit 0 is button 1, Bit 1 is button 2, and so forth.

Data Types: uint32

Point-of-view, returned as a hat value in degrees on the POV channel. Zero degrees is straight ahead, 90 degrees is to the left, and so forth.

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'

Alternative Configurations

expand all

The Pilot Joystick block outputs four axes.

Libraries:
Aerospace Blockset / Animation / Animation Support Utilities

Version History

Introduced in R2007a

expand all