0
$\begingroup$

I'm looking for some kind of filter, algorithm which will allow me to compensate gyro yaw drift using heading of magnetometer. My project requires only yaw measurments and both sensors are flat. Is there any simple solution or i need to dig into more complicated filtering?

I've got acc in my system but i think it's not necessary for this task.

$\endgroup$
1
  • $\begingroup$ Welcome to Robotics! Don’t forget to mark answers as solutions if you feel they solve your problem. $\endgroup$ – morbo Jul 27 '19 at 17:13
0
$\begingroup$

Your best would be using the Madgwick filter, as its already implemented in several languages and programs. Yaw, pitch or roll can then be easily called from the filter.

Follow the link to a description from adafruit and their library.

$\endgroup$
3
  • $\begingroup$ As far as i know , madgwick filter can be used only when accel is present and needed and that's not my case. I want to fuse only gyro and mag data $\endgroup$ – akimata Jul 27 '19 at 17:54
  • $\begingroup$ You dont need mag data to fuse with for gyro drift...however does the chip you have, not have accel built in? Or is this an exercise in developing a technique for explicitly gyro and mag? You say you have acc, gyro and mag..i dint see why you wouldnt use all three for a more robust system. $\endgroup$ – morbo Jul 27 '19 at 18:12
  • $\begingroup$ @akimata unless you are at one of Earth's poles the rotation of the Earth will cause your system to rotate along all three axis. $\endgroup$ – fibonatic Jul 29 '19 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.