Measure linear acceleration along X, Y, and Z axes in m/s2
Simulink Support Package for Apple iOS Devices / Sensors
The block measures linear acceleration along the X, Y, and Z axes. Units are in m/s2.
The figure shows the orientation of the positive X, Y, and Z axes for the Apple iOS device.
The orientation of the axes relative to the device remains constant. For example, if you place the device face-up on a table, the Z-axis measures the acceleration of Earth’s gravity and outputs about 9.81 m/s2. The X and Y axes, which are perpendicular to the acceleration of Earth’s gravity, both output about 0.00 m/s2.
During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation (Simulink).
Port_1— Accelerometer data
Accelerometer data of the device, returned as a three-element numeric vector of the form [X,Y,Z].
Sample time— Time interval of sampling
0.1(default) | nonnegative scalar
Specify a discrete time interval, in seconds, at which the block reads the accelerometer sensor of the device and outputs the data.
Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.