difuiv250385
04-29-2011, 12:06 AM
I am developing the compass application using bma150 acceleration sensor and a magnetic sensor.
The application developed (.apk) works fine on nexus one phone where as it is not working properly in my phone.
Here I am doubting on the device driver and the HAL layer currently.
But I found that tha bma150 sensor gives the acceleration data depending on the gravity force that is acting on the device.
for example, if the phone is kept on flat surface horizontally the acceleration on x & y is 0 where as the z axis has some acceleration, also if I keep the phone vertical(z axis is parallel to ground) z axis reading 0 where as x & y values change as I rotate along with the z axis. The compass needle rotates only when I rotate the phone along with z axis when the phone is kept vertical(i.e z axis parallel to ground surface but for compass the phone need to be flat). what I understand from this is the bma150 measures only the gravity component on the phone, so when the phone is flat the gravity vector components on x & y axis are 0 so i cant measure the acceleration.
Please let me know whether my understanding is valid. Also tell me whether the bma150 sensor can be used for the compass application, In datasheet it is not mentioned that this can be used for the compass application also it says only about the drop detection, shock detection and pedometer kind of application.
The application developed (.apk) works fine on nexus one phone where as it is not working properly in my phone.
Here I am doubting on the device driver and the HAL layer currently.
But I found that tha bma150 sensor gives the acceleration data depending on the gravity force that is acting on the device.
for example, if the phone is kept on flat surface horizontally the acceleration on x & y is 0 where as the z axis has some acceleration, also if I keep the phone vertical(z axis is parallel to ground) z axis reading 0 where as x & y values change as I rotate along with the z axis. The compass needle rotates only when I rotate the phone along with z axis when the phone is kept vertical(i.e z axis parallel to ground surface but for compass the phone need to be flat). what I understand from this is the bma150 measures only the gravity component on the phone, so when the phone is flat the gravity vector components on x & y axis are 0 so i cant measure the acceleration.
Please let me know whether my understanding is valid. Also tell me whether the bma150 sensor can be used for the compass application, In datasheet it is not mentioned that this can be used for the compass application also it says only about the drop detection, shock detection and pedometer kind of application.