2024-11-25 12:39 PM
Hi,
I am using MotionFX with BlueCoin, for a solution that can detect vertical movement within 2 meter range with high precision.
I took the ALLMEMS2 example when I logged linear acceleration and gravity, it showed some unprecise values like
linear acceleration around 0.2 when the device wasn't moving. When I increased the full scale factor for ACC to 16.0f and Gyro to 2000dps, the linear acceleration value improved to the range of 0.05-0.1, which is still not as expected.
Gravity value is strangely too high and stable 9.99, shouldn't it be closer to 9.81 max in the stale state?
NFO:__main__:Linear Acc -> x: 0.0290, y: -0.0090, z: 0.0190
INFO:__main__:Gravity -> x: 0.0590, y: 0.0310, z: 9.9990
INFO:__main__:Linear Acc -> x: 0.0090, y: -0.0180, z: 0.0490
INFO:__main__:Gravity -> x: 0.0580, y: 0.0300, z: 9.9990
INFO:__main__:Linear Acc -> x: -0.0110, y: -0.0190, z: 0.0390
INFO:__main__:Gravity -> x: 0.0580, y: 0.0310, z: 9.9990
INFO:__main__:Linear Acc -> x: -0.0010, y: -0.0180, z: 0.0490
INFO:__main__:Gravity -> x: 0.0590, y: 0.0300, z: 9.9990
INFO:__main__:Linear Acc -> x: 0.0090, y: -0.0090, z: 0.0290
INFO:__main__:Gravity -> x: 0.0590, y: 0.0300, z: 9.9990
INFO:__main__:Linear Acc -> x: 0.0190, y: -0.0090, z: 0.0390
INFO:__main__:Gravity -> x: 0.0590, y: 0.0300, z: 9.9990
INFO:__main__:Linear Acc -> x: 0.0090, y: -0.0090, z: 0.0190
INFO:__main__:Gravity -> x: 0.0580, y: 0.0290, z: 9.9990
INFO:__main__:Linear Acc -> x: 0.0080, y: -0.0200, z: 0.0290
At first, I thought that I needed to calibrate ACC and Gyro, but their values are pretty good.
Accelerometer: {'x': 16, 'y': -4, 'z': -985}
Gyroscope: {'x': 1, 'y': 7, 'z': 4}
Magnetometer: {'x': -59, 'y': 252, 'z': 53}
------------------------------
Timestamp: 166960 ms
Accelerometer: {'x': 18, 'y': -3, 'z': -985}
Gyroscope: {'x': -4, 'y': 0, 'z': 3}
Magnetometer: {'x': -57, 'y': 252, 'z': 51}
------------------------------
Timestamp: 167008 ms
Accelerometer: {'x': 16, 'y': -4, 'z': -987}
Gyroscope: {'x': 0, 'y': 8, 'z': 3}
Magnetometer: {'x': -57, 'y': 257, 'z': 48}
------------------------------
Timestamp: 167056 ms
Accelerometer: {'x': 15, 'y': -3, 'z': -989}
Gyroscope: {'x': 0, 'y': 7, 'z': 3}
Magnetometer: {'x': -54, 'y': 260, 'z': 57}
So I suspect that something strange happening inside MotionFX library, which constantly shows a gravity value of 9.99 and introduces bias to vertical axes.
Can I somehow improve bias for the vertical context?