Can compass be used to separate linear acceleration from gravity with accelerometer?

by Dan » Fri, 04 Feb 2011 05:22:11 GMT

Sponsored Links

I want to be able to detect vertical movement (relative to the z-axis)
on an Android phone. This can be done with just the accelerometer with
some degree of accuracy. However, I see that in Android 2.3 there are
now separate Gravity and Linear acceleration "virtual sensors", that
apparently will use the gyroscope (when available) to separate
accelerometer data into gravity (useful for detecting orientation) and
linear acceleration (useful for detecting movement).

The phone I'm using does not have a gyroscope, but only an
accelerometer and compass. Is it at all possible to use the compass to
separate linear acceleration from gravity in the accelerometer signal?

High-pass filters are a bit simplistic for my intended use, because
they don't really help detect whether movement is up or down and using
raw accelerometer data leads to orientation changes looking very
similar to linear movements.


Other Threads

1. Moto XOOM not loading xhdpi drawables


I have an app that has default drawables in the drawable folder.  I
have both a drawable-hdpi and a drawable-xhdpi folder set up.  When I
launch my app on the XOOM the device seems to be picking up the
default drawables and NOT the ones in the xhdpi folder.  Has anyone
come across this?  My manifest is set up with,

        android:targetSdkVersion="9" />

        anyDensity="true" />

I know that xhdpi was available as of sdk version 8...



2. Whats the real point of a tablet?

I own a Galaxy Tablet and I love using the thing, I use it all the
time at home for browsing, watching videos, music, etc. It's pretty
much always with me while I'm at home.

However, one thing that was bugging me the other day was a thought I
had while contemplating adding more advanced features to my apps for
use on tablet devices.

I write audio apps for Android, and I was thinking about new features
I could add to my apps to make them more powerful for use in "live
play", etc. But then I realized something: What is the point of it? I
mean, if a musician wanted to have a portable device with some nice
software that they could use live on stage, wouldn't they just be
better off getting a tablet PC or a small notebook? Then they could
readily grab any software, even open source free software, and use
that as their DAW or live instrument.

I'm just not seeing a good reason to develop a "deep" functional app
for use on an android tablet when I'm wondering if it's really
"duplicating" software that would be better run from a PC. A PC that
would no doubt have much more power than the tablet ever would and
could give better features in the software anyway.

To me developing a fairly deep app for use on a phone is worth the
time, since the phone is extremely portable and always with you, but
for a tablet? Not so sure that's a worthy investment in time or not,
especially since you have to do better optimizations since the tablet
won't have as much capability as a PC would (less memory to work with,
slower CPU, etc)

I mean the only real advantage of a tablet is you can have a touch
screen interface with multitouch, so for some apps, yes, this is a
benefit. But for other apps that's not something that's a big deal.

What's your guys's take on it? Is it worth trying to supply a "deep"
app for a tablet when a PC variant is readily available (and laptops
are cheaper than tablets anyway?)



3. how to make sure that devices is connected after rebooting

4. Bug in Honeycomb solves Bitmaps with XRGB_8888

5. SQLite and Collate UNICODE

6. Reflection API:List all classes in a package that extend a specific super class

7. Test Location in Emulator