Compass Calibration, A Complete Primer

Makes no difference as you already thought [emoji3]
Thanks!

Second question: How important is it that the orientation of AC on the two axes that are NOT being rotated are static? Again, my background says very important. Therefore there is real benefit to XY axes stability (i.e. minimize any changes on those axes while rotating around the Z axis).

Unless I'm mistaken, a 3-axis geomagnetic sensor (we call it a compass) is used for sensing absolute orientation relative to the horizon, so if this it off at all, the AC can think its not level when it actually is.

IOW, calibration is critical for more than just directional accuracy. So maybe the procedure in the OP should be updated to give instructions for how to perform these rotations in as stable, and Z-axis isolating manner as possible?
 
  • Like
Reactions: SkyHog
No problem. I calibrate every time I fly. If others do not then don't post "I have lost my Phantom Boo Hoo, Why doesn't DJI replace it FOC". I do not want the cost of Phantoms increased because of idiots.


Sent from my iPad using PhantomPilots
 
No problem. I calibrate every time I fly. If others do not then don't post "I have lost my Phantom Boo Hoo, Why doesn't DJI replace it FOC". I do not want the cost of Phantoms increased because of idiots.

I think you may be missing the point. Calibrating before every flight is not improving your navigation accuracy. When you do that, you actually make it worse in most cases. It is better to do one good calibration carefully, in a very good environment, and try to keep that good calibration data as long as you can. When the drone is in flight, it is so far away from nearby ferrous materials and electronic devices, that it mostly sees the true earth magnetic field, which is the ideal environment you are trying to calibrate. To the extent you can, you want to replicate that ideal on the ground by calibrating as far as you can from anything that would disturb the true natural background earth magnetic fields that you will see in flight. It is difficult to get an undisturbed magnetic environment on the ground near all the man made fields and ferrous objects. Play with a compass and watch how much it varies while you move around the house. But once you find a local spot to get away from all those nearby peculiar magnetic field disturbances, and finally get a good calibration on the true earth fields, you don't want to throw that calibration data away and replace it with whatever degraded calibration data you might collect wherever you fly next. The true earth data doesn't vary more than a degree, over a hundred miles or so. But the local corrupted magnetic field close to the ground can vary enormously (tens of degrees) by a hundred different nearby devices, wires, etc, that your drone will never see once it gets 100 feet away in any case. So unless you move 100 miles away, where the true background earth fields vary enough to make recalibration useful, it is counterproductive to recalibrate at every flight.
 
When the drone is in flight, it is so far away from nearby ferrous materials and electronic devices, that it mostly sees the true earth magnetic field, which is the ideal environment you are trying to calibrate.
This is an extremely insightful point in a most excellent analysis by @SkyHog ... I hadn't thought of this obvious fact, but it is critically important in understanding this issue.
 
  • Like
Reactions: SZPFlyer and SkyHog
This is a great thread and it all really makes a lot of sense. I wonder why the P4 manual says "calibrate before each flight" along with saying to only calibrate when moved to a new location? Those statements next to one another almost contradict each other. I wonder if they throw in the "before each flight" comment as a CYA?

Per the manual:

When to Recalibrate

1.When compass data is abnormal and the Aircraft Status Indicator is blinking green and yellow.
2.When flying in a new location or in a location that is different from the most recent flight.
3.When the mechanical or physical structure of the Phantom 4 has been changed.
4.When severe drifting occurs in ight, i.e. Phantom 4 does not fly in straight line.

IMPORTANT: Always calibrate the compass in every new flight location. The compass is very sensitive to electromagnetic interference, which can produce abnormal compass data and lead to poor flight performance or flight failure. Regular calibration is required for optimal performance.

Calibrate the compass before each flight. Launch the DJI GO app and follow the on-screen instructions to calibrate the compass. DO NOT calibrate the compass near metal objects such as a metal bridge, cars, scaffolding.
 
Unless I'm mistaken, a 3-axis geomagnetic sensor (we call it a compass) is used for sensing absolute orientation relative to the horizon, so if this it off at all, the AC can think its not level when it actually is.

You might be the only other person here who gets that! With the Phantom and most AHRS systems, the IMU and GPS do most of the work with respect to determining craft orientation for the purposes of keeping it in the intended position but being that the IMU is relative and prone to error, the compass is indeed the only absolute reference for orientation. This is the reason it is used to align the gimbal with the horizon.
 
  • Like
Reactions: SkyHog
This is a great thread and it all really makes a lot of sense. I wonder why the P4 manual says "calibrate before each flight" along with saying to only calibrate when moved to a new location? Those statements next to one another almost contradict each other. I wonder if they throw in the "before each flight" comment as a CYA?

I have wondered the same thing. Perhaps it is a bit of CYA. For me, common sense says don't recalibrate if the system doesn't ask for one, and you have doubts about the ability to get a clean calibration in the available environment. But no harm in recalibration if you have the opportunity to take advantage of a nice clean open field.
 
Last edited:
I think you may be missing the point. Calibrating before every flight is not improving your navigation accuracy. When you do that, you actually make it worse in most cases. It is better to do one good calibration carefully, in a very good environment, and try to keep that good calibration data as long as you can. When the drone is in flight, it is so far away from nearby ferrous materials and electronic devices, that it mostly sees the true earth magnetic field, which is the ideal environment you are trying to calibrate. To the extent you can, you want to replicate that ideal on the ground by calibrating as far as you can from anything that would disturb the true natural background earth magnetic fields that you will see in flight. It is difficult to get an undisturbed magnetic environment on the ground near all the man made fields and ferrous objects. Play with a compass and watch how much it varies while you move around the house. But once you find a local spot to get away from all those nearby peculiar magnetic field disturbances, and finally get a good calibration on the true earth fields, you don't want to throw that calibration data away and replace it with whatever degraded calibration data you might collect wherever you fly next. The true earth data doesn't vary more than a degree, over a hundred miles or so. But the local corrupted magnetic field close to the ground can vary enormously (tens of degrees) by a hundred different nearby devices, wires, etc, that your drone will never see once it gets 100 feet away in any case. So unless you move 100 miles away, where the true background earth fields vary enough to make recalibration useful, it is counterproductive to recalibrate at every flight.
There's no hard distance that I follow. I've gone 600 miles and back with no recal need.
I use a quick hop and test a/c response to determine the need.
 
  • Like
Reactions: SkyHog
You might be the only other person here who gets that! With the Phantom and most AHRS systems, the IMU and GPS do most of the work with respect to determining craft orientation for the purposes of keeping it in the intended position but being that the IMU is relative and prone to error, the compass is indeed the only absolute reference for orientation. This is the reason it is used to align the gimbal with the horizon.
Doesn't the IMU include x, y, and z-axis gyros that support integration and sensor fusion with compass? My guess is this system is not fundamentally different than most aircraft nav systems. The IMU is very good for fast and accurate short term responsiveness, while the compass is good for absolute orientation in the xy plane, and ambiguity resolution, though the compass is relatively much less responsive than the gyro in short timeframes. Each sensor has it's strength, and the combination works great. Yes, the compass is important.
 
Last edited:
Yes. Rate gyros are included.
 
You might be the only other person here who gets that! With the Phantom and most AHRS systems, the IMU and GPS do most of the work with respect to determining craft orientation for the purposes of keeping it in the intended position but being that the IMU is relative and prone to error, the compass is indeed the only absolute reference for orientation. This is the reason it is used to align the gimbal with the horizon.
Thanks for the props!

Before we both get too proud of ourselves, keep in mind that the accelerometers in the IMU detect absolute orientation as well, due to gravity -- which shows as a downward "acceleration" as seen by the IMU.

Not sure how DJI uses these two sources of orientation... I expect they use all three (2 IMUs and the 3-axis calibrated compass) to cross-check each other and to provide redundancy.

Don't know if they implemented it or not, but 3 sources enable a voting algorithm for sensing, a technique that was used in the Shuttle computer setup. It also gives rudimentary "error detection and correction" -- if two agree and one doesn't, it's near certain the one off is wrong. Can't do this with a simple redundant backup.

Okay, so that was a lot of blather, but thinking about the entire system got me pondering :D
 
  • Like
