2025-11-19 5:28 AM
We have integrated LSM6DSV16X (IMU) and ISM303DAC (magnetometer) on Android 10 running on the NXP i.MX8MM EVK.
The magnetometer and accelerometer, gryoscope drivers are working correctly, and raw values are verified using sysfs and logcat.
However, the compass heading is always 0°, and the GEOMAGNETIC_ROTATION_VECTOR output from the STM fusion HAL remains constant, even though the raw sensor data is correct.
Raw ACC, GYRO, MAG readings are valid and updating.
Android framework registers all sensors correctly.
But heading never changes in any compass or mapping application.
Rotation Vector, Geomagnetic Rotation Vector, and Orientation sensors always report zero output (all axes = 0).
The STM software fusion implementation (SWAccelMagnGyroFusion9X + STMSensorsFusion) contains only placeholder stubs for the main functions
int STMSensorsFusion::getQuaternion(...)
int STMSensorsFusion::getEulerAngles(...)
int STMSensorsFusion::getGravity(...)
int STMSensorsFusion::getLinearAccel(...)
All of them simply return 0 without performing any fusion calculations, resulting in no quaternion and no heading update.
So, although our drivers (LSM6DSV16X + ISM303DAC) are correct, the fusion layer never produces geomagnetic orientation or heading.
Please find below the exact repositories/paths used (these are where we downloaded or referenced your open-source implementations):
Driver Source:
https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio/tree/master
HAL Source Path:
https://github.com/STMicroelectronics/st-mems-android-linux-sensors-hal
Driver Source:
https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio/tree/master
HAL Source Path:
https://github.com/STMicroelectronics/st-mems-android-linux-sensors-hal
Please provide:
A working sensor fusion library (or compiled binary) compatible with LSM6DSV16X + ISM303DAC.
Example implementation for:
getQuaternion()
getEulerAngles()
getGravity()
getLinearAccel()
Documentation/samples showing how to enable fusion for this sensor combination.
Confirmation whether the current HAL requires additional proprietary components not included in your open-source release.
I have attached the which has the dumpsys sensorservice which is showing that rotation vector / geomagnetic rotation vector sensors are not registered.
This confirms the fusion module is not generating quaternion or orientation data, even though raw accel/gyro/mag data is correct.