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

Mavic Mini strange behavior after take off, drifted away.

rafare

Well-Known Member
Joined
Feb 17, 2020
Messages
47
Reactions
10
Location
Brazil
Hey guys, something very strange happened today.
To summarize, just after take off the drone drifted to the right without any commands from my end, I'm flying from my "backyard" that is very small so I tend to fly straight up initially to clear all trees and houses around and then continue with my flight.

So what happened
1- As usual, I did a pre-flight check on the props and the aircraft itself, all normal, wind was about 1.5mph according to UAV forecast.
2- I waited to get strong enough GPS signal to set the homepoint.
3- After homepoint was sucessfuly set, I went to do an assisted take off.
4- Just after lift off the drone started to drift to the right and I compensated putting the right stick all the way to the left. (13.1s on phantomviewer)
5- The drone stopped drifting, but started to ascent without any command, I was afraid to send any commands at that point (13.7s on phantomviewer)
6- After regained control I manually brought the drone back to my "backyard airspace" and started my ascent.
7- After ascent I continued with my flight without any type of problem

Note that the phantom viewer tells the drone is pointing the wrong way in take off. The drone was looking directly ahead to the street and it drifted to the right.
in 25-30s In Phantom Viewer it says the drone turned 180 degrees out of nowhere, actually I did that command the logs between 25s and 30s are missing.

Sem título.png

Note 2: At the end someone might find some warnings about compass and IMU calibration/erros, that is because I forgot to turn off the drone before taking it inside my house.

Here is two sites that I uploaded the logs.

Thanks in advance
 

Attachments

  • DJIFlightRecord_2020-05-27_[20-02-46] (1).txt
    1.3 MB · Views: 6
  • 2020-05-27_20-01-45_FLY036.DAT
    4.9 MB · Views: 6
Last edited:
To summarize, just after take off the drone drifted hard to the right without any commands from my end, I'm flying from my "backyard" that is very small so I tend to fly straight up initially to clear all trees and houses around and then continue with my flight.
4- Just after lift off the drone started to drift to the right and I compensated putting the right stick all the way to the left. (13.1s on phantomviewer)
Movement shown in the data at this point was very slow.
There nothing in the data to show any drifting hard to the right.
Were you launching from between buildings with a lot of the sky blocked?
Although the data shows GPS health of 4, it might have been a small issue with poor GPS but the data doesn't show anything conclusive.
5- The drone stopped drifting, but started to ascent without any command, I was afraid to send any commands at that point (13.7s on phantomviewer)
From 0:12.8 - 0:13.6 you gave full left stick.
This accounts for most of the increase in elevation.
The rest of the increase in altitude is because the Mini does not have perfect altitude stability.
Note that the phantom viewer tells the drone is pointing the wrong way in take off. The drone was looking directly ahead to the street and it drifted to the right.
in 25-30s In Phantom Viewer it says the drone turned 180 degrees out of nowhere, actually I did that command the logs between 25s and 30s are missing.
The log viewer sometimes abbreviates the data but looking at the complete data, there is full data for 25-30 seconds.
It shows that from 0:25.5 - 0:27.4 you gave full left rudder which rotated the drone from facing 50° to 170° before you gave some right rudder to bring it back to >200°
 
Movement shown in the data at this point was very slow.
There nothing in the data to show any drifting hard to the right.
Just after takeoff I took my eyes out of the drone itself to look at the FPV, when I looked back it was all the way to the right, at the moment, appeared to be a hard drift. But you're right,
I'll remove the word to prevent further confusion.

Were you launching from between buildings with a lot of the sky blocked?
Although the data shows GPS health of 4, it might have been a small issue with poor GPS but the data doesn't show anything conclusive.
I must say my backyard isn't the most open space possible, there are some big trees nearby but the only building really blocking the sky was my house, It's a 4 story house, so could be a factor.
Just a note: I posted something about the time my MM was taking to get GPS signal after the last update, could be a small issue with GPS as you said.

The log viewer sometimes abbreviates the data but looking at the complete data, there is full data for 25-30 seconds.
It shows that from 0:25.5 - 0:27.4 you gave full left rudder which rotated the drone from facing 50° to 170° before you gave some right rudder to bring it back to >200°
Right, I cant see this info on the PhantomViewer, only on Airdata. But that's exacly what I did.
 
... Note that the phantom viewer tells the drone is pointing the wrong way in take off. The drone was looking directly ahead to the street and it drifted to the right.

This statement made me suspicious ...

Looked through the DAT log regarding the GPS & IMU velocities, agreement between IMU Yaw & magYaw ... & I'm not overly content with what I see.

For the whole flight we see bigger differences in the GPS & IMU velocities which can indicate either IMU failure or magnetic disturbance ... the straighter graph appearance from the beginning of the light blue Sport mode area is where you hovered, once moving the values peak.

1590660695812.png

Then looking at a period from the flight ... from take off to end of the hover at height (along the yellow line) according to the pic ...

1590661057332.png

