Please select Into the mobile phone version | Continue to access the computer ver.
Compass error and flying atti mode
2601 12 2018-7-31
Uploading and Loding Picture ...(0/1)
o(^-^)o
Clay
New
United States
Offline

I have about 5 hours of flight time so far, so take my opinions with a large pinch of salt.
I was flying my spark in a big open space at sunrise a few days ago. I have a controller and phone.   I flew for a few minutes around the parking lot, then headed about 200 yards away and up a hundred feet to hover over a nearby hill. I was just following the crest of the hill when the go app reported a compass error and switched to atti mode.

I centered the controls and stared at the drone expecting it to stop and hover in flight, but it continued along it's flight path.  Having seen some similar videos I thought I was about to see my drone fly away forever.

A few gentle prods of the controls showed I had yaw control, but that yaw did not change flight direction.  So I applied some forward thrust along with the yaw and saw a bit of positive control, though not much.  More thrust and the yaw control became more positive.

It was about this time that it clicked in my head that the drone was not making any attempt to hover in position, and what I was experiencing was my "hovering" drone being blown by a strong wind over the hill.

I turned off my "drone pilot" mind and turned on my "private pilot" mind, looked at  the screen, and just flew the drone.  I found the beautiful sunrise on the horizon, and from there just turned back to my location and flew home manually.  I had a pretty good crab in my flight which I could correct either with yaw or a bit of  slip (my term for sideways thrust).

About half way back the compas error cleared and the drone again began to automatically fight the wind.

I landed, reassured myself that I didn't need to change my pants and thought about what had happened.  I had no idea what up on that hill could cause a compass error.  But I decided to give it another shot.

With a fresh battery I launched and again, flew some patterns around the parking lot for a few minutes with no problem.  Again I headed for the hill and again, after a few minutes I got a compass error and switched to atti mode.  This time I just took a bit more positive control of the drone and finished what I'd planned to do, then flew back towards the car.  Again, about half way back it returned to gps mode.

My first conclusion is that I and everyone should practice flying in atti mode in the wind so you don't freak out when it happens to you.   It's easy to get dependent on all the automation in the drone.

My second hypothisis is that wind was the cause of the compass error.  

As the drone flies, it has access to it's longitude, lattitude, elevation,  compass heading, pitch, roll, and ground track.

If the drone is pointed north, applies forward thrust, but see's it's ground track move south, the only conclusion it can draw is that the compas is wrong.

That's greatly simplified as I'm sure there are several more checks, but if the wind is gusty and the drone can't reliably predict it's direction based on thrust and compass, it will ultimately declare the compass to be wrong and ignore it.  And from what I've read, once the compass is gone, it doesn't use the the GPS because what's the point if you don't know how to control the motors.

I do think that the GPS might be used to maintain altitude as the drone didn't tend to gain or loose altitude wildly and the height field continued to read out accurately.

I've flown several more times since but haven't had a repeat of the compass error.

Sorry if all this is old hat and well understood but I didn't find it discussed anywhere.
2018-7-31
Use props
N2QLT
Captain
Flight distance : 29229 ft
United States
Offline

I'm wondering if there's iron deposits in that hill.
2018-7-31
Use props
Clay
New
United States
Offline

N2QLT Posted at 2018-7-31 11:29
I'm wondering if there's iron deposits in that hill.

Highly unlikely.  No red colored dirt anywhere in the area.

https://www.douglas.co.us/dcoutd ... ountain-open-space/

Previous and subsequent flights have had no issues.  Only that morning.  Surface winds at the time were just a gentle breeze, but the drone was whipping along at a fast pace once atti mode kicked in.  It wasn't till I got the altitude back down into ground effect that the compass error cleared.
2018-7-31
Use props
Gunship9
Captain
United States
Offline

Good job getting on the sticks and doing pilot stuff.  I think most drone operators can't pilot but instead instruct the autopilot.  They are doomed when the autopilot flakes out.  

It is even harder on new drone owners when the drone is facing them, they are flying visually, and all the controls are reversed.   Their right is the drone's left and vice versa.  "I held full reverse and it flew away."

Hovering without GPS stabilization is like balancing a ball on a pin.  You have to constantly be correcting as it keeps trying to fall out of the hover and skate away.


2018-7-31
Use props
DMX_MT
Captain
Malta
Offline

What I think happened is that where you took of there was some Magnetic Interference (Parking Lot with Cars and Power Cables, Lights Etc.) and then as soon as you where going away and rising in Altitude towards more Clear Open Space (The Hill) the Compass was returning back to normal. As the IMU is not effected with Magnetic Interference, it remained the same. When the Spark saw that the Compass was moving and the IMU wasn't moving, it says 'HEY ! Something is Wrong with the Compass !' so it may give you the Compass Error. When there is the Compass Error then the Spark will drop from P-GPS to ATTI Mode.

You really did a Good Job by training yourself in ATTI Mode. Keep it always in VLOS just in case these Unpredicatable Scenarios happen, so you can land and recover the Drone Immediately. Welldone Mate !

Thats what I think happened, I am open to discussion on this.

Watch this Video, as with a Video you can easily understand more how it works -



2018-7-31
Use props
Sparky_17
Captain
Flight distance : 62349 ft
Canada
Offline

Hi, please take my comment with salt .. LOL  i have a friend whos drone flew right into a rock face due to compass errors, this is after it moved to ATTI mode and the winds were strong enough that he couldn't control it.  Needless to say the compass error caused it to go into ATTI mode and voila; crashed.  This might be simular in nature.
2018-7-31
Use props
DMX_MT
Captain
Malta
Offline

Gunship9 Posted at 2018-7-31 11:45
Good job getting on the sticks and doing pilot stuff.  I think most drone operators can't pilot but instead instruct the autopilot.  They are doomed when the autopilot flakes out.  

It is even harder on new drone owners when the drone is facing them, they are flying visually, and all the controls are reversed.   Their right is the drone's left and vice versa.  "I held full reverse and it flew away."


Totally agree with Gunship. Be always Prepared, Thanks to Pilots like Gunship I learned a lot here.

2018-7-31
Use props
djiuser_GXwSwgThfBNN
Flight distance : 135984 ft
United States
Offline

DMX_MT Posted at 7-31 11:47
What I think happened is that where you took of there was some Magnetic Interference (Parking Lot with Cars and Power Cables, Lights Etc.) and then as soon as you where going away and rising in Altitude towards more Clear Open Space (The Hill) the Compass was returning back to normal. As the IMU is not effected with Magnetic Interference, it remained the same. When the Spark saw that the Compass was moving and the IMU wasn't moving, it says 'HEY ! Something is Wrong with the Compass !' so it may give you the Compass Error. When there is the Compass Error then the Spark will drop from P-GPS to ATTI Mode.

You really did a Good Job by training yourself in ATTI Mode. Keep it always in VLOS just in case these Unpredicatable Scenarios happen, so you can land and recover the Drone Immediately. Welldone Mate !

I don’t disagree with this explanation. However, I would like to understand why the AC recovered GPS after a while? if there was a compass interference when the flight started, the entire flight should of have an incorrect compass vs IMU direction from the time the two of them noticed there was a discrepancy. Where or why after the AC went into atti mode the compass “agreed” again with the IMU? also why it took so long for the compass or IMU to notice the discrepancy? I would say the issue should of pop up during the first minute. I have been having similar situations and bugs me to think why it took 3 minutes and a long normal trip (based on the records) to show the problem and second why The problem went away after a while and regained GPS? How the system corrected itself? Does the IMU resets when it turns back on during mid flight and sets a new 0 orientation based on its current parameters? This issue its really bugging me. Thank you!
2018-11-9
Use props
DeuceDriv3r
First Officer
Flight distance : 4698533 ft
United States
Offline

first .. you are not alone... this is happening with greater frequency across the mavic line and spark lines... I too am a pilot .. military.. and have held pilot certifications for 29 years... been flying drones since the days were there were no bind and fly and you HAD to build it yourself  since getting into DJI products back in Sept .. my 50th birthday.. got 2 sparks and a mavic pro.. since I have logged 15.7 hours and 694,907 feet of flying time on them... and have had a handful of atti excursions on both models... reviewing the flight logs and csvview of the files reveals that no amount of satellite lock prevents this... one atti I had 5 bars (full strength/position lock) and 20 sats... the way this goes down is the following.. the yaw and magyaw values are divergent for most of the flight with latest firmwares on these models... when the yaw (the flight controllers idea of heading) disagrees with magyaw (the compass(s) idea of heading) diverge enough, the flight controller no longer knows which to trust.. you will see log entries stating compass error 50 time, 70 times in seconds, followed by imu working exception, followed by atti mode.. it is here where the flight controller disables GPS inputs and 'reboots' the flight controller in an attempt to clear the error...
many times at longer ranges or in areas with weaker signal or interference people tend to loose RC and Video control as well.. theories are that the drone uses some kind of beam shaping/stearing to aid in signal strength and when heading information is not available .. it has no idea where to stear the beam..

either way.. in atti mode you and the wind are the only forces in control (if you are connected)... so pilot on IF YOU CAN  

in some cases the atti clears and in a few cases I had to pilot back to a manual landing

this yaw magyaw deviation began getting ugly about the beginning of the year, end of 2017.. all my aircraft came with 2017 firmware and like others.. I had a couple weeks flying with no compass or yaw errors but after upgrading firmware to stuff that came out this summer, like others.. this began

over on mavicpilots there is a guy that has analized serveral dozen at this point peoples atti flights and its well documented on the yaw magyaw deviation.. and his theory is that the flight contol software filtering or dampening algo has been slowed or dampened too much and the values are always chasing.. but if the drone or the mag compass swings too fast.. a mag induced or wind induced or rapid manuverting induced shif causes one of those values to deviate quickly before the other can catch up to match.. it excedes the deviation permittted by the software and goes into atti mode to 'FIX' it...
2018-11-9
Use props
DeuceDriv3r
First Officer
Flight distance : 4698533 ft
United States
Offline

DeuceDriv3r Posted at 11-9 05:23
first .. you are not alone... this is happening with greater frequency across the mavic line and spark lines... I too am a pilot .. military.. and have held pilot certifications for 29 years... been flying drones since the days were there were no bind and fly and you HAD to build it yourself  since getting into DJI products back in Sept .. my 50th birthday.. got 2 sparks and a mavic pro.. since I have logged 15.7 hours and 694,907 feet of flying time on them... and have had a handful of atti excursions on both models... reviewing the flight logs and csvview of the files reveals that no amount of satellite lock prevents this... one atti I had 5 bars (full strength/position lock) and 20 sats... the way this goes down is the following.. the yaw and magyaw values are divergent for most of the flight with latest firmwares on these models... when the yaw (the flight controllers idea of heading) disagrees with magyaw (the compass(s) idea of heading) diverge enough, the flight controller no longer knows which to trust.. you will see log entries stating compass error 50 time, 70 times in seconds, followed by imu working exception, followed by atti mode.. it is here where the flight controller disables GPS inputs and 'reboots' the flight controller in an attempt to clear the error...
many times at longer ranges or in areas with weaker signal or interference people tend to loose RC and Video control as well.. theories are that the drone uses some kind of beam shaping/stearing to aid in signal strength and when heading information is not available .. it has no idea where to stear the beam..

the 'atti crash' as i like to call it generally happens because the aircraft is already in atti mode before it tells you its going into atti mode.. i.e. you don't have a chance to get off the sticks

why does this matter.. if you are in tripod mode doing a nice gentle 2 miles an hour toward that waterfall.. with the stick full forward ... this is tripod mode after all.. and it goes into atti.. the spark will sprint full forward at 35+ miles per hour and it will crash into said waterfall before you hear the words atti mode spoken by the controller..

I and others have said that an atti mode reboot should warn you seconds BEFORE it reboots AND it should ignore your sticks until you center them back up.. so that when it changes modes you don't go from 2 miles an hour to 40 miles an hour in a random direction..
2018-11-9
Use props
DeuceDriv3r
First Officer
Flight distance : 4698533 ft
United States
Offline

DMX_MT Posted at 7-31 11:47
What I think happened is that where you took of there was some Magnetic Interference (Parking Lot with Cars and Power Cables, Lights Etc.) and then as soon as you where going away and rising in Altitude towards more Clear Open Space (The Hill) the Compass was returning back to normal. As the IMU is not effected with Magnetic Interference, it remained the same. When the Spark saw that the Compass was moving and the IMU wasn't moving, it says 'HEY ! Something is Wrong with the Compass !' so it may give you the Compass Error. When there is the Compass Error then the Spark will drop from P-GPS to ATTI Mode.

You really did a Good Job by training yourself in ATTI Mode. Keep it always in VLOS just in case these Unpredicatable Scenarios happen, so you can land and recover the Drone Immediately. Welldone Mate !

there is one mode he neglects to mention

he makes the ASSUMPTION that its the compass that is wrong....

that is NOT always the case...

IMU yaw .. can be a combination of 'complimentary filtered inputs' or it CAN be pure inertial.. i.e. .. I took off facing north.. I turned a little here.. turned a little there.. now I THINK I am pointing east by adding up the angular changes the IMU saw on its gyros and accelerometers..

with DJI being a closed system.. there is no way of knowing definitively what comprises the IMU yaw value other than to say its not PURE compass data

HOWERVER ... in a particular instance where the app says compass error.. it may INDEED NOT BE THE COMPASS .. it very well COULD be that the compass is correct.. i.e. magyaw is not lying.. but for whatever reason.. the MEMS package or FC complimentary and kalman algorithms etc did not permit the FC from keeping an accurate yaw value based on accelerometer input ...

this is one of the working theories presented over at mavicpilots.. that somewhere in the firmware revisions .. likely due to changing hardware spec

when the mavic 2 and air came into the picture they dropped the redundant compass
the pro 2 line and the air line only have 1 now .. and they also introduced flight autonomy 2.0'

it is highly likely the engineers have had to modify the complimentary filtering algorithms since there are less sensors to fuse so algorithms that deal with fusing data and more importantly determining thresholds of deviation etc had to be changed.. less sensors to compare and fall back on etc...

it is also common knowledge that DJI firmwares are module based.. and its been annotated that modules are shared across different models of aircraft...  so its not unthinkable that engineering and software changes to firmware modules dealing with sensor fusion, dampening, filtering etc have been tweaked for the hardware limitations of these new airframes as they came on line..

so.. again for example as there is no what of knowing what changes actually have been put in firmware as its closed code..

the mavic pro has 2 compass but the mavic pro 2 and air and spark only have 1.. so did the code get optimized for only 1 compass.. is it possible that the mavic pro code no longer even has code to use or sensor fuse, combine the second compass.. ?  etc..

food for thought.. again.. hard to be definitive on what is and is not in the code on closed systems

however what is definitive is seeing .. by looking at the raw data in csvview that the flight controller logs .. there is a definite change in how these values trace out...

and its also definitive that the video only ASSUMES that its always that compass that is wrong and that MAY not be the case.. the only thing that warning message measures is that the FC has a discrepancy between the 2 values.. thats it.. and I am not talking about the mag interference warning perse or the mag inteference bar.. I am talking about the imu working exception as that seems to be the message that is given when the flight controller has reached the threashold of sensor deviation
2018-11-9
Use props
djiuser_gPtjI2P1TcGC
lvl.1
Flight distance : 254852 ft
Norway
Offline

Hi everyone

I have struggled with the annoying comapss error for a YEAR!

Today i FIXED IT, and I will tell you how.
(or jump to SOLUTION)

The symptoms:
* drone is not flying straight forward, but goes diagonally
* drone is drifting in yaw axis with no input from controllee
* drone throws GPS error and/or comapss error and switches to ATTI mode. (I'm actually quite good at flying ATTI mode by now
2019-7-28
Use props
djiuser_gPtjI2P1TcGC
lvl.1
Flight distance : 254852 ft
Norway
Offline

... Contiued:

SOLUTION is to do the comapss calibration really really slow (and away from metal)

Good luck

-Erlend
2019-7-28
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules