Sensor (draft)

1.sensor type
TYPE_ACCELEROMETER=1 
TYPE_MAGNETIC_FIELD=2 (what's value mean at x and z axis)
TYPE_ORIENTATION=3
TYPE_GYROSCOPE=4 
TYPE_LIGHT=5(in )
TYPE_PRESSURE=6
TYPE_TEMPERATURE=7
TYPE_PROXIMITY=8
TYPE_GRAVITY=9

TYPE_LINEAR_ACCELERATION=10

TYPE_ROTATION_VECTOR=11

some function of the sensor may be Overlaped.

2.TYPE_ACCELEROMETER
it has value[] to descripte the change.
the value is measured by the force applied to the sensor (F=G+A up,G-F=A down,F=A right,left,front,back)
take TYPE_ACCELEROMETER for example.
assume the phone lies flat on the table, the the force of gravity is 9.8,

the acceleration value is +9.8N/s^2. 

3.TYPE_GYROSCOPE
(not like TYPE_ACCELEROMETER, report positibve value )
we usually use time to calculate the acutal angle.
angle=angular*elapsedtime.

(if it's not a constant speed movement, we can use definite integral to get the total change.)

4.TYPE_GRAVITY

GRAVITY only include gravity, ACCELEROMETRE includes all force.

5.TYPE_LINEAR_ACCELERATION (not include gravity)

acceleration = gravity + linear-acceleration.

6.TYPE_ROTATION_VECTOR

?change 3 to an vector?
7.TYPE_ORIENTATION 
(maybe it can use gravity and magnetic to calculate the current orientation)

value are angles in degrees.

转载于:https://www.cnblogs.com/elfylin/archive/2012/04/06/2435345.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值