We see that the agreement between IMU Yaw (Blue) & magYaw (Black) isn't good from time to time ... at most they disagree by approx 90 degrees. Then at the period when you stood and hovered you yawed a lot ... note then, that every time you apply rudder to yaw the magnetic modulus (purple) change drastically ... and the disagreement of IMU Yaw & magYaw follow that pattern.

1590661104227.png

This make me think that something possibly can be magnetized on the Mini itself ... or that you have something attach to it that is.

All this may very well show up as a feeling that the AC drifts uncommanded in it's mildest consequence ... at worst it can mean an uncontrolled fly away.

Perhaps @sar104 can confirm this as it was he that in an earlier case introduced be into this thinking ...
 
This make me think that something possibly can be magnetized on the Mini itself ... or that you have something attach to it that is.
First of all thanks for that analysis, I must say I'm a bit afraid of flying it right now hahahah.
I can confirm that nothing was attached to the Mini, but, behind the drone, about 2m away) there is two very large metal doors.
I've flown there many times without any problem.

I'll a attach a log file from another flight this week. I could not find the DAT file of that flight, only the last one, Is there a way to get the DAT from a past flight?
- It’s was a completely normal, but flying from the same location.
 

Attachments

  • DJIFlightRecord_2020-05-23_[15-28-53].txt
    1.6 MB · Views: 3
Last edited:
This statement made me suspicious ...

Looked through the DAT log regarding the GPS & IMU velocities, agreement between IMU Yaw & magYaw ... & I'm not overly content with what I see.

For the whole flight we see bigger differences in the GPS & IMU velocities which can indicate either IMU failure or magnetic disturbance ... the straighter graph appearance from the beginning of the light blue Sport mode area is where you hovered, once moving the values peak.

View attachment 102784

Then looking at a period from the flight ... from take off to end of the hover at height (along the yellow line) according to the pic ...

View attachment 102785

We see that the agreement between IMU Yaw (Blue) & magYaw (Black) isn't good from time to time ... at most they disagree by approx 90 degrees. Then at the period when you stood and hovered you yawed a lot ... note then, that every time you apply rudder to yaw the magnetic modulus (purple) change drastically ... and the disagreement of IMU Yaw & magYaw follow that pattern.

View attachment 102786

This make me think that something possibly can be magnetized on the Mini itself ... or that you have something attach to it that is.

All this may very well show up as a feeling that the AC drifts uncommanded in it's mildest consequence ... at worst it can mean an uncontrolled fly away.

Perhaps @sar104 can confirm this as it was he that in an earlier case introduced be into this thinking ...

I looked at this yesterday and still haven't figured out what is going on. I've never seen magnetometer data that look like this. Take the IMU yaw vs. magnetic yaw discrepancy as a function of IMU yaw, for example. With an incorrectly initialized IMU yaw it looks mostly flat with an excursion at the takeoff value. With a magnetized aircraft it is sinusoidal with 2π periodicity. They generally have significant scatter. Here we see this:

Graph2.png

I'm still trying to figure out what kind of linear combination of magnetic fields could produce that. It looks unphysical to me so far.
 
  • Wow
Reactions: Prismatic
I can confirm that nothing was attached to the Mini, but, behind the drone, about 2m away) there is two very large metal doors.
I Always try to calibrate the compass to prevent problems with this two metal doors, I did not in this flight.
Calibrating the compass won't do anything to solve problems caused by magnetic effects that are not part of the drone.
Calibrating the compass is only to identify and measure the magnetic fields that are part of teh drone.
 
I believe It’s a good practice when flying on a location with metal near the take off point.

No - you have misunderstood the purpose of the calibration, which is simply to measure and subtract out the internal magnetic field of the aircraft. There is no way to correct for external magnetic interference, and calibrating in the presence of that is most likely to cause the calibration to fail, or end up incorrect.
 
Looking into the .DAT logs event stream it's a lot of this there ... these from approx 20m height but they repeat even on 120m ...

51.886 : 6748 [L-FDI]NS(0) COMPASS(0):fault off, over_large
52.185 : 6763 [L-FDI]NS(0) COMPASS(0):fault on, over_large
52.604 : 6784 [L-FDI]NS(0) COMPASS(0):fault off, over_large
54.301 : 6869 [L-FDI]NS(0) COMPASS(0):fault on, over_large
54.341 : 6871 [L-FDI]NS(0) COMPASS(0):fault off, over_large
54.721 : 6890 [L-FDI]NS(0) COMPASS(0):fault on, over_large
54.940 : 6901 [L-FDI]NS(0) COMPASS(0):fault off, over_large

Then also some

180.569 : 13194 [L-FDI]NS(0) FUSION(0): fault on , magn_heading_err_large

...I can confirm that nothing was attached to the Mini...

How about storing the Mini when not used then ..? Can it have been magnetized by being to close to something magnetic for a longer time?

I believe It’s a good practice when flying on a location with metal near the take off point.

As pointed out by sar104 ... that's not a good practice. Instead you should move away from magnetic objects & check on the map in GO4 after power on if the heading there is equal to reality.
 
