I am trying to implement a kalman for use in sensor data fusion, for 3 axis accelerometers, 3 axis gyros, and 3 axis magnetometers for a helicopter UAV project.(adsbygoogle = window.adsbygoogle || []).push({});

The roll, pitch, and yaw need to be known. Gyros do a great job of doing this, but the problem is that they drift of the zero value. Accelerometers are used to correct the roll and pitch values as they don't drift, and a magnetometer corrects yaw based on the magnetic north reference point.

Kalman filters are the most effective way to combine these. There are simpler ways such as a PID loop, but helicopters are very complex, and I do not want to take a chance.

My math is not nearly good enough to go and code a kalman filter, but I found kfilter:

http://kalman.sourceforge.net/doc/example.html

I have some questions in using this.

1) What is the difference between the state vector and measure vector? Is measure what the sensor data shows and state the current position?

2) What does the subscript 'k' represent?

3)what does 'x' with the two dots over it mean? What about the single dot?

4) In the link I posted, in this equation:

where does the part before the parenthesis come from? Why are there two for x and two for y?

Any advice on how to use this in this application/ broken down steps is welcome.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Help with understanding kalman filter

**Physics Forums | Science Articles, Homework Help, Discussion**