I am working on integrating an electronic compass and gyroscope for my undergraduate project. The idea is that I've to use the gyro to correct compass errors to estimate true orientation of the 'device' (user holds gyro+compass and walks on a straight line, while turning the device)
I am planning to use a Kalman Filter to estimate the orientation, but I'm not very clear as to how to get started. I've formed some idea but I'm not sure if it is correct, please help me out.
The state vector would be a set of accelerations along the different axes(the difference between the readings of the compass and the gyro). The noise (both gyro and electronic compass) can be modeled as Gaussian distributions(but how to numerically compute them) Each time I get a set of readings from both sensors, I need to update the covariance matrix (by getting the new compass-gyro) and compute the new covariance matrix and estimate as weighted average of new reading and old estimate.
I found the KFilter library online, which implements the filtering in C++, but I need to provide the state vector, covariance matrix, error and jacobian matrix(?) for it. I'm really confused about it, could someone please help me? I'm using a 3 axis MEMS gyro.
Thanks!