Hi,

In my app (http://www.maxikeys.com) I use TYPE_GYROSCOPE to assist the
accelerometer.
The response is much faster and smoother than using the accelerometer
alone, and also much better than using the computed
TYPE_ROTATION_VECTOR. Using the gyro alone (with integration) will
lead to drift, as pointed out by you.
So the trick is to let the accelerometer handle the low frequencies
and let the gyro handle the high frequencies - just like a loudspeaker
with two units.
The filtering and combination can be done in many ways.
I guess, the same can be done with the magnetic sensor and the gyro.
The accelerometer is not for any use, if it is a compass like
functionality you are after.

Hardy Henneberg
http://www.maxikeys.com


On Nov 9, 4:47 pm, Ferro Francesco <[email protected]> wrote:
> Hello everybody,
>
> I'm trying to get the best heading estimation of my phone. To be more
> precise, I'm only interested on the Azimuth value (angle from the
> north).
>
> the API offer ready to use function like
>
> TYPE_ORIENTATION (Deprecated): the result is shit :), it's very
> unstable and not very precise..
>
> there is SensorManager.getOrienation(matrix,orient): So here android
> compute a matrix rotation based on the accel + magneto and then
> extract the orientation from the rotationmatrix, and the result is
> quit shit too.. Whenever my phone is near a magnetic perturbation the
> heading become completly wrong...
>
> I have read on this group that there is the TYPE_ROTATION_VECTOR that
> fuse the accelerometer + compass. I have tried this and it's not too
> bad. It's sure, better that only using the accelerometer (+magneto)
> with .getOrientation but it's still not very accurate when the phone
> is near a magnetic perturbation....
>
> There is the TYPE_GYROSCOPE that if you integrate the value by hand it
> gives you the actual  angle, but this not very good because of the
> integration drift, and if my phone stand still on a table I can see
> the angle moving every seconds...
>
> So now my question is..  How can I fuse (Exactly like
> TYPE_ROTATION_VECTOR does) the accelerometer with the gyroscope (+
> compass why not)? That would be MOOOORE precise that fuse it with the
> compass no ??
>
> Thank you !

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to