Orientation
Measure device rotation along X, Y, and Z axes
Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.
Libraries:
Simulink Support Package for Android Devices /
Sensors
Description
The Orientation block reads the rotation of the Android™ device. The rotation is measured using three angular quantities – Pitch (around X axis), Roll (around Y axis), and Azimuth (around Z axis). The block outputs the angles as a 1-by-3 vector in degrees.
During simulation without hardware, this block outputs zeros. For more information, see Block Produces Zeros or Does Nothing in Simulation.
This illustration shows the X, Y, and Z axes of a typical Android mobile phone. Each axis has an arrow which points in the positive direction.
Note
The coordinate system remains the same even when the device is moved.
The coordinate system is different for devices with different natural orientations. For example, the natural orientation of most Android mobile phones is portrait, and the natural orientation of most Android tablets is landscape. Therefore, the coordinate system of an Android tablet is different from the coordinate system shown in this illustration.
Examples
Ports
Output
Parameters
More About
Version History
Introduced in R2018a