| Contents | Index |
Animation/Animation Support Utilities

The Pilot Joystick All block provides a pilot joystick interface for a Windows platform. Analog is mapped to the joystick X, Y, Z, R, U, and V channels. Buttons and POV are mapped to up to 32 joystick button states and the joystick point-of-view hat.
You can also configure the block to output four axes by setting the Output configuration parameter to FourAxis.
This block does not produce deployable code.

Specify the joystick ID: Joystick 1, Joystick 2, or None.
Specify the output configuration: FourAxis (see Pilot Joystick) or AllOutputs. AllOutputs is the default.
Specify the sample time (-1 for inherited).
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).
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.
Pilot Joystick, Simulation Pace

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |