DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

A short explanation of compass function, calibration and errors.

Touch the MiniMap, the viewfinder and map should change places.

(I have the MA2 and the FLY app, it's been a while since I used the GO4 app)

Interesting development. Out seeing how it behaves in strong wind, about 25mph updraught on the edge of a ridge. Once away from the ridge to windward it was fine, in the turbulent air along the ridge it was being properly buffeted, I was impressed with how it handled such conditions to be honest. It was also very cold, to the point my hands froze and I had to ask some walkers to take everything apart and put it away for me after I landed.

Anyway, while it was up I did the map press and LO, the map changeth places! However, I also got a message to say there was no GPS available because my device hadn't got a location. Or words to that effect. What do I have to do to get this function on the system please? There is obviously a set up I haven't done, didn't know it was there, or haven't got.

To brighten the place up, here is a panoramic I got it to take while it was hovering.
 

Attachments

  • DJI_0493.jpg
    DJI_0493.jpg
    9.8 MB · Views: 39
Last edited:
What do I have to do to get this function on the system please? There is obviously a set up I haven't done, didn't know it was there, or haven't got.
You have to:
1. Have a phone or tablet with a GPS receiver built-in
2. Enable GPS in Location Services on your phone or tablet.

None of this is realted to the topic of the thread and it would be best start a new thread if you want to continue.
 
You have to:
1. Have a phone or tablet with a GPS receiver built-in
2. Enable GPS in Location Services on your phone or tablet.

None of this is realted to the topic of the thread and it would be best start a new thread if you want to continue.
I thought this was about how the compass and stuff worked. So how is my GPS message NOT relevant? I don't understand how on a compass topic feedback about lack of compass doesn't fit.

I shall if I can find out about how to turn on location services - there is no card in it. It is only used as a flying screen, nothing else.
 
Last edited:
I thought this was about how the compass and stuff worked. So how is my GPS message NOT relevant? I don't understand how on a compass topic feedback about lack of compass doesn't fit.

I shall if I can find out about how to turn on location services - there is no card in it. It is only used as a flying screen, nothing else.
The thread is about the compass, and is an important resource for people seeking to understand their compass.
But now the last 7 posts are about your map window and basic configuration of your phone.
No it makes no difference if you have no sim card.
You'll find Location Services in your phone settings.
 
  • Like
Reactions: KingRat
The thread is about the compass, and is an important resource for people seeking to understand their compass.
But now the last 7 posts are about your map window and basic configuration of your phone.
No it makes no difference if you have no sim card.
You'll find Location Services in your phone settings.
OK thanks.
 
You have to:
1. Have a phone or tablet with a GPS receiver built-in
2. Enable GPS in Location Services on your phone or tablet.

None of this is realted to the topic of the thread and it would be best start a new thread if you want to continue.
 
Thanks for your insights. I am contemplating buying a wify only tablet [no gps].
Does this mean i will be unable to perform the orientation pre flight check? Seems odd that the drone would rely on the display to tell it where its at and where it is pointing. can you explain further this interplay between drone- controller-display. Am new here so patience may be needed.Thanking you
 
Thanks for your insights. I am contemplating buying a wify only tablet [no gps].
Are you buying an iPad - Apple don't supply a GPS receiver with their wifi only iPads.
But almost all Android tablets have GPS
Does this mean i will be unable to perform the orientation pre flight check?
Are you using DJI Go 4 (DJI drones before the Mavic Mini), or DJI Fly (only for the most recent DJI models?
The orientation indicator in Go 4 works without needing a GPS receiver in the tablet
The one in DJI Fly seems to require GPS in the tablet (but I can't imagine why).
Seems odd that the drone would rely on the display to tell it where its at and where it is pointing.
The drone has a perfectly good GPS receiver and that's what it uses for all flight functions.
The GPS receiver in your phone or tablet can't tell where the drone is and it isn't used for any flight functions.
can you explain further this interplay between drone- controller-display. Am new here so patience may be needed.Thanking you
It's complicated but I'll try to give a simplified version.
The drone's GPS receiver is constantly calculating where the drone is in 3D space.
The drone's flight controller uses this data (and lots more from other sensors) for flight
Location data and a lot more is sent to the controller for the app to process and record.
Your joystick input is sent from the controller and the flight controller translates this and sends the appropriate commands to the motors.
 
Thanks for reply; Yes is apple ipad mini 5 . drone is mavic2 zoom dji go 4 app. Seems like I will be ok. Thanks for clearing this up.
 
Now I’m not an expert and I am just thinking this through.

However, if the tablet phone does not have GPS I imagine that the functionality of the “relative position indicator RC to Drone” cannot function. ( Little arrow at bottom of screen giving direction of drone to the operator )

I say this because the Drone knows where it’s location is, but the RC will not know and therefore I cannot think how it works that function out. Now, it could use something in the occusync, it’s possible but I doubt it (no triangulation )

So whilst I think everything will work no worries, it’s just that direction function that would not work if the device on RC has no GPS. I cannot test this as both my tablet & phone do have GPS.

Be great if someone can confirm that it does or doesn’t work. Something I’d like to know, especially if I need to purchase/replace equipment going forward.
 
However, if the tablet phone does not have GPS I imagine that the functionality of the “relative position indicator RC to Drone” cannot function. ( Little arrow at bottom of screen giving direction of drone to the operator )
If your drone uses DJI Go 4, the orientation indicator works perfectly without GPS in your tablet.
For some unknown reason, DJI's changed things with DJI Fly and it's different in this regard.
I say this because the Drone knows where it’s location is, but the RC will not know and therefore I cannot think how it works that function out.
The drone is constantly recording a whole lot of data from its sensors and relaying that to the app.
Because of that the app has information on the drone's position, orientation and a hundred other things.
 
I believe Go uses HP position as attitude indicator center. The map clearly marks HP point.

Most of us believe Fly uses device GPS as orientation indicator center, but some believe it's the HP position. Map also shows HP and if possible device position.
 
I believe Go uses HP position as attitude indicator center. The map clearly marks HP point.

Most of us believe Fly uses device GPS as orientation indicator center, but some believe it's the HP position. Map also shows HP and if possible device position.
What is HP Positioning please?
 
Very good write up. Should be mandatory reading for those new to flying ops.

Interesting comment about an "essential pre-flight check - every flight" due to the potential consequences which I had not considered.

In a different life, the time/distance associated with compass calibration (or what I would call a compass swing) was to compensate for changes to the local magnetic field, the aircraft magnetic field and/or to acknowledge that the compass itself like any moving part, needs periodic inspection/verification after use in the "harsh aviation environment."
 
BACKGROUND

The aircraft compass is often misunderstood, both in terms of function and purpose, and so it is important to have a clear understanding of what the compass measures, why, and what happens to that information.

At the most basic level the purpose of the compass is to measure the earth’s magnetic field in order to find magnetic north relative to the aircraft heading. At any point near the earth the magnetic field is a single-valued vector quantity described by field strength and direction, and the compass comprises a 3-axis magnetometer aligned with the principle axes of the aircraft (x, y, z), independently measuring the local magnetic field components parallel to those axes.

THE EARTH’S MAGNETIC FIELD

The earth's core is magnetized due mostly to rotation, with magnetic north towards the North Pole and magnetic south towards the South Pole, although the two axes are not perfectly aligned.






In magnetic terms, the earth's north pole is actually a magnetic south pole, and the south pole a magnetic north pole, and so the magnetic field lines emanate from the magnetic south pole and return to the north pole in the classic bar magnet pattern, and so at any point on the surface of the earth the magnetic field lies at an angle to the ground, (except near the equator where it is approximately horizontal) called the inclination, and points towards the magnetic north pole.

Since the magnetic north pole and the geographic north pole are not in the same place there will, in general, be an angle between the horizontal component of the magnetic field lines (that point to magnetic north) and the direction of the geographic North Pole (true north). That angle varies by location since, as you look to the north, the apparent relative positions of magnetic north and true north depend on where you are. That offset is called the declination (or variation). So if you also know the declination (you have to know it based on your location since there is no way to measure it) then you can subtract the declination angle to determine where true north is.

Back to the compass - its only job is to determine the direction of magnetic north, and to do that it measures the direction (relative to the aircraft) of the horizontal component of the local magnetic field. If the only magnetic field that it saw were the earth's field then that would be trivial, but the aircraft, itself, has a magnetic field due to internal ferromagnetic components which will, in general, change the direction of horizontal component of the field.

Luckily, magnetic fields follow the Superposition Principle, which means that if two separate magnetic fields interact, the net field vector at any location is simply the vector sum of the individual fields. So, if the magnetic field of the aircraft can be independently measured then, with the assumption that it doesn't change as the aircraft moves around, it can simply be subtracted from the total magnetic field measured by the compass to leave just the earth's magnetic field.

COMPASS CALIBRATION

Measurement of the aircraft’s internal magnetic field at the compass location (it won’t be uniform throughout the aircraft) is achieved by the calibration process since, as the aircraft is rotated, the earth's magnetic field appears to rotate while the aircraft's magnetic field stays constant. The orthogonal rotations in the calibration process allow those two fields to be separated mathematically, and the FC now has the aircraft's magnetic field (the calibration) stored. It subtracts that from the measured field in flight, takes the horizontal component of the resulting field (now assumed to be just the earth's) and thus knows its heading relative to magnetic north.

CORRECTING TO GET TRUE NORTH

However, for navigation the FC needs the aircraft heading relative to true north, since that is the basis of the coordinate system for positioning, such as latitude/longitude. To calculate that heading it has to add the local declination value. There is a common misconception that somehow the calibration process determined declination but it should be obvious that it cannot do that. The orientation of our coordinate system is arbitrary relative to magnetic north and there is no way, as I mentioned above, to figure out the difference between true north and magnetic north with a compass; you have to know the declination separately by looking it up on a map, or calculating it approximately using spherical geometry and knowing the relative positions of the true north pole, the magnetic north pole and your location or, for the most accurate results, using your location with a global model of the earth's field.

The FC does the latter - it has a stored global magnetic field model in firmware and as soon as it gets a GPS position lock on startup it computes the declination (and inclination) from the model and adds the declination to the magnetic heading from the compass. Now it has true heading. That process is documented in the DAT file.

COMPASS INTERFERENCE

Note that all this assumes that there are no other magnetic fields present - only the earth's and the aircraft's. If there are other fields due to ferromagnetic structures, large or small, then the aircraft may or may not be able to detect their presence. The FC has field strength and magnetic field inclination criteria for acceptable measured magnetic field. On the M2, and quite possibly all the models, the total field strength is expected to be in the range 1400 - 1800 µT, as documented here and shown in the graph below. But beyond that, any local field potentially just changes the apparent direction of magnetic north and, if that error is significant, leads to all the common problems after takeoff.

View attachment 104335

The relationship between compass interference values and magnetic field strength.

Those flight problems are also not obvious in their origin - many people ask why, since very local magnetic interference will go away after takeoff, the problem only manifests afterwards during flight. The answer lies in the way that the FC actually computes heading (yaw). The primary yaw sensor in flight is not the compass - it is the rate gyros - i.e. the heading is primarily tracked inertially in flight, not magnetically. The IMU heading is initialized using the compass heading, before takeoff and after the declination has been computed. Once airborne the compass is only used to correct for drift in the rate gyro data. So if, after takeoff, the magnetic interference goes away, then the compass heading will change without the IMU ever detecting rotation of the aircraft, and the IMU and compass now disagree by far more than the drift correction algorithm can handle. That's the source of all the compass and yaw errors and, since the FC now doesn't know which way it is pointing, it cannot navigate and, unless it quickly switches to ATTI mode, will fly uncontrollably if it tries because it will try to correct for course or position deviations by applying thrust in the wrong direction. That has been the cause of almost all so-called “flyaways”. Any error over 30° or so can cause flight control problems, and anything over 45° will lead to loss of control. Around 90° leads to the classic toilet-bowl flight profile, while 180° causes a simple linear accelerating flight in exactly the wrong direction.

INTERFERENCE CORRECTION

I wondered for some time why DJI didn’t add some code to notice the compass change at takeoff from a magnetically distorted site. On takeoff, as the aircraft climbs out of the local interference but the rate gyros detect no rotation, the obvious correction is simply to re-initialized the IMU heading to the new compass heading. In fact they did exactly that with the second firmware upgrade to the Mavic 2, but previous models still don’t do that. It appears that the Mini and the Mavic Air 2 might have that functionality, but not yet confirmed.

There is also the question of "bad calibrations" - can they happen? I think there are a few scenarios in which that might occur. If the user is wearing something magnetic that may make it appear to be part of the aircraft's magnetic field. Or if the magnetic field is local enough to vary as the aircraft is rotated - that might have a similar effect.

COMPASS INTERFERENCE AND CALIBRATION MESSAGES

A persistently confusing issue is the well known message at power up: “Compass error. Move the aircraft or calibrate the compass.” It’s confusing because it often isn’t even accurate; it can mean several different things, a couple of which are not errors at all:
  1. The magnetic modulus (total magnetic field strength) is outside the expected bounds (error);
  2. The magnetic inclination is incorrect for the location (error);
  3. It is more than 30 days since the last compass calibration (M2 and newer models) - not an error - a firmware trigger;
  4. The aircraft is more than 50 km (30 miles) from its previous takeoff location - not an error - a firmware trigger.
(1) and (2) may be the result of local interference, in which case calibration is unnecessary, and moving the aircraft is appropriate. Or they may be the result of a change in the magnetic field of the aircraft itself, either due to components added/removed or components becoming magnetized due to exposure to a strong external magnetic field, in which case moving won’t help and calibration is required, or possibly even demagnetization of the aircraft.

To be fair to DJI, the causes of (1) and (2) cannot easily be distinguished and so the message is reasonable, but it would be much more helpful if (3) and (4) were explicitly spelled out with a different message.

The only way to be certain about what is going on and to establish whether it is safe to fly is:
  1. Check the aircraft orientation arrow on the map - it should be pointing in the same cardinal direction as the aircraft on the ground;
  2. Check the magnetometer interference values in the app - if they are low (green) then the magnetometer readings are within specification.
(1) should be regarded as an essential pre-flight check - every flight. It would cut flyaways to nearly zero. But that neither of those checks is recommended by DJI, which is rather unfortunate. If the app is going to recommend just one essential check before takeoff - it really should be the orientation arrow which is far more likely to be a problem than an incorrect home point.

If the magnetometer interference readings are high or the aircraft orientation arrow is incorrect then there is magnetic interference at the compass - either external or internal - and moving the aircraft or calibrating will be required. If the interference values are low and the arrow is correct then the message was due to (3) or (4). You can recalibrate as requested but the aircraft is good to fly, and you can actually ignore the message - it will go away on motor start, but come back on the next power up.

Of course the question still remains - why do some models request periodic recalibration? Previous models didn’t do that. Worse still, the user manuals for DJI aircraft have been completely random on the subject in the past - some recommended only calibrating when requested and some recommended calibrating when moving any significant distance. Time was not previously a stated reason. The distance recommendation led many people to assume, incorrectly, that it had something to do with compensating for magnetic declination, but of course that’s physically impossible. So it's currently unclear why this was implemented. It could be that the DJI engineers decided that transport was one common cause of exposure to magnetic fields, or that periodic calibration might help to keep the compass performing closer to nominal. There is certainly no obvious physics-based reason.
Very good explanation of a very complicated matter. One question: there are people, talking about the 'demagnetization of the compass', some even show video, using a magnet on the drone, as if they were 'blessing' the device. Others say that turning on the drone at home (indoor) can cause permanent problems with the compass? Is there any truth to this?
 
Last edited:
Very good explanation of a very complicated matter. One question: there are people, talking about the 'demagnetization of the compass', some even show video, using a magnet on the drone, as if they were 'blessing' the device. Others say that turning on the drone at home (indoor) can cause permanent problems with the compass? Is there any truth to this?
It's very rare that anyone should need to demagnetise their compass.
No, turning the drone on indoors doesn't cause permanent problems with the compass.
Although you could have compass problems flying in an indoor environment.
 
  • Like
Reactions: Thomas B and sar104
Very good explanation of a very complicated matter. One question: there are people, talking about the 'demagnetization of the compass', some even show video, using a magnet on the drone, as if they were 'blessing' the device. Others say that turning on the drone at home (indoor) can cause permanent problems with the compass? Is there any truth to this?

Just to expand slightly on @Meta4's answer, it is not the compass itself that needs to be demagnetized, because it has no ferromagnetic parts. The compass calibration corrects for (by subtraction) any magnetic field due to the aircraft, provided that it is not too strong. If a ferromagnetic component (or components) on the aircraft becomes too strongly magnetized then the calibration will fail and the component(s) will need to be demagnetized.

But that kind of strong magnetization requires exposure to a strong external magnetic field, which won't simply happen due to powering up indoors. In fact it's completely independent of whether the aircraft is powered up or not, and most commonly occurs when the aircraft is stored or placed next to a strong magnet for an extended period of time.

Most compass issues are caused by powering up in the presence of an external field - not because it permanently magnetizes anything on the aircraft, but rather because it causes the IMU yaw value to be incorrectly initialized. That's simply fixed by powering down, moving the aircraft away from the interfering magnetic field, and then restarting.
 

DJI Drone Deals

New Threads

Members online

No members online now.

Forum statistics

Threads
134,578
Messages
1,596,448
Members
163,078
Latest member
dewitt00
Want to Remove this Ad? Simply login or create a free account