Last edited:
How about storing the Mini when not used then ..? Can it have been magnetized by being to close to something magnetic for a longer time?
I have the fly more combo, so it stays in the bag all the time. I store the bag in a shelf near some books, nothing out of the ordinary.
The only thing that I did different this week was I connected the SD card to my desk pc to produce some panoramic photos and left the mini on top of the fly more combo case, maybe on top of the battery hub/controller, can't recall.

As pointed out by sar104 ... that's not a good practice. Instead you should move away from magnetic objects & check on the map in GO4 after power on if the heading there is equal to reality.
Really wanted to, but unfortunately its not possible at the moment.
I fly always with the minimap on the left and didn't recall it pointing the wrong way. I must have not noticed it.

I'll be more careful with the compass calibration, thanks for the heads-up guys.
 
Last edited:
I looked at this yesterday and still haven't figured out what is going on. I've never seen magnetometer data that look like this. Take the IMU yaw vs. magnetic yaw discrepancy as a function of IMU yaw, for example. With an incorrectly initialized IMU yaw it looks mostly flat with an excursion at the takeoff value. With a magnetized aircraft it is sinusoidal with 2π periodicity. They generally have significant scatter. Here we see this:

View attachment 102798

I'm still trying to figure out what kind of linear combination of magnetic fields could produce that. It looks unphysical to me so far.
This is quite the puzzler. At 12 secs the FC started adjusting the Yaw value for some unknown reason. VIO:Yaw, totalGyro:Z, magYaw and @rafareusch 's description all agree that the MM didn't rotate yet Yaw shows the MM rotating.
1590678849493.png
Moreover, the Yaw curve is suggestive of some algorithm converging on a new value.

It's really strange that the new Yaw value is consistent with @rafareusch 's description. I would have expected that magYaw would have been the one consistent with @rafareusch 's observation.

And, the new Yaw value was the cause of the Yaw/magYaw separation and the eventLog entries like
17.828 : [L-FDI]NS(0) FUSION(0): fault on , magn_heading_err_large

I'm wondering if the small uncommanded movement was at the direction of the FC that provided data for the FC to determine that Yaw was incorrect.
 
This is quite the puzzler. At 12 secs the FC started adjusting the Yaw value for some unknown reason. VIO:Yaw, totalGyro:Z, magYaw and @rafareusch 's description all agree that the MM didn't rotate yet Yaw shows the MM rotating.
View attachment 102809
Moreover, the Yaw curve is suggestive of some algorithm converging on a new value.

It's really strange that the new Yaw value is consistent with @rafareusch 's description. I would have expected that magYaw would have been the one consistent with @rafareusch 's observation.

And, the new Yaw value was the cause of the Yaw/magYaw separation and the eventLog entries like
17.828 : [L-FDI]NS(0) FUSION(0): fault on , magn_heading_err_large

I'm wondering if the small uncommanded movement was at the direction of the FC that provided data for the FC to determine that Yaw was incorrect.

Yes - I've been through all the sensor data, including data of uncertain origin, and I cannot find any inputs that support the CCW IMU yaw adjustment at 12 s.
 
There is something really wrong with the mag:X data that causes magMod to exceed 3300.
1590682762891.png
If we assume the MM is facing NE at launch and then using the totalGyroZ data the magX problem occurs when the MM is facing SE.
 
  • Like
Reactions: sar104
There is something really wrong with the mag:X data that causes magMod to exceed 3300.
View attachment 102817
If we assume the MM is facing NE at launch and then using the totalGyroZ data the magX problem occurs when the MM is facing SE.

Agreed - but I don't see how that problem is related to the initial IMU yaw excursion. It would be nice if there were a single identifiable issue here, but maybe that's not the case.
 
  • Like
Reactions: BudWalker
Just to reiterate, I'm 100% positive that the MM was facing the street, I always take off with it facing away from me.

I'm starting to believe that there's something up at my take off location. I've never seen my Mini do something like this or saw the discrepancy between logs and actual flight.

Take a look at this flight, It´s the same thing, I'm 100% sure the drone was facing the street, and the logs still says the drone heading was parallel to the street.

Unfortunately, I do not have DAT files of this flight.

I'm afraid that I don't know what to do.
I think I'll try to do another small flight today in another location (an open one) and will try to upload the logs here to see if there's something wrong with the aircraft itself.
 
There is something really wrong with the mag:X data that causes magMod to exceed 3300.
View attachment 102817
If we assume the MM is facing NE at launch and then using the totalGyroZ data the magX problem occurs when the MM is facing SE.

Can you explain this further? I did not noticed anything wrong after the incident on take off.
 
Can you explain this further? I did not noticed anything wrong after the incident on take off.

There's not much to explain at this point. As I mentioned earlier, the magnetometer data are horrible and it's rather remarkable that it flew as well as it did.

mag.png
 
There's not much to explain at this point. As I mentioned earlier, the magnetometer data are horrible and it's rather remarkable that it flew as well as it did.

View attachment 102824

I'm very happy for the analysis that you guys all provided, thank you very much.
But now I'm not sure what to do, should I keep flying? Contact DJI?
 
Have you tried (carefully) flying at a different location, one with wide open spaces?
 
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Members online

Forum statistics

Threads
131,127
Messages
1,560,117
Members
160,099
Latest member
tflys78