가속도 센서


중력장 가속도, 중력 가속도, 그리고 가속도계 측정값 사이의 관계

안드로이드로 중력가속도 계산하기

자이로 센서

As you probably remember from you physics class, position, velocity and acceleration are related to eachother: deriving the position, gives us velocity:

x = x

with x being the position on the x-axis and x being the velocity along the x-axis.
Maybe less obvious, the same holds for angles. While velocity is the speed at which the position is changing, angular rate is nothing more than the speed the angle is changing. That’s right:

alpha = angular rate = gyroscope output

with alpha being the angle. It’s starting to look pretty good! Knowing that the inverse of deriving (d .) is integrating (∫), we change our formula’s into:

∫ angular rate = ∫ gyroscope output = alpha

Woohoo, we found a relation between angle (attitude!) and our gyroscope’s output: integrating the gyroscope, gives us our attitude-angle.

칼만 필터 자료 모음

About Kalman Filter

In the tutorial on gyroscopes, we saw that the bias drifts. Well, here comes the kalman-magic: the filter will adjust the bias in each iteration by comparing the result with the accelerometer’s output (our second input)! Great!

kalman filter source code