Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android accelerometer detect height?

Is it possible to use the accelerometer to detect height? For instance, if I'm holding the phone on my hand and then detect the height after raising my arm?

Thanks

like image 674
Rui Avatar asked Dec 04 '22 20:12

Rui


1 Answers

Assuming you mean you want to detect the height the phone was raised from its staring point, yes. The android accelerometer measures force, more info on how to use it can be found here. Keep in mind that the accelerometer isn't a perfect device, and so your results will be approximations of how much the phone was really moved.

like image 91
brc Avatar answered Dec 26 '22 19:12

brc