KalebKE / FSensor

Android Sensor Filter and Fusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fusions without magnetic sensor

andersohlund opened this issue · comments

I want to use orientation fusion but without use of the magnetic sensor, is that possible?

Why not just use the acceleration sensor?

How do I do that? If I set magnetic to "0" when I call calculateFusedOrientation() the SensorManager function getRotationMatrix() returns false due to normH < 0.1f.

The acceleration sensor is used to estimate the pitch and roll of the device while the magnetic sensor is used to estimate the azimuth of the device. Both sensors are required to provide an estimate that can be used to orient the gyroscope to earth frame and then compensate for the gyroscopes drift thereafter.

You could contrive some values to estimate only the pitch and roll from the gyroscope and acceleration sensor, or you could just use the acceleration sensor by itself. However, you will need a magnetic sensor if you want to estimate the azimuth, especially if you want it to be relative to earth frame.

commented

For anyone else looking at this issue in the future, this study attempted to estimate the azimuth of the device relative to earth frame without a magnetic sensor. Specifically sections 2 and 3.

From my understanding it has a large downside of needing to be moving in a fixed direction, such as in a vehicle, and to know when the vehicle is accelerating forwards/backwards in order to calibrate. This could be assumed where the bearing doesn't change and the velocity does between consecutive GPS events? The authors mention the significant reduction in sample rate using GPS (1Hz) as a limiting factor so this may not be a suitable solution.

As a note, I haven't implemented anything mentioned in this paper or this comment. I just found it interesting as a possible alternative to a fusion sensor that relies on a magnetic sensor.

@KalebKE I'd be interested in any thoughts you had on that paper's implementations if you we're interested too.