Please select Into the mobile phone version | Continue to access the computer ver.
Spark loses compass, IMU, GPS mid-flight
3239 17 2019-8-29
Uploading and Loding Picture ...(0/1)
o(^-^)o
adamhiram
United States
Offline

I recently experienced an issue where the aircraft lost compass, IMU, and GPS mid-flight, almost resulting in loss of the aircraft.  This is at least the second time this has happened, so I want to share some details in hopes of understanding why this happened and how to avoid it in the future.

Pre-flight check:
  • IMU accellerometer and gyroscope bias excellent (very low)
  • Compass interference excellent (very low)
  • GPS locked with 10 satellites


At a height of 391 ft directly overhead, and only 1:20 into my flight, the following errors occurred:
  • Compass Error.  Exit P-GPS Mode
  • IMU heading error.  Please restart the aircraft.
  • Weak GPS signal.  Positional accuracy may be compromised.  Please fly with caution.
  • Abnormal compass function or GPS signal detected.  Aircraft switched to ATTI mode.


By the time I was able to regain control, the aircraft had drifted off course by a quarter mile and I had lost line of sight.  I was able to navigate back by finding familiar landmarks in the live feed and quickly flew back and landed.  I have had many other flights in the same area without incident, but as I mentioned above, this is at least the second flyaway I have had as a result of losing the use of all sensors mid-flight.

Any thoughts on what could be causing this?  I hope to find a solution before experiencing another flyaway that I cannot recover from, and ultimately lose the aircraft.  Thank you.
2019-8-29
Use props
S-e-ven
Captain
Flight distance : 5910961 ft
  • >>>
Thailand
Offline

The GPS "loss" is mostly "just" a ignorance of GPS, b/c of the compass is gone.
Check it in the flight log on phantomhelp.
Actually, in case you want the most info, you should upload your flightlog to phantom help and post the link here!

What I can think about, also by "...the aircraft had drifted a quarter mile":
Wind?
Have you been in sport, for the quicker ascend?

What I have experienced is that in sport it is almost not a question "if", but "when"  will your bird have a ATTI "sequenz".
And that trying to gain control , atti is a kind of uncontrolled sport mode, is shaking the compass and imu even more.
So in atti situations, now I  am just making sure that the sport switch is off and just use throttle to gain as much height, as possible, but leave it for some seconds without directional input.
That has worked the last of my few times, to get it back to p-gps quickly.

But all of my (few) attis had to do with strong wind in sport, some of them happend just in the moment, switching from P to Sport.
2019-8-29
Use props
nilanjan118
First Officer
Flight distance : 636663 ft
Japan
Offline

S-e-ven Posted at 8-29 18:43
The GPS "loss" is mostly "just" a ignorance of GPS, b/c of the compass is gone.
Check it in the flight log on phantomhelp.
Actually, in case you want the most info, you should upload your flightlog to phantom help and post the link here!

"391 ft. directly overhead" says the OP. So your theory can very well be true. It is almost impossible to have windless conditions at such altitude. Difficult to gauge it from the ground but turning on the attitude indicator is a good way to keep a check on the wind.
2019-8-29
Use props
fans4f35bfa2
United States
Offline

Here's the flight log link on phantom help: https://www.phantomhelp.com/LogViewer/0B40X4CLVMXQVUWCHJL4

You are correct - I often put it in sport mode for a quicker ascend, then turn it off again.  I see a yaw error at 1:19, followed by a compass error at 1:20 where it switched to ATTI mode, and IMU heading error at 1:21.  When it drifted to about 1200 ft away, I don't think that was just the wind - it wasn't a particularly windy day, and I checked periodically during the ascent to ensure it wasn't detecting any high winds.  Looking at the exported CSV, I see speeds in the 20-30mph range once it switched to ATTI mode - not sure how accurate that data is since it lost GPS, but it matches what I saw in the live feed.

Any idea why it would take off at full speed as soon as it switched to ATTi mode?
It sounds like this is just an inevitability with sport mode if it encounters any wind, particularly at higher altitudes?
Does switching out of sports mode once this occurs help it to recover more quickly?  Does it prevent it from taking off at full speed?

Thank you very much for your insight.
2019-8-29
Use props
S-e-ven
Captain
Flight distance : 5910961 ft
  • >>>
Thailand
Offline

fans4f35bfa2 Posted at 8-29 20:04
Here's the flight log link on phantom help: https://www.phantomhelp.com/LogViewer/0B40X4CLVMXQVUWCHJL4

