Yaw discrepancy between sensors in AHRS Demo


I am trying to get the correct heading (yaw angle) of my drone from the IMUs of the Navio2.
It works quite well with arducopter and mission planner, so it is not a sensor issue.

But I have two issues when trying the AHRS Demo

  1. The printed yaw angle is not correct (I assume 0 deg is straight north, isn’t it?)

  2. The two IMUs report different yaw angles.

Any hints what is wrong and how to get the real heading angle?


Hi Mirko!

You are right, the magnetometer must point North at 0 angle.

To calibrate Navio2’s magnetometer in the Mission Planner you need to go to the Initial Setup screen and look for Compass in the Mandatory Hardware. The calibration should align magnetometers readings.

However, Navio2’s AHRS script is used for demo only. The readings do not include calibration corrections.

Thanks for the reply.
I know how to use it in with ardupilot as I wrote.
I am currently going through the code of ardupilot but that’s quite a bunch.
Seems like without online adaption (looks like they use gps heading to adjust the yaw angle) there is now way to get accurate yaw readings.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.