Maths behind the Android orientation calculation algorithm

by DD » Sun, 28 Mar 2010 13:30:33 GMT

Sponsored Links

I know Android calculates the orientation of the phone by fusing the
acceleration and magnetic field readings. The related APIs are
getRotationMatrix() and getOrientation(). I looked into the source
code of these two APIs 

But I couldn't really figure out where exactly the implementation came
from... Could anybody tell me where I can find the theory of this
algorithm and detailed mathematical background of it? I'm currently
implementing exactly the same algorithm offline in MATLAB, and trying
to write some mathematical analysis about it.

Thank you very much!


Other Threads

1. How to access "shared data/settings" across multiple application? ContentProvider or SharedPreferences?

Hi all,
Now I have 2 activities that would simultaneously access one data/
However, two kind of solution can be applied after I study from the
Android Developer's Guild.

One is ContentProvider,
The discription in guild is as:
"Content providers store and retrieve data and make it accessible to
all applications. They're the only way to share data across
applications; there's no common storage area that all Android packages
can access."

and another is SharedPreferences,
"To use preferences that are shared across multiple application
components (activities, receivers, services, providers), you can use
the underlying Context.getSharedPreferences() method to retrieve a
preferences object stored under a specific name."

What is the differenet between these 2 ?

Thanks a lot!


2. Add to patch to support complex text rendering

Hi all,

As far as I am concerned to render the complex texts, e.g Lao, Thai,
Khmer, and others, one must add or hack some files in the library
particularly of ''. This involves positioning of the vowels,
semivowels, tone marks, and other characters.

I was wondering if anyone could tell me or help me out in terms of
which files under /libsgl/* that I need to tweak and add a patch so
that I could get a Lao language support under Android. Right now it is
not defined anywhere and Lao cannot display.

Thanks so much in advance.

3. error: The import can not be resolved.

4. Problem with DevGuide on TabHost and Tabs

5. Problems deleting an audio file using a media content uri

6. Problems deleting an audio file using a media content uri

7. variable tooltips