February 2nd, 2012, 06:22 AM
|
#1 (permalink)
|
|
New Member
Join Date: Aug 2010
Posts: 8
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
|
How remap coordinate system to get always the correct value for the desire axle in Android?
I want to make an app to know if someone is running and suddenly stops (and I can't use the GPS so I must use the sensors)
If the cellphone would be always in the same position I can easily do it, as the acceleration will change from something to 0, but I need to take into account that in the middle of the run the user might change the position of the mobile phone, rotate it, etc. so if I would be looking for deceleration on the same axle as I was looking previously it could happen that I might be looking at the wrong axle (maybe the runner jumped, and I computed it as a stopped, or it stopped and I computed it as a jump.
Knowing the accelerometer, gravity, etc sensors doesn't change it's reference coordinate system, how can I transform the coordinate system the cellphone has in that moment to always the same one, for example, the phone top edge looking up?
I know I must use remapcoordinateSystem along with getOrientation, but I must send X and Y axis, and the problem is that I don't know how the runner has the phone in that moment to tell that method which axle is X and which axle is Y.
Thanks in advance! Guillermo.
|
|
|