Accelerometer
Measure linear acceleration along X, Y, and Z axes in m/s2
Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.
Libraries:
Simulink Support Package for Android Devices /
Sensors
Description
Use the Accelerometer block to measure linear acceleration along the X, Y, and Z axes in m/s2.
The following illustration shows the X, Y, and Z orientation axes relative to a typical Android® mobile phone.
The following illustration shows the X, Y, and Z orientation axes relative to a typical Android tablet.
The X, Y, and Z orientation axes relative to the device remain constant. For example, if you place the device face-up on a table, the Z-axis measures the acceleration of Earth gravity and outputs ≈ 9.81 in m/s2. The X and Y axes, which are perpendicular to the acceleration of Earth gravity, both output ≈ 0.00 in m/s2.
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
Parameters
Version History
Introduced in R2014a