KalebKE / FSensor

Android Sensor Filter and Fusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

values from ComplementaryLinearAccelerationSensor too large at rest

pvvvgithub opened this issue · comments

I am using the latest version 2.1. At rest (phone is on table), the ComplementaryLinearAccelerationSensor always returns too large values.
For example :
x: 0.2, y: 13 z: 9
Code is very simple : https://github.com/pvvvgithub/test_ComplementaryLinearAccelerationSensor/tree/master/app/src/main/java/com/example/android/demo
image

Hi,
Are you certain your phone has a magnetic and gyroscope sensor?

Hi! Yes. My phone (samsung galaxy note 10+) have a magnetic and gyroscope sensor .

Presumably the device is static and you are expecting values close to zero? Could you quickly hook your project into SensorManager and verify that it is giving you sane values for the acceleration?

I checked the values through https://play.google.com/store/apps/details?id=com.kircherelectronics.accelerationexplorer:

  • Android Linear Acceleration
  • LPF Linear Acceleration
  • Complimentary Fusion.
    Values are close to zero.

@KalebKE what other information should I send you?

@pvvvgithub I'll try to take a look at the code tomorrow. I changed the order of the axis in v2.1 and may have forgotten to reorder that filter.

Hi! Could you figure it out?

@pvvvgithub

I believe I found and fixed the issue in #36. I have released v2.2 with the fix.

@KalebKE Thanks, it got better. But the values are still great.
First values: 0.11 . After 1 second, the values are already 0.2 and continues to increase . See log.txt. The phone is on the table all this time without movement.
log.txt