How to calculate gravity and degree of angle from MEMSIC2125 with C Language?
mmc01
Posts: 1
I can measure ment pulse width with C Languge. But After that I don't know how to calculate it like Basic stamp http://www.parallax.com/dl/docs/prod/acc/memsickit.pdf .
This is pulse width which I can read from MEMSIC2125.
5250 uSec
5060 uSec
5080 uSec
5080 uSec
5070 uSec
I calculate like this formula.
xmG = ((xRaw / 10) - 500) * 8
such as. xmG = ((5250 / 10) - 500) * 8
xmG = 200 ' calc 1/1000 g
= 0.2 'g
If I calculate Tilt = ARCSIN(g) .
= arcsin(0.2)
= 11.536
I don't know it correct or not correct Tilt and gravity value.
How to calculate gravity and degree of angle ?
This is pulse width which I can read from MEMSIC2125.
5250 uSec
5060 uSec
5080 uSec
5080 uSec
5070 uSec
I calculate like this formula.
xmG = ((xRaw / 10) - 500) * 8
such as. xmG = ((5250 / 10) - 500) * 8
xmG = 200 ' calc 1/1000 g
= 0.2 'g
If I calculate Tilt = ARCSIN(g) .
= arcsin(0.2)
= 11.536
I don't know it correct or not correct Tilt and gravity value.
How to calculate gravity and degree of angle ?
Comments