Android Question rotation of phone with GYROSCOPE [SOLVED]

grazianod

Member
Licensed User
Longtime User
Hello, i'm new with B4A. i need to detect in degree the rotation of the phone (when it is on the table and i rotate it).
i think i must use GYROSCOPE, do you have same idea how to calculate it?
i have GYROSCPE on my phone and ORIENTATION is not good because close to the phone it is possible to have other electronics equipments

thanks in advance for your suggestion
 

grazianod

Member
Licensed User
Longtime User
Thanks Erel, but problem is different. Gyroscope give rad/s and not absolute degree of rotation.
i just solved with a small calculation:
rad/s = 57.3°/s... i chechk timestamp and with the difference of 2 moments i have the exact rotation in degree (i'm not expert in matematic, but he works fine)

thanks!
 
Upvote 0
Top