You are correct - I often put it in sport mode for a quicker ascend, then turn it off again.  I see a yaw error at 1:19, followed by a compass error at 1:20 where it switched to ATTI mode, and IMU heading error at 1:21.  When it drifted to about 1200 ft away, I don't think that was just the wind - it wasn't a particularly windy day, and I checked periodically during the ascent to ensure it wasn't detecting any high winds.  Looking at the exported CSV, I see speeds in the 20-30mph range once it switched to ATTI mode - not sure how accurate that data is since it lost GPS, but it matches what I saw in the live feed.

I always switch back to P 'cause it seems to be a more, quicker stabilizing option.
Coincidences , perhaps?

2019-8-29
Use props
adamhiram
United States
Offline

That makes sense, plus if I experience what appears to be a flyaway, at least it will be at a much slower speed.  I will keep this in mind the next time it happens!

That still leaves 2 questions:
  • Why am I getting yaw/compass errors in the first place?  I realize once the compass is gone, I am in ATTI mode, but what is causing it and how can I avoid or prevent it?
  • Why does it take off at full speed when this happens?  I would expect it to drift with the wind in ATTI mode, not take off at 30mph.


Thanks again.

2019-8-29
Use props
Haggi
Captain
Flight distance : 2581785 ft
Norway
Offline

I see this subject in a different manner..

Spark, or any gps drone, is in ATTI all the time.
On top of that is the IMU, GPS, COMPASS, ESC's which runs the bird in a controllable way.
The hole system is connected to aid the pilot.
So when any of these components fail, it will be back in ATTI mode.

What does this means?
If in tripod mode, going forward, it will suddenly accelerate to max speed when ATTI occurs.
Some pilots reporting top-speed to be higher in ATTI than in Sport, which make sense.
If any stick input at all when ATTI happens, it will take off, full speed, in stick direction.
This behavior will surprise the pilot and valuable seconds will be lost.
A micro second slam on the stick is all it takes to let the spark take off in "that" direction.
Any movement must be done with sticks in opposite direction.
Spark going left, you need to go right. Spark going forward, you need to reverse.
Even if you let the stick go to center position, Spark will continue in last stick direction "forever".
All of this would be much more manageable if Spark knew compass direction.
But that's lost too, so pushing stick to the left, can actually get the Spark to fly forward.
Spark is in emergency mode and height is managed by barometer.
Mostly ATTI mode happens close to pilot...

Much can or could be added here, this is just a simplified ELI5.
2019-8-30
Use props
JJB*
Captain
Flight distance : 12132231 ft
  • >>>
Netherlands
Offline

adamhiram Posted at 8-29 21:24
That makes sense, plus if I experience what appears to be a flyaway, at least it will be at a much slower speed.  I will keep this in mind the next time it happens!

That still leaves 2 questions:

Hi adam,

Your conclusion in the first sentence is imo not correct.

If you fly a Spark in any stabilized mode (P-GPS, Tripod, Sport) and your SPARK switch to ATTI it depends on your stick-position what will happen.

If all sticks are neutral ; wind will drift your SPARK away (if there is wind ofcourse)
If not neutral (fwd/aft, left/right) then SPARK will accelerate that direction! (To stop that motion only by counter input of that direction)

In Tripod full fwd stick means relative slow fwd speed, if at that point ATTI comes alive, omg, full speed ahead!

If SPARK switches back from ATTI to a GPS stabilized mode, with no stick input SPARK goes into a stabilized hover, imo no difference for P-GPS, SPORT or Tripod mode.

Your first question: Only DJI knows...SPARK is sensitive for Yaw, Speed, Compass and IMU errors. Wich such errors DJI software kills the use of GPS signals and SPARK switches to ATTI. Wich such problems speed is not always good indicated in the CSV file. Speed can be calculated using GPS positions over time.
See the chart for your flight. [ Speed = csv, Speed X-Y = speed calculated IMU x and y axis relative to fly direction, Speed P-T = calculated using GPS - time ]As you can see during ATTI they differ, after that they are almost equal.

How to prevent ATTI, not always possible imo, it is a SPARK...
But do perform always the after take off checks * and only when all OKE starts flying.

*
at start, fly into hover,
move fwd, move aft, back to hover position,
move left, right, back to hover pos.
up, down, back to hover pos.
yaw 360 left, yaw 360 right, do watch the red arrow at the attitide/compass indicator in the app.
If red arrow shows correct aircraft heading all the time and is steady indication, go fly your flight.

