Pilot Joystick - Provide joystick interface on Windows® platform

Library

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.

This block does not produce deployable code.

Dialog Box

Joystick ID

Specify the joystick ID: Joystick 1, Joystick 2, or None.

Output configuration

Specify the output configuration: FourAxis or AllOutputs (see Pilot Joystick All). FourAxis is the default.

Sample time

Specify the sample time (-1 for inherited).

Inputs and Outputs

The block has the following outputs.

Four Axis Mode (All Double Precision Values)

Port Number

Output Range

Joystick

Description

1

[-1, 1]

[left, right]

Roll command

2

[-1, 1]

[forward/down, back/up]

Pitch command

3

[-1, 1]

[left, right]

Yaw command

4

[ 0, 1]

[min, max]

Throttle command

All Outputs Mode (All Values Double Precision, Except for Buttons)

Port Number

Array Number

Channel

Output Range

Joystick

Description

1

1

X

[-1, 1]

[left, right]

Roll command

1

2

Y

[-1, 1]

[forward/down, back/up]

Pitch command

1

3

Z

[ 0, 1]

[min, max]

Throttle command

1

4

R

[-1, 1]

[left, right]

Yaw command

1

5

U

[ 0, 1]

[min, max]

U channel value

1

6

V

[ 0, 1]

[min, max]

V channel value

2

buttons

uint32 flagword containing up to 32 button states. Bit 0 is button 1, etc.

3

POV

Point-of-view hat value in degrees as a double. Zero degrees is straight ahead, 90 is to the left, etc.

Output values are [-1,1] for centered values, [0,1] for noncentered values, and uint32 for the buttons in All Outputs mode. Output sense is positive for right-hand rule rotations on centered values (roll, pitch, and yaw).

Assumptions and Limitations

If the joystick does not support an R (rudder or "twist") channel, yaw output is set to zero. Outputs are of type double except for the buttons output in AllOutputs mode, which is a uint32 flagword of bits. On non-Windows platforms, this block currently outputs zeros.

See Also

Pilot Joystick All, Simulation Pace

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS