Compass understanding
2283 22 2017-5-19
Uploading and Loding Picture ...(0/1)
o(^-^)o
Roadstar1700
lvl.2
Flight distance : 1203484 ft
United States
Offline

Today is the second time I had a bad experience with a compass error. The first time happened a year ago, but it was my fault for re-calibrating the compass when there was magnetic interference. That time I came to within 1' of landing in the water.

Today I had a "good to go" for flight. When I climbed to ~60' the AC took off to the right and circled around behind me. I brought it down and luckily landed in grass with no damage. My flight log indicated a compass error. I'm not sure what I encountered, but was in an area that used to be an ore mining operation years ago.

My question is this: Why does the AC move from its position because of a compass error? I would expect the GPS would hold it in place and the barometer would hold its altitude.
With a compass error I would expect the AC to rotate on its axis in its stationary position while trying to lock in on a valid compass reading, but not move out of position.

2017-5-19
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

There's compass errors and compass errors.  They aren't all the same.
Did you calibrate the compass before this flight or stick with a known good calibration?
What was being mined where you flew?

In a simple compass error situation the Phantom will slowly spiral around (toilet bowl effect) but if you encounter a big compass error, you might see the Phantom flying quite fast where you are not controlling it.
That is most often observed where people launch from steel or reinforced concrete surfaces.
The explanation is technical but you can read it here:  http://www.phantompilots.com/thr ... /page-2#post-915176
What was your launch point?

You can get more insight by looking at flight data.
Go to http://www.phantomhelp.com/LogViewer/Upload/
Follow the instructions to upload your flight record.
Come back and post a link to the report it provides if you need help.
2017-5-19
Use props
DJI-Jamie
DJI team
Flight distance : 112405 ft
United States
Offline

The compass dictates the unit's heading, the unit will try to try and find its orientation according to the data it's receiving.
2017-5-19
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

"My question is this: Why does the AC move from its position because of a compass error? I would expect the GPS would hold it in place and the barometer would hold its altitude."

Generally the barometer does hold altitude, unless the aircraft falls over.

Also, it generally will hold it's position, for a while at least, as long as you don't go too high or start to move sideways.  

The problem comes when you gain a bit of altitude and get into the wind, the wind then pushes it out of position, to get back into position without VPS it knows which way to move because of GPS, but to go in that direction it has to tilt in the correct direction and for that it needs the compass, GPS can't tell it which way is north, only where it is.  If it has a compass error then when it tilts to fly back to the GPS position it tilts the wrong direction and so flies in the wrong direction, it then has to correct that error so changes the tilt angle repetitively and thus ends up flying in a curve.

While holding position using VPS instead of GPS the VPS tells it what angle to tilt for the correction so it doesn't need the compass, thus compass errors don't normally cause crashes while you are still near the ground and haven't started to fly away.
2017-5-19
Use props
Mark The Droner
First Officer
Flight distance : 2917 ft
United States
Offline

You might find this OP informative:  http://www.phantompilots.com/thr ... plete-primer.32829/
2017-5-19
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

"My question is this: Why does the AC move from its position because of a compass error? I would expect the GPS would hold it in place and the barometer would hold its altitude."

The other factor I left out is that when you get a compass error, your Phantom can't deal with conflicting data from GPS and compass.
To deal with this, it ignores GPS data and drops into atti mode.
Once you are in atti mode, you have no position hold and your Phantom can drift or be blown around.
2017-5-19
Use props
Roadstar1700
lvl.2
Flight distance : 1203484 ft
United States
Offline

Labroides Posted at 2017-5-19 16:23
There's compass errors and compass errors.  They aren't all the same.
Did you calibrate the compass before this flight or stick with a known good calibration?
What was being mined where you flew?

I didn't calibrate the compass before flying. I flew a few days before with good compass readings.

I took off in a small grassy park near a stream. There was a large open structure with picnic tables that had a metal roof. I was ~20 feet from it when lifting off. The area was mined for iron ore, but having a good compass reading before takeoff I didn't think that would be a problem after getting some altitude.

I lost one of the white plastic covers on the legs. Didn't notice it was missing until I returned home.

I took it out later that same day back home with the same compass cal and it flew great.
2017-5-20
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

Roadstar1700 Posted at 2017-5-20 05:04
I didn't calibrate the compass before flying. I flew a few days before with good compass readings.

I took off in a small grassy park near a stream. There was a large open structure with picnic tables that had a metal roof. I was ~20 feet from it when lifting off. The area was mined for iron ore, but having a good compass reading before takeoff I didn't think that would be a problem after getting some altitude.

The problem was almost certainly the iron ore still in the ground meaning the Earths magnetic field was not pointing north.  No way for the aircraft to tell when it was on the ground but as soon as it moved it flew in the wrong direction which resulted in the GPS showing it in the wrong place, at that point it has to assume that it is drifting due to wind so has to correct for the wind which just makes things worse when there wasn't any wind and it ends up flying in big arcs.

If it had been due to the steel roof then it would have sorted itself out as soon as it moved away from the roof but iron ore deposits affect the Earths magnetic field over large areas.

If it could tell when the compass is wrong then it wouldn't need the compass since it already knows the correct value!  It is only when the compasses are inconsistent that it can tell there is a problem but over an iron ore deposit the compasses are working correctly, just not pointing north.
2017-5-20
Use props
Matt-and-Riley
lvl.4
Flight distance : 324442 ft
United Kingdom
Offline

Labroides Posted at 2017-5-19 18:46
"My question is this: Why does the AC move from its position because of a compass error? I would expect the GPS would hold it in place and the barometer would hold its altitude."

The other factor I left out is that when you get a compass error, your Phantom can't deal with conflicting data from GPS and compass.

What is the conflict between the GPS and compass, I don't think they share any data?

I thought Nigel-w above was right in saying when the compass fails it doesn't just spin trying to get it's heading, the wind moves it so it has to move back but can't get back so spirals around.


ps.. This is a genuine question, not trying to upset the harmony

Everyone up vote NigelW answer, I'm sure he got it first
2017-5-20
Use props
Matt-and-Riley
lvl.4
Flight distance : 324442 ft
United Kingdom
Offline

DJI-Jamie Posted at 2017-5-19 16:58
The compass dictates the unit's heading, the unit will try to try and find its orientation according to the data it's receiving.

Am I really going to do this ......

I don't dispute your statement, but hasn't really answered the guys question. I would expect a higher standard, lead by example and all that.

Think Nigel got it, so all good here.


Runs for cover....
2017-5-20
Use props
hallmark007
Captain
Flight distance : 9827923 ft
  • >>>
Ireland
Offline

It's always a good idea to check compass heading and aircraft heading before you take off.
2017-5-20
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

Matt-and-Riley Posted at 2017-5-20 10:44
What is the conflict between the GPS and compass, I don't think they share any data?

I thought Nigel-w above was right in saying when the compass fails it doesn't just spin trying to get it's heading, the wind moves it so it has to move back but can't get back so spirals around.

They both feed data to the flight controller.
It is seeing data from the GPS for each 1/10th of a second with updated position info.
The info shows it has moved from position X to position Y over time period T, the FC calculates things like speed, distance travelled and direction travelled.
If the position data indicates that the Phantom has moved in the direction of North but the compass data says something else, that is conflicting data. <<Does not compute>>
How does the FC handle conflicting data?  
It can't so it drops one and just uses the other.
2017-5-20
Use props
Roadstar1700
lvl.2
Flight distance : 1203484 ft
United States
Offline

Labroides Posted at 2017-5-19 18:46
"My question is this: Why does the AC move from its position because of a compass error? I would expect the GPS would hold it in place and the barometer would hold its altitude."

The other factor I left out is that when you get a compass error, your Phantom can't deal with conflicting data from GPS and compass.

I've flown in ATTI mode before and let the wind move me around. I can't remember now if the AC rotates around its axis as it's moving with the wind. Is the compass still active keeping the AC pointing in the last commanded direction?
2017-5-20
Use props
Roadstar1700
lvl.2
Flight distance : 1203484 ft
United States
Offline

Nigel_ Posted at 2017-5-20 05:49
The problem was almost certainly the iron ore still in the ground meaning the Earths magnetic field was not pointing north.  No way for the aircraft to tell when it was on the ground but as soon as it moved it flew in the wrong direction which resulted in the GPS showing it in the wrong place, at that point it has to assume that it is drifting due to wind so has to correct for the wind which just makes things worse when there wasn't any wind and it ends up flying in big arcs.

If it had been due to the steel roof then it would have sorted itself out as soon as it moved away from the roof but iron ore deposits affect the Earths magnetic field over large areas.

I ran a compass app right after my errant landing and it indicated a normal uT value of 55uT's, but I also remember the direction it told me was North. I just checked on Google Maps and its indication of North was actually slightly North of West.

You are right. The AC had no way of knowing the compass's were giving incorrect data to the flight controller. It was somewhat windy that day and as soon as the AC was moved slightly out of stationary hovering position the GPS and compass data conflicted dropping it to ATTI mode. Who's to say what compass data was being fed to the FC as the wind was moving it through a 3D box with magnetic ore in the area. This is what causes the AC to rotate as it's arcing through the air.

I'm finding it's not fun living in a mining region.
2017-5-20
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

Roadstar1700 Posted at 2017-5-20 17:44
I've flown in ATTI mode before and let the wind move me around. I can't remember now if the AC rotates around its axis as it's moving with the wind. Is the compass still active keeping the AC pointing in the last commanded direction?

Yes ... the compass is a critical flight component in all modes.
In atti mode the Phantom should perform normally except it has no horizontal position holding ability.
It will maintain heading.
2017-5-20
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

Roadstar1700 Posted at 2017-5-20 18:04
I ran a compass app right after my errant landing and it indicated a normal uT value of 55uT's, but I also remember the direction it told me was North. I just checked on Google Maps and its indication of North was actually slightly North of West.

You are right. The AC had no way of knowing the compass's were giving incorrect data to the flight controller. It was somewhat windy that day and as soon as the AC was moved slightly out of stationary hovering position the GPS and compass data conflicted dropping it to ATTI mode. Who's to say what compass data was being fed to the FC as the wind was moving it through a 3D box with magnetic ore in the area. This is what causes the AC to rotate as it's arcing through the air.

"This is what causes the AC to rotate as it's arcing through the air."
I don't think it rotates as it flies in an arc in a situation like yours where the compass is consistent over a wide area, just pointing in the wrong direction, I think it just flies increasingly sideways trying to overcome the imaginary wind, however I've never looked at video from a nice arcing flight over iron ore, maybe you could have a look at yours and confirm if it rotates or flies sideways...
2017-5-21
Use props
Roadstar1700
lvl.2
Flight distance : 1203484 ft
United States
Offline

Nigel_ Posted at 2017-5-21 01:18
"This is what causes the AC to rotate as it's arcing through the air."
I don't think it rotates as it flies in an arc in a situation like yours where the compass is consistent over a wide area, just pointing in the wrong direction, I think it just flies increasingly sideways trying to overcome the imaginary wind, however I've never looked at video from a nice arcing flight over iron ore, maybe you could have a look at yours and confirm if it rotates or flies sideways...

I wasn't videoing at the time, but I looked at my flight in the DJOGO 4 app and it shows the AC climbing to 112'. It starts moving backwards, then arcing to its left while pointing due South. 43 seconds into the flight it makes a 360 degree CW rotation followed by another 270 degree CW rotation. It's now pointing just East of North still arcing. It then makes 2 very fast CCW rotations as I'm lowering the altitude.

There were a couple panic stick inputs towards the end, but none in the beginning. My plan in the future when flying in a new location is to start off in an open area away from water/trees, bring it up 15' and check sensor readings. Slowly continue until I feel there is no compass interference.

Thanks for your thoughts Nigel
2017-5-21
Use props
Roadstar1700
lvl.2
Flight distance : 1203484 ft
United States
Offline

Labroides Posted at 2017-5-20 17:16
They both feed data to the flight controller.
It is seeing data from the GPS for each 1/10th of a second with updated position info.
The info shows it has moved from position X to position Y over time period T, the FC calculates things like speed, distance travelled and direction travelled.

Does the on board flight controller need the compass data to hover in one stationary position? In other words, if the flight controller was never programmed to switch to ATTI mode and drop the GPS from the equation when it received a conflict of data between the 2, would the AC hover in one spot? (Assuming the compass data is bad and the GPS is not)

If so, it would be nice to have the firmware updated to allow for the choice between dropping the GPS or the compass data when there is a conflict. I know I would select to drop the compass 10/10 times. It would be better to hover in one spot then having the AC arcing and spinning out of control.

Better yet have a way to switch to manual flight not using either input. It would then be no different than flying an RC helicopter. You'd have a better chance of bringing the AC back in one piece.

2017-5-22
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

Roadstar1700 Posted at 2017-5-22 16:36
Does the on board flight controller need the compass data to hover in one stationary position? In other words, if the flight controller was never programmed to switch to ATTI mode and drop the GPS from the equation when it received a conflict of data between the 2, would the AC hover in one spot? (Assuming the compass data is bad and the GPS is not)

If so, it would be nice to have the firmware updated to allow for the choice between dropping the GPS or the compass data when there is a conflict. I know I would select to drop the compass 10/10 times. It would be better to hover in one spot then having the AC arcing and spinning out of control.

You'd have to ask DJI for that level of detail.
If it was that simple and obvious, I suspect that DJI would have gone that way long ago.
But if it's programmed that way, there's probably a reason for it.
2017-5-22
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

Roadstar1700 Posted at 2017-5-21 05:42
I wasn't videoing at the time, but I looked at my flight in the DJOGO 4 app and it shows the AC climbing to 112'. It starts moving backwards, then arcing to its left while pointing due South. 43 seconds into the flight it makes a 360 degree CW rotation followed by another 270 degree CW rotation. It's now pointing just East of North still arcing. It then makes 2 very fast CCW rotations as I'm lowering the altitude.

There were a couple panic stick inputs towards the end, but none in the beginning. My plan in the future when flying in a new location is to start off in an open area away from water/trees, bring it up 15' and check sensor readings. Slowly continue until I feel there is no compass interference.

Thanks for the info, however when you say "then arcing to its left while pointing due South.", you don't actually know what direction it was pointing because the compass was inaccurate and may have been changing as it travelled.  It makes it hard to diagnose these problems when you can't trust the data in the logs!
2017-5-23
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

Roadstar1700 Posted at 2017-5-22 16:36
Does the on board flight controller need the compass data to hover in one stationary position? In other words, if the flight controller was never programmed to switch to ATTI mode and drop the GPS from the equation when it received a conflict of data between the 2, would the AC hover in one spot? (Assuming the compass data is bad and the GPS is not)

If so, it would be nice to have the firmware updated to allow for the choice between dropping the GPS or the compass data when there is a conflict. I know I would select to drop the compass 10/10 times. It would be better to hover in one spot then having the AC arcing and spinning out of control.

It would be possible to fly without a compass but it would be rather inaccurate, I think the biggest issue is knowing which way is up, without that you can't maintain your balance and that is very bad for a quadcopter which is inherently unstable!

If you don't want to use GPS, you can switch to Atti mode.  Over iron ore it will then fly fine, trying to fly near a steel bridge might still not be so good because of big magnetic changes over short distances.
2017-5-23
Use props
Labroides
Core User of DJI
Flight distance : 9991457 ft
  • >>>
Australia
Offline

Nigel_ Posted at 2017-5-23 00:13
It would be possible to fly without a compass but it would be rather inaccurate, I think the biggest issue is knowing which way is up, without that you can't maintain your balance and that is very bad for a quadcopter which is inherently unstable!

If you don't want to use GPS, you can switch to Atti mode.  Over iron ore it will then fly fine, trying to fly near a steel bridge might still not be so good because of big magnetic changes over short distances.

"If you don't want to use GPS, you can switch to Atti mode.  Over iron ore it will then fly fine, trying to fly near a steel bridge might still not be so good because of big magnetic changes over short distances."

Atti mode just drops the GPS which gives position holding ability.
GPS is not affected ny magnetic influences so why shut it down?
The compass is still used  and subject to problems if you get it down close to magnetic distortion.
2017-5-23
Use props
Nigel_
Second Officer
Flight distance : 388642 ft
United Kingdom
Offline

Labroides Posted at 2017-5-23 00:48
"If you don't want to use GPS, you can switch to Atti mode.  Over iron ore it will then fly fine, trying to fly near a steel bridge might still not be so good because of big magnetic changes over short distances."

Atti mode just drops the GPS which gives position holding ability.

Flying over a large amount of iron ore is similar to flying near the north magnetic pole.  The problem is that if the GPS says it needs to fly geographical north to correct wind drift and the aircraft flies compass north then you get an error which needs to be corrected.  If the magnetic field from the iron ore is strong enough then the correction doesn't succeed and it goes into an arc of continuous corrections.

Switching to Atti mode turns of the automatic corrections so solves the problem, except that you then need to deal with wind drift manually.

Without the compass, when the GPS says it needs to fly north to correct for wind drift, it does not know which way is north so can't correct, effectively it would be in Atti mode, the compass is needed for autonomous position hold in windy conditions.  

It could try flying in a circle until it found which direction gave a GPS position to the north of the start point and then it would know which way is north, but when you add wind drift into the equation that becomes very difficult to do.  The only way it has to know that it is drifting with wind is the GPS position changing.
2017-5-23
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules