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

Mavic Pro - Odd IMU and Compass Errors

Vadar007

Well-Known Member
Joined
Dec 28, 2016
Messages
47
Reactions
19
Location
Austin, Texas
Took my Mavic Pro out for a spin today. First run was fine, calibrated compass, flew until low battery signal and I brought the bird back to swap batteries. Started to head out on second run when I started seeing IMU heading and Compass Errors. Out of an abundance of caution I quickly brought the bird back and decided to check the logs. You can see there were a slew of errors. What was off is that it was giving me a weak GPS signal error but I had 17 satellites logged at the time and it was in the clear. Should I just recalibrate IMU and Compass and try again or is there potentially something more serious going on?

Capture.JPG
 
Took my Mavic Pro out for a spin today. First run was fine, calibrated compass
Why calibrate the compass?
Started to head out on second run when I started seeing IMU heading and Compass Errors. Out of an abundance of caution I quickly brought the bird back
You haven't mentioned the Yaw Error, which is probably the reason for everything else.
You were lucky.
Most yaw errors are not recoverable.
Should I just recalibrate IMU and Compass and try again or is there potentially something more serious going on?
There's almost certainly nothing wrong with your drone.
Post the flight data and someone will be able to analyse the incident properly.
A description of where you powered up and launched from would be helpful.
 
... I started seeing IMU heading and Compass Errors.
In order to being able to diagnose this properly the .DAT log is needed together with the .TXT log ... both are stored in the mobile device you flew with. The .DAT log is most important in order to gain access to the IMU & compass data. The correct .DAT log ends with FLY073.DAT

If you don't know where to find them go here & read up (read section 3.) --> Mavic Flight Log Retrieval and Analysis Guide , retrieve them & attach them in a new post here.

... it was giving me a weak GPS signal error but I had 17 satellites logged at the time and it was in the clear.
This was most probably secondary ... as the flight controller noticed the yaw error it handed over all control to you, it didn't trust the positional data anymore & reverted to ATTI mode (even though you had 17 satellites locked). In ATTI you don't have any horizontal hold & no auto breaking after stick release at all.

...is there potentially something more serious going on?
Too early to say yet ... either (... & most probably) you got the yaw error from powering on your drone in a magnetic interfered spot making the compass deflect & by that initialize the IMU wrongly, if this was the case it was nothing wrong with your drone ... but it could also been a real but rare IMU problem & if that's the case the reason for the problems you got is still there.
 
  • Like
Reactions: RadioFlyerMan
DAT and Logs attached. Launched from a cleared field in the country...no man made structures nearby.
 

Attachments

  • DJIFlightRecord_2021-09-13_[08-09-36].txt
    90.5 KB · Views: 3
  • 2021-09-13_08-09-25_FLY073.DAT
    1.3 MB · Views: 4
In order to being able to diagnose this properly the .DAT log is needed together with the .TXT log ... both are stored in the mobile device you flew with. The .DAT log is most important in order to gain access to the IMU & compass data. The correct .DAT log ends with FLY073.DAT

If you don't know where to find them go here & read up (read section 3.) --> Mavic Flight Log Retrieval and Analysis Guide , retrieve them & attach them in a new post here.


This was most probably secondary ... as the flight controller noticed the yaw error it handed over all control to you, it didn't trust the positional data anymore & reverted to ATTI mode (even though you had 17 satellites locked). In ATTI you don't have any horizontal hold & no auto breaking after stick release at all.


Too early to say yet ... either (... & most probably) you got the yaw error from powering on your drone in a magnetic interfered spot making the compass deflect & by that initialize the IMU wrongly, if this was the case it was nothing wrong with your drone ... but it could also been a real but rare IMU problem & if that's the case the reason for the problems you got is still there.
DAT and Log files attached
 
DAT and Logs attached. Launched from a cleared field in the country...no man made structures nearby.
Your flight data looks like this:

It wasn't the cause of the incident, but first up the thing I notice is that you launched with a battery that had been sitting around discharging.
That's just asking for trouble.
The % indicator gives a false reading if you don't start with a freshly charged battery.
Your cell voltages were very low at the start and quickly reached critical low voltage levels.

Which way was your drone pointing when on the ground to launch?
 
Your flight data looks like this:

It wasn't the cause of the incident, but first up the thing I notice is that you launched with a battery that had been sitting around discharging.
That's just asking for trouble.
The % indicator gives a false reading if you don't start with a freshly charged battery.
Your cell voltages were very low at the start and quickly reached critical low voltage levels.

Which way was your drone pointing when on the ground to launch?
Guilty on the battery. How can you tell they were discharging for sometime? Drone was pointing due East when it launched.
 
DAT and Log files attached
Hmm, aren't allowed to attach all the charts in this post ... strange. Have instead included them in post#9 for the curious member that wants to understand. You have to scroll back & forth between this post & next to tag along :)

Great ...

Yeah ... this wasn't a yaw error coming from a magnetic disturbed compass during powering on the drone. I believe instead it's one of those rare instances where the IMU makes a computational error...

First lining up everything from the DAT log concerning yaw movements in a chart to compare if something is deviating from the others ... (Chart only covers period from power on in the left to just after the problem have been resolved at 36,8sec after motor start)

-The pink & green background color = motor start & take-off

-The blue background color = ATTI mode (sufficient satellite lock but GPS level=0)

-The red graph = IMUYaw in cardinal degrees

-The green graph = magYaw in cardinal degrees (Compass)

-The purple graph = the difference between the red & green in order to quickly see if there is larger deviations between the 2.

-The yellow graph is the same IMUYaw as the red but this time the value is "unwrapped" meaning not in cardinal degrees, instead the value on the graph is the sum from adding degrees (by yawing CW) & subtracting (by yawing CCW) ... this is needed to compare the IMUYaw towards the Gyro which only have "unwrapped" values.

-The blue graph is the unwrapped gyro value (the gyro always starts from value zero when the drone gets power).

-The black graph is #satellites locked

See the chart pic 1 in post#9

Have placed the marker in the chart just where the log starts to record ... if everything is as it should both the IMUYaw(red) & magYaw(green) should have very near the same value & the gyro(blue) should start up on 0. All is correct regarding this here.

Before the first ATTI period (blue background) we don't see any large deviation between the IMUYaw & the magYaw ... it reaches a maximum deviation of approx 8 degrees which is far from enough to cause a Yaw error.

Comparing the unwrapped IMUYaw(yellow) with the gyro(blue) shape wise only, (as they doesn't have the same values) ... shape wise they agree very well = both register similar turn directions to a similar amount.

So nothing that points to any error so far...

If going into the DAT log event stream just where the GPS level falls to 0 just after 18sec shows this ...

See the chart pic 2 in post#9

The top yellow marked line there, clearly tells us that a computational error have occurred that the flight controller can't accept. All starts at 18,4sec & everything is normalized again at 36,8sec.

If comparing the GPS velocity with the IMU registered velocity (which during normal healthy conditions should be very near 0m/s) shows this ...

Red graph = velocity difference in northern direction
Green graph = velocity difference in eastern direction

Clearly something is going on in the eastern velocity direction (green) ... so is it the GPS or the IMU?

See the chart pic 3 in post#9

Below 2 graphs showing the velocities in the eastern direction only for the IMU(blue) & the GPS(purple). It's clear that something happens with the IMU velocity at 18,4sec ... it deviates away in the opposite direction compared to the GPS.

See the chart pic 4 in post#9

So which direction is the correct one?

If checking off how the drone moved between 18,4sec to 22sec (where I've placed the marker in the chart above, when the blue reunites with the purple). Have hand-drawn a yellow arrow covering this period in the sat.pic. below.

The drone is obviously moving in a negative eastern direction (westerly) ... But in the chart above the IMU says +1,43m/s & the GPS says -2,31m/s ... this confirms that the IMU have got it wrong.

This & nothing else caused the flight controller to believe that it lost it's direction & wrongly came up with a compass/yaw error. And this also caused the ATTI mode (as the FC no longer could trust what was feed to it.)

See the chart pic 5 in post#9

So hopefully this only was a rare random mistake by the IMU ... & shouldn't be taken as a proof of that it's permanently faulty ... but advice you to be observant regarding this & unmotivated ATTI modes some time ahead.
 
Last edited:
Hmm ... confusing when the pics I attached directly in between the text doesn't let me save the post above, have to edit my post later.

Well I do it like this instead as I can apparently put in pics in this post ... All pics here is related to the post before this (#8). @Vadar007

Pic 1
1631538898499.png

Pic 2
1631539464206.png

Pic 3
1631539554365.png

Pic 4
1631539641860.png


Pic 5
1631539727108.png
 
Last edited:
Guilty on the battery. How can you tell they were discharging for sometime? Drone was pointing due East when it launched.
As shown in the Phantomhelp report I linked, the % indicator showed 56% but within 11 seconds, under the load of launching, the cell voltages had already fallen to critical low voltage levels.
 
Great ...

Yeah ... this wasn't a yaw error coming from a magnetic disturbed compass during powering on the drone. I believe instead it's one of those rare instances where the IMU makes a computational error...

First lining up everything from the DAT log concerning yaw movements in a chart to compare if something is deviating from the others ... (Chart only covers period from power on in the left to just after the problem have been resolved at 36,8sec after motor start)

-The pink & green background color = motor start & take-off

-The blue background color = ATTI mode (sufficient satellite lock but GPS level=0)

-The red graph = IMUYaw in cardinal degrees

-The green graph = magYaw in cardinal degrees (Compass)

-The purple graph = the difference between the red & green in order to quickly see if there is larger deviations between the 2.

-The yellow graph is the same IMUYaw as the red but this time the value is "unwrapped" meaning not in cardinal degrees, instead the value on the graph is the sum from adding degrees (by yawing CW) & subtracting (by yawing CCW) ... this is needed to compare the IMUYaw towards the Gyro which only have "unwrapped" values.

-The blue graph is the unwrapped gyro value (the gyro always starts from value zero when the drone gets power).

-The black graph is #satellites locked


Have placed the marker in the chart just where the log starts to record ... if everything is as it should both the IMUYaw(red) & magYaw(green) should have very near the same value & the gyro(blue) should start up on 0. All is correct regarding this here.

Before the first ATTI period (blue background) we don't see any large deviation between the IMUYaw & the magYaw ... it reaches a maximum deviation of approx 8 degrees which is far from enough to cause a Yaw error.

Comparing the unwrapped IMUYaw(yellow) with the gyro(blue) shape wise only, (as they doesn't have the same values) ... shape wise they agree very well = both register similar turn directions to a similar amount.

So nothing that points to any error so far...

If going into the DAT log event stream just where the GPS level falls to 0 just after 18sec shows this ...


The top yellow marked line there, clearly tells us that a computational error have occurred that the flight controller can't accept. All starts at 18,4sec & everything is normalized again at 36,8sec.

If comparing the GPS velocity with the IMU registered velocity (which during normal healthy conditions should be very near 0m/s) shows this ...

Red graph = velocity difference in northern direction
Green graph = velocity difference in eastern direction

Clearly something is going on in the eastern velocity direction (green) ... so is it the GPS or the IMU?



Below 2 graphs showing the velocities in the eastern direction only for the IMU(blue) & the GPS(purple). It's clear that something happens with the IMU velocity at 18,4sec ... it deviates away in the opposite direction compared to the GPS.



So which direction is the correct one?

If checking off how the drone moved between 18,4sec to 22sec (where I've placed the marker in the chart above, when the blue reunites with the purple). Have hand-drawn a yellow arrow covering this period in the sat.pic. below.

The drone is obviously moving in a negative eastern direction (westerly) ... But in the chart above the IMU says +1,43m/s & the GPS says -2,31m/s ... this confirms that the IMU have got it wrong.

This & nothing else caused the flight controller to believe that it lost it's direction & wrongly came up with a compass/yaw error. And this also caused the ATTI mode (as the FC no longer could trust what was feed to it.)



So hopefully this only was a rare random mistake by the IMU ... & shouldn't be taken as a proof of that it's permanently faulty ... but advice you to be observant regarding this & unmotivated ATTI modes some time ahead.
Awesome, however I don't see the graph(s) you are mentioning in the post. As a precaution, should I re-calibrate the IMU?
 
Awesome, however I don't see the graph(s) you are mentioning in the post. As a precaution, should I re-calibrate the IMU?
Something in this forum doesn't let me save the post pics included ... other have complained about it earlier. Will add them later if the forum let me do it.

Yeah ... in a case like this it doesn't hurt, but doubt that will help the IMU compute thing's differently.
 

DJI Drone Deals

New Threads

Forum statistics

Threads
131,277
Messages
1,561,584
Members
160,227
Latest member
lschabert