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

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


Sponsored Links
 Hi,

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. does anybody knows about porting efforts to i.MX37 and i.MX25?

I consider using those processors for my application and I wonder if
there is any already available support for android.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Android on apf 27 (problçŒĞme de boo t)

bonjour,

je souhaite porter android sur la plateforme APF27 d'armadeus...
I.mx27 processeur ARM...

J'ai compil un kernel compatible et prpar un system de fichier pour
cette plateforme. Je boot alors sur le system de fichier "normal". Je
place alors la cl USB contenant Android et lance android au moyen de
la commande suivante:

chroot /mnt/usb /init

Je vois les 2 logo de boot d'Android sur mon cran. Cependant le boot
stop (il tourne en boucle)... Quelqu'un a-t-il dja rencontr ce
problme?

voici la fin du strace chroot /mnt/usb /init

chown32("/sys/kernel/ipv4/tcp_rmem_min", 1000, 1000) = 0
chown32("/sys/kernel/ipv4/tcp_rmem_def", 1000, 1000) = 0
chown32("/sys/kernel/ipv4/tcp_rmem_max", 1000, 1000) = 0
chown32("/proc/cmdline", 0, 1001)       = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x400028a0, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x400028a0, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x400028a0, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x400028a0, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
futex(0x400028a0, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
stat64("/sbin/adbd", {st_mode=S_IFREG|0777,
st_size=504486858588160, ...}) = 0
fork()                                  = 1698
clock_gettime(CLOCK_MONOTONIC, {136, 520464065}) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9,
events=POLLIN}], 3, -1) = 2 ([{fd=5, revents=POLLIN}, {fd=9, rev)
read(9, "\21"..., 92)                   = 1
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 255}], WNOHANG, NULL) =
1686
futex(0x40002fa0, FUTEX_WAKE, 2147483647) = 0
futex(0x40001004, FUTEX_WAKE, 2147483647) = 0
wait4(-1, 0xbed6ea60, WNOHANG, NULL)    = 0
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9,
events=POLLIN}], 3, -1) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "add@/kernel/uids/1000\0ACTION=add\0"..., 1024, 0, NULL,
NULL) = 86
recvfrom(5, "add@/kernel/uids/1013\0ACTION=add\0"..., 1024, 0, NULL,
NULL) = 86
recvfrom(5, "add@/kernel/uids/1001\0ACTION=add\0"..., 1024, 0, NULL,
NULL) = 86
recvfrom(5, 0xbed6e6e2, 1024, 0, 0, 0)  = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9,
events=POLLIN}], 3, -1) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "add@/class/vc/vcs7\0ACTION=add\0DEV"..., 1024, 0, NULL,
NULL) = 94
mknod("/dev/vcs7", S_IFCHR|0600, makedev(7, 7)) = 0
chown32("/dev/vcs7", 0, 0)              = 0
recvfrom(5, 0xbed6e6e2, 1024, 0, 0, 0)  = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9,
events=POLLIN}], 3, -1) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "add@/class/vc/vcsa7\0ACTION=add\0DE"..., 1024, 0, NULL,
NULL) = 98
mknod("/dev/vcsa7", S_IFCHR|0600, makedev(7, 135)) = 0esource
temporarily unavailable
chown32("/dev/vcsa7", 0, 0)             = 0
recvfrom(5, 0xbed6e6e2, 1024, 0, 0, 0)  = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9,
events=POLLIN}], 3, -1) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "remove@/class/vc/vcs7\0ACTION=remo"..., 1024, 0, NULL,
NULL) = 100
unlink("/dev/vcs7")                     = 0

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Porting Android to the I8910 Omap 3430

4. asterisk in layout file

5. Looking for testers for Windows Live Sync app

6. Adding a bluetooth printer

7. localized european movie trailers available to Android Developers