안드로이드로 중력가속도 계산하기
As you probably remember from you physics class, position, velocity and acceleration are related to eachother: deriving the position, gives us velocity:
d x = v x
with x being the position on the x-axis and v 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:
d 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