Reactions: SkyHog
Thanks for the props!
Before we both get too proud of ourselves, keep in mind that the accelerometers in the IMU detect absolute orientation as well, due to gravity -- which shows as a downward "acceleration" as seen by the IMU.

I've noticed the same thing. A good IMU calibration always ends with -1 in the z direction, and zeros in x and y. I'm sure this helps with initial orientation, but typical gyro drift probably precludes holding true North throughout a lengthy mission, without help from the compass or reference to a GPS path, and the same may be true of holding orientation with respect to the horizon, without other help. I'm not sure about that though.
 
Doesn't the IMU include x, y, and z-axis gyros that support integration and sensor fusion with compass? My guess is this system is not fundamentally different than most aircraft nav systems. The IMU is very good for fast and accurate short term responsiveness, while the compass is good for absolute orientation in the xy plane, and ambiguity resolution, though the compass is relatively much less responsive than the gyro in short timeframes. Each sensor has it's strength, and the combination works great. Yes, the compass is important.
You are correct, but leave a few things out.

A 3-axis compass is capable of completely resolving the geomagnetic vector relative to the AC in 3-space, not just the directional heading. If the nominal vector* is known, then the absolute orientation of the AC in all three axes can be determined.

The accelerometers in the IMU(s) can only sense plumb -- i.e., whether the AC is level. It can not sense absolute rotational orientation (i.e. "compass direction").

BTW, the fact that the IMU can sense plumb is how compass calibration works, and why you need to rotate the craft around only 2 axes, instead of 3.



*The vector relative to a level surface, measuring and saving this is what a calibration does, which is why you want to do it somewhere duplicating the flight environment as much as possible -- wide-open field
 
  • Like
Reactions: Loz and SkyHog
I've noticed the same thing. A good IMU calibration always ends with -1 in the z direction, and zeros in x and y. I'm sure this helps with initial orientation, but typical gyro drift probably precludes holding true North throughout a lengthy mission, without help from the compass or reference to a GPS path, and the same may be true of holding orientation with respect to the horizon, without other help. I'm not sure about that though.
Your right. In fact, the IMUs are essentially the same component in an Inertial Navigation System on the big guys. In fact, that truly what it is -- sensitive accelerometers that measure accelerations, with on-board logic that time-integrates these inputs to generate pseudo-gyros (there aren't real gyros, of course).

A big bird INS uses actual gyros, which are far far more accurate and much more "quiet" in terms of their signal output, and then electronics apply time differential (df(t)/dt) on the x, y, z positions of the gyro to get acceleration signals.

Our solid state IMUs are not accurate enough, and way too noisy, to use for precision navigation. Hence, the absolute reliance on other sensors -- GPS and Compass. The best INS systems can navigate globally point to point without GPS.
 
  • Like
Reactions: SkyHog
It's worth looking into to learn more about how the individual sensors complement each other.
Also the difference between heading (compass indication) and course (path over the ground or surface).
 
  • Like
Reactions: SkyHog
There's no triple mode redundancy voting system like what is found in an actual aircraft but there is a comparison and evaluation between the two independent sensors against data that is fused from other sensors.

Sensor fusion which is at the core of all MEMs based AHRS systems basically derives more sophisticated results from multiple sensors of different types, each with their own level of accuracy and vulnerabilities to errors. It's similar to how your eyes and inner ear work together to figure out your orientation to the ground. It is also what takes place in many physical computing devices like health monitors, iPhones (Core Motion), etc. all made possible by cheap MEMs.

And as for accelerometer, you can use it to find the gravitational vector when stationary. When in motion, it gets more complicated but it can still help when fused with other sensors.
 
  • Like
Reactions: SkyHog
dwallersv, Thanks much for the clarification on all this. That makes sense to me.
No problem. One bit of clarification (I'm doing this from memory) when I was talking about integrating the output of the accelerometers I was referring to integrating a synthesized component -- angular velocity-- to synthesize the gyro.
 

Recent Posts

Members online

No members online now.

Forum statistics

Threads
143,066
Messages
1,467,352
Members
104,933
Latest member
mactechnic