Magnetometer
Measure magnetic field 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 Magnetometer block reads the strength of the magnetic field around an Android™ device. The built-in magnetometer sensor on the Android device measures the magnetic field along the X, Y, and Z axes. The block outputs the magnetic field as a 1-by-3 vector in microtesla (μT).
This illustration shows the orientation of the X, Y, and Z axes for a typical Android mobile phone.
This illustration shows the orientation of the X, Y, and Z axes for a typical Android tablet.
Note
During simulations without hardware, this block outputs zeros. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Ports
Output
Parameters
Version History
Introduced in R2018a