Compass for android (orientation in 3D space)

by mboehmer » Mon, 29 Dec 2008 18:19:14 GMT


Sponsored Links
 Hello,

mobile phones usually show the point of the compass, when people are
on the move (estimation of a vector from gps track). The API says,
that android is also able to get the point of the compass. How is this
done? Is this done by software (estimating the vector) or has the G1
an build-in magnetic hardware compass? If not, does anyone know, if it
is possible to connect a magnetic compass via USB or bluetooth?

I am interested in the orientation of the phone in 3D space, while the
user is standing still. Does anyone know, how wikitude (http://
www.youtube.com/watch?v=8EA8xlicmT8) does this?

Best regards
mboehmer

--~--~---------~--~----~------------~-------~--~----~



Compass for android (orientation in 3D space)

by DSmith » Mon, 29 Dec 2008 23:44:16 GMT


 The easiest way is to use SENSOR_ORIENTATION ( http://code.google.com/ 
android/reference/android/hardware/
SensorManager.html#SENSOR_ORIENTATION).  It does all the necessary
calculations on the magnetometer and accelerometer values, throws in
some low-pass filtering, and spits out azimuth, pitch, and roll.  The
calculations aren't perfect - you'll see some strange things at the
branch cuts, like the az spinning backwards through the entire range
when you raise the phone over your head, but it's pretty good for most
practical uses.
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Charger Dell Streak

Temans,
mohon informasinya adakah yg tau dimana/sapa yg jual charger dell streak?
punya ane gosong gara2 building mngmt maintenance listrik dan ane lg
ngecharge. untung hh nya gak papa.
tks.

ch...@froyostreak
-- 
===============
"

2. What type of messaging would you use?

A client might have a use case for peer to peer or group sharing of
location.

Internet access, cell phone coverage not guaranteed.
Wifi is available on a large private LAN.
Users may have phones or more likely, tablets.
A group of users are assigned a known key.
User can periodically send their location to one or all members of the
group.

If this were a place with phone coverage, I believe I would pick SMS
and send a broadcast intent.

The location plus other status information will probably fit in 140
characters or less.

What messaging would you use in this situation? I haven't really done
much message related programming with Android, and I thought I would
check here first, since someone has probably solved this already.

Thanks.

Nathan

-- 

3. Problems pulling down kernel

4. Demo Honeycomb = beginilah seharusnya sebuah tablet

5. About viewstubs

6. class name (Dbi) does not match path (classes/Dbi.class)

7. Drawing on a canvas like normal VS OpenGl