How to get absolute heading from the drone?

Hello,

We have seen strange behavior using an Anafi GOV using AttitudeChanged to recover current heading. Specifically, it seems like the drone always starts at 0 degrees (even when not pointed at true north), and then offsets from there. We cannot find any way to get true heading, other than through a moveToChanged event which is only triggered by a moveTo. Is there some way to get absolute heading we are missing, similar to the compass in GroundSDK?

Hello @mihirbala ,

For an Anafi USA GOV, the drone needs the magnetometer, IMU, and GPS to determine the true heading.

When the drone starts, if there’s no signal, it takes an arbitrary heading. The magnetometer provides magnetic north, but GPS is needed to correct the offset to true north.

To retrieve heading values, you can indeed use AttitudeChanged, and you’ll see the drone correct its heading value when it emits the HeadingLockedStateChanged_State message. From that point on, the heading is accurate.

If you never get GPS, it might be because the drone is on a table indoors, in a car, or in another environment with poor signal.

But once that message is received, the heading corresponds to the “true” one.

Best regards,
Hugo