Main Content

Gyroscope

Measure rotational speed around X, Y, and Z axes in rad/s

  • Library:
  • Simulink Support Package for Apple iOS Devices / Sensors

  • Gyroscope block

Description

The block measures the rotational speed around the X, Y, and Z axes of the device. Unit are in rad/s. This data is acquired from the gyroscope sensor of the device.

For any positive axis on the device, clockwise rotation corresponds to negative values, and counterclockwise rotation corresponds to positive values.

This figure shows the orientation of the positive X, Y, and Z axes for an the Apple iOS device.

Note

During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.

Ports

Output

expand all

Gyroscope data of the device, returned as a three-element vector of the form [X, Y, Z].

Data Types: single

Parameters

expand all

Specify a discrete time interval, in seconds, at which the block reads the gyroscope sensor of the device and outputs the data.

Note

Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.

Version History

Introduced in R2015a