Servers by jDrones

Use IMU instead of compass for heading

Hi all,

is there any way to fly without the compass and only use the IMU for heading information? When I disable the compass, the (relative) heading seems fine, but the copter refuses arming. It says “Compass not healthy”, which I’m wondering about becuase I disabled all compasses. No the questions:
a) Is there a way to overcome the arming problem? (And what does the error mean?)
b) Where is the heading calculated? (i.e. Which part of the code do I need to change if I had external heading information?)

Thanks,
Fabian

Hi xfly,

I can comment on a). I’ve got the same “Compass not healthy” message when trying to arm the copter with no compass. I guess that it’s coming from AP_Arming_Copter::arm_checks() in ArduCopter/AP_Arming.cpp. It literally inhibits arming without compass. The corresponding code is wrapped with #ifndef ALLOW_ARM_NO_COMPASS block. I’m adding “-DALLOW_ARM_NO_COMPASS” to the compile options for my target so to skip that check, though it might not be a good way.

@kkojima, that’s a good hint. Thanks.
How stable is the heading of the copter without compass?

@xfly , I’m using the external vision system that gives the heading. I’ve seen my copter slowly rotates in the yaw axis when the external vision data wasn’t sent. I guess that the yaw stability depends on the vibrations and the drifts of IMU for the IMU only system. My copter and IMU are not so good at them.

Thanks for this remark. Unforntunately I cannot do the same as my positioning system does not provide the heading :confused:

Hi @xfly, have you succeded flying using only the IMU for heading?

No, on a copter a well calibrated compass is mandatory. On a fixed wing plane you can fly without a compass because it is assumed the aircraft is pointing in the direction it is going. Roll and pitch use the accelerometer vector to cancel out rate gyro drift. Yaw does not have the force of gravity to keep things in line. It uses the compass for yaw gyro drift correction. And this is the super simple explanation. Bottom line… you need a good compass for a copter to work, because they hover and move in any direction. A plane is like an arrow… always points the way its going.

Hi @guglie,
it’s exactly as @Greg_Fletcher says: the IMU alone is not sufficient. I had a look at the stability of the heading/yaw when all compasses are disabled, or to say there is no stability. Further, I thought about alternatives to a compass but there are only few and all of them are positioning systems which deliver 6d position. There is basically no substitution for a compass, so you definitely need one.
If you have any idea on that, please share.

Hi Greg,

What about rovers? Is it mandatory to have an external compass as well ? I’m planning to use the Reach M+ GPS module that has a embedded IMU, but it does not have an integrated compass.

The documentation says that a compass should also be enabled on rover (see here). However, I think I also read somewhere that rover would be also fine without any compass at it could determine its heading from GPS.

It could determine the moving direction, not his heading (could be different by a large amount).

Servers by jDrones