PS red arrow gets info from drone, North compass sign gets info from mobile device. (so mob device should be calibrated if N is not showing N as in the real world)

cheers
JJB



analysis1.png
analysis2.png
2019-8-30
Use props
adamhiram
United States
Offline

Thank you, this has been very helpful, and the videos in this thread have provided some great explanations of these errors.

I didn't think that's how ATTI mode worked - if I fly indoors with no GPS signal and VPS disabled, it doesn't just go forever when I throttle forward - when I let go of the stick, it throttles enough in the opposite direction to stop and hover.  It can't hold its position perfectly and will drift if there is any wind, but it doesn't just keep going until I throttle in the opposite direction to stop it.  It makes sense if perhaps the aircraft is unaware it is already moving forward at 30mph when it switches from GPS to ATTI mid-flight and continues drifting, but that shouldn't be the case for any throttle action in ATTI mode, should it?
One thing that caught my attention in the linked videos is when there is magnetic interference on the ground that isn't detected, but the compass is off once in the air.  I had an issue with a specific part of my patio that must have a lot of rebar under it, but elsewhere doesn't seem to have that issue.  More importantly, it never gets a compass error shortly after take-off.  With this flight, it was at almost 400' with 2 pauses along the way to ensure there were no problems.  The last time this happened, I had already flown about 1/4 mile away, took some images, and was half way back with a mostly depleted battery before it occurred.  At least that time it found a GPS signal before the battery ran out, but it had already flown out of range and had to rely on automatic RTH.

It sounds like avoiding sport mode altogether would help here, or at least result in less severe outcomes in the event of an error, but it's also not really practical.  For example, I flew one mission taking images about 1/4 mile away, which is the practical limit for any VLOS flying I can do.  Without sport mode, it took almost half the battery just to get there and then obviously I needed to save enough power to get back.  Flying in sport mode, I can get there in less than 2 minutes at full altitude, with plenty of time to take images and get back safely.  Using only P mode, my range and therefor usefulness of the Spark is pretty severely limited.

Lastly, that preflight check doesn't seem to catch these issues.  I always wait for GPS lock, check the number of satellites, and go into settings and check the sensors for any IMU or compass interference before taking off.  Admittedly I don't do the thorough take-off checks you mentioned below every time, but again, it's not always practical to take up 1-2 minutes of a 10-12 minute flight with pre-flight checks.  That being said, I always hover and maneuver around before ascending, and pause several times to check wind conditions and ensure I still have compass and GPS.  This issue is never detected during those checks, and seems to happen for no apparent reason at the worst times.  At least this time it was still in transmitter range and I had sufficient battery to make it back, but as I mentioned above, last time it was on an almost drained battery and had already drifted out of range.  If it hadn't switched back to GPS mode and initiated a RTH before the battery completely died, it would have been gone.

Thanks again for the insight - I still don't fully understand what caused it or how to prevent it in the future, but at least I have a little better technical understanding of what's happening.  I just wish I had more confidence that this will not keep happening until I ultimately lose the aircraft.

2019-8-30
Use props
adamhiram
United States
Offline

Well, I think I found my answer, which appears to be a common bug with no real fix.  This thread (https://forum.dji.com/forum.php?mod=viewthread&tid=155574&page=1#pid1445064) provided a great explanation that matched what I saw in both this flight log, as well as the one from the last time it occurred.  This included the progression from yaw error to compass error to IMU heading error and switch to ATTI mode, and the elliptical trajectory where it took off both times.  Interestingly enough, the suggestion there was to switch it into sport mode, rather than out of it.

The bottom line and the result, no matter what was the real internal cause (which, I guess, we will never know because DJI will not tell us) is the same: cross-wind -> elliptical path -> yaw error -> other confusion and errors -> ATTI -> fly-away.

2019-8-30
Use props
JJB*
Captain
Flight distance : 12132231 ft
  • >>>
Netherlands
Offline

adamhiram Posted at 8-30 17:17
Thank you, this has been very helpful, and the videos in this thread have provided some great explanations of these errors.

I didn't think that's how ATTI mode worked - if I fly indoors with no GPS signal and VPS disabled, it doesn't just go forever when I throttle forward - when I let go of the stick, it throttles enough in the opposite direction to stop and hover.  It can't hold its position perfectly and will drift if there is any wind, but it doesn't just keep going until I throttle in the opposite direction to stop it.  It makes sense if perhaps the aircraft is unaware it is already moving forward at 30mph when it switches from GPS to ATTI mid-flight and continues drifting, but that shouldn't be the case for any throttle action in ATTI mode, should it?

Hi Adam,

In the Visual Navigation Setting you can disable Obstacle Avoidance.
But the Vision system is always ON, gets enabled at powering up a SPARK.
So indoor flying with no GPS and enough light a SPARK can hold its position, because its flying in OPTI mode.
Moving fwd and releasing all sticks; SPARK will stop the motion and hovers. that`s not like in ATTI.

In ATTI any movement going on can only be stopped with opposite input.


True, the after takeoff checks does not cover all errors, but if the compass does funny after leaving the ground you will see this.
So it does help for 80% (arbitrary; can be less/more, i do not know), and takes imo less than a minute.
IMO its better that start the rotors and take-off with 100% up and 100% fwd as some people do. Well, just my opinion.

In one of your lines you said "switched back to GPS mode". A Spark cannot switch back from ATTI into a GPS mode by any user, it just happens to us.
But, while in ATTI flying, if switching P-GPS to SPORT or v.v. does something good to a SPARK with resulting back into GPS mode, it`s worth a try ofcourse.
cheers
JJB







2019-8-31
Use props
Haggi
Captain
Flight distance : 2581785 ft
Norway
Offline

About the Sport mode switch..
There is a theory that yaw, speed, gps and/or compass will accept larger error values before Spark enter ATTI mode when in Sport mode.
This has not, to my knowledge, been confirmed by DJI.
2019-8-31
Use props
adamhiram
United States
Offline

But the Vision system is always ON, gets enabled at powering up a SPARK.
So indoor flying with no GPS and enough light a SPARK can hold its position, because its flying in OPTI mode.
Moving fwd and releasing all sticks; SPARK will stop the motion and hovers. that`s not like in ATTI.
In ATTI any movement going on can only be stopped with opposite input.

Excellent point, I didn't think of that!  Thanks for the clarification.

There is a theory that yaw, speed, gps and/or compass will accept larger error values before Spark enter ATTI mode when in Sport mode.

I read that too, and it sounds logical, although both times this happened to me I was in sport mode.  Who knows if that contributed to the yaw errors, actually helped prevent them sooner, or really had no impact.  I'm just glad I was able to get the aircraft back before it flew out of range or ran out of battery.
2019-8-31
Use props
Haggi
Captain
Flight distance : 2581785 ft
Norway
Offline

Just a small tip based on own experience..
I've been in Atti mode twice.
Both times horizon started tilting slightly just before the on-screen message and warning sound. Maybe a 5 sec "warning"..not more.
If this happens again, I would stop motion and gain height if possible.
Well done saving your bird!

Edit: Added example of tiltet horizon and Atti


2019-8-31
Use props
S-e-ven
Captain
Flight distance : 5910961 ft
  • >>>
Thailand
Offline

I remember my last Atti.
That was just started, gaining height in P-Mode, strong wind,  but no problems.
And just in the same second I switched to sport: Atti

Switched back, left the bird some seconds "fly with the wind" and just tried to gain height: back in P

So figure ;-)
2019-8-31
Use props
adamhiram
Offline

I'm curious if recalibrating the compass or IMU might help at this point.  When I first bought it, I'm pretty sure I followed the instructions it came with to calibrate before any flight at least once, and probably didn't pay much attention to the surface it was on at the time.  DJI has since changed their recommendations not to do this, but that was then and this is now.  Might this help?  Any chance it could make things worse?
2019-9-2
Use props
fansde554994
Flight distance : 376565 ft
Offline

Try putting your phone in airplane mode and only have WiFi on. If your phone bounces from WiFi to cellular connection it could cause lots of issues.
2019-9-2
Use props
JJB*
Captain
Flight distance : 12132231 ft
  • >>>
Offline

adamhiram Posted at 9-2 19:21
I'm curious if recalibrating the compass or IMU might help at this point.  When I first bought it, I'm pretty sure I followed the instructions it came with to calibrate before any flight at least once, and probably didn't pay much attention to the surface it was on at the time.  DJI has since changed their recommendations not to do this, but that was then and this is now.  Might this help?  Any chance it could make things worse?

HI Adam,

Refreshing FW, calibrating IMU and Compass never do any harm to a drone. It is what it is ; just back to the basics settings by refreshing or calibrating the systems.

But it has to be done correct.

Compass cal. to be executed in a metal free envirioment, no metal near (watches, keys, cars, metal in the ground  ect etc)I use always a big green field where i am sure that its just a green meadow.

cheers
JJB
2019-9-2
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules