I have a IMU that consists of a magnetometer, accelerometer and gyroscope, each producing raw X, Y and Z readouts. (My magnetometer is BMM150) From this I need to determine a precise heading in relation to true north.
I will be using this in my project, where I drop an object from a rocket and it needs to glide to a selected GPS coordinates. Knowing the coordinates of my object as well as the destination I can easily calculate the desired heading angle. I need to know the precise heading of my object to calculate the difference and adjust the flight path.
My IMU won’t be flat to the ground, because of conditions such as wind and other rapid changes. So my question is: How to precisely calculate heading in a 3d environment with the use of magnetometer, accelerometer and gyroscope?
I tried calculating the heading purely based on the magnetometer data, but the readings are very unstable and vary by += 20°. (This was after calibration)This is very inaccurate and is even worse under rapid acceleration or changes in the orientation. This would not work for me, because as I mentioned I need precise measurements. I have done some reaserch and I from what I can understand I could use accelerometer and gyroscope data fused using a kalman filter to help with the precision. Would using that approach help me, or I should buy a better, more accurate IMU, or use better calibration techniques? Any suggestions are greatly appreciated.