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

Mavic Pro - Compass Error. Exit P-GPS Mode

vizi_ionut

Member
Joined
Feb 29, 2020
Messages
6
Reactions
1
Age
32
Location
Norway
Hello!

My Mavic pro is acting strangely, sometimes i get the Compass Error. Exit P-GPS Mode followed by other errors. I have attached all the flight's record where i could find this error.

I have managed to land the drone a few times with only propellers damage, last time the flex cable and vibration plate was broken. Next time i don't know if i will be so lucky.

I have calibrated the sensors without any interference, no phone, smartwatch or metal around, but it seems that the compass is very sensible sometimes. I have tried to understand what is happening but seems to complicated for me.

Thank you!
 

Attachments

  • DJIFlightRecord_2019-09-08_[14-34-57].txt
    140.2 KB · Views: 14
  • DJIFlightRecord_2019-09-25_[14-54-44].txt
    176.8 KB · Views: 3
  • DJIFlightRecord_2019-09-25_[14-59-36].txt
    61.9 KB · Views: 3
  • DJIFlightRecord_2019-09-26_[17-55-52].txt
    366.7 KB · Views: 2
  • DJIFlightRecord_2019-09-26_[18-01-10].txt
    296.2 KB · Views: 4
  • DJIFlightRecord_2019-10-12_[17-51-33].txt
    543.2 KB · Views: 2
  • DJIFlightRecord_2019-11-07_[13-17-56].txt
    645.4 KB · Views: 2
  • DJIFlightRecord_2020-02-19_[14-02-48].txt
    252.8 KB · Views: 7
Just looked into the newest log, DJIFlightRecord_2020-02-19_[14-02-48].txt

Can see that you whipped the guts out from the MP initially, full throttle & elevator until you reached 191m height ... you turn around & again go full out forward & down.

At 1. you quickly release the elevator shortly but keeps the throttle pinned for descent, switch to Sport mode & then takes up full elevator. It's here alot of error flags is thrown ... first speed errors followed by compass errors. At 2. you also get yaw errors together with speed & compass errors. And at 3. the navhealth goes to zero with 18 satellites still locked ... and the MP goes into ATTI mode.

The DAT log ending with FLY206.DAT is needed in order to be able to dig deeper ... read here under point 3 how to retrieve --> Flight log retrieval and analysis guide

1583150347363.png
 
speed error, yaw error, compass error ..... seems that the IMU is very sick. The firmware has being doing a great job to keep the drone from crashing. If I were you, I will send the drone to DJI service center straight away and get a new one.

That said, if you are really interested to know what's wrong. post the corresponding .DAT files will help.
 
  • Like
Reactions: Phil17
Thanks for the fast reply. I buy the drone second hand, i don't know if i have a guarantee. i switched the drone in sport mode because I'm surrounded by water and wanted to lose altitude fast . better to crash on a tree instead of water. Also, i got panicked because remote was out of battery and making a crazy sound.

In this flight record DJIFlightRecord_2019-10-12_[17-51-33] i was caught off-guard. did not expect something to happen. i fust seen the camera movement go a little crazy and i understand what will follow, ATTI mode.
 

Attachments

  • 20-02-19-02-02-42_FLY206.DAT
    1.4 MB · Views: 11
This is most probably due to a faulty compass unit ... especially as you say that this have intermittently occurred earlier.

Everything was fine initially, the take off spot wasn't magnetic interfered, the magMod was throughout the whole flight pretty much the same. The Yaw angle initialized perfectly to the magYaw at the AC power on & the IMU Yaw & compass Yaw followed perfectly until 171sec were the magYaw starts to turn 180 degrees back & forth during short second long periods a couple of times. Then at 183sec the magYaw suddenly starts to deviate continuously from yaw reaching 110 degrees disagreement during 10sec snaps back shortly to near Yaw angle but then magYaw goes a full turn & again starts to deviate from Yaw ending up with a disagreement just over 60 degrees ... it's here the FC gives up & the AC goes into ATTI mode.

Blue line = magYaw (compass)
Light green = IMU Yaw

1583163978301.png

The compass goes crazy here at 81,5m height on the way down ...

1583164157571.png

Here the initial error followed by yaw, tilt IMU errors followed by ATTI mode at 203sec.

1583164238441.png
 
This is most probably due to a faulty compass unit ... especially as you say that this have intermittently occurred earlier.

Everything was fine initially, the take off spot wasn't magnetic interfered, the magMod was throughout the whole flight pretty much the same. The Yaw angle initialized perfectly to the magYaw at the AC power on & the IMU Yaw & compass Yaw followed perfectly until 171sec were the magYaw starts to turn 180 degrees back & forth during short second long periods a couple of times. Then at 183sec the magYaw suddenly starts to deviate continuously from yaw reaching 110 degrees disagreement during 10sec snaps back shortly to near Yaw angle but then magYaw goes a full turn & again starts to deviate from Yaw ending up with a disagreement just over 60 degrees ... it's here the FC gives up & the AC goes into ATTI mode.

Blue line = magYaw (compass)
Light green = IMU Yaw

View attachment 95599

The compass goes crazy here at 81,5m height on the way down ...

View attachment 95602

Here the initial error followed by yaw, tilt IMU errors followed by ATTI mode at 203sec.

View attachment 95603

Not sure I agree. The compass looks good, as evidenced by the consistent magnetic modulus and the appropriate responses of the magnetometers to attitude changes. It's also consistent with the flight path.

mag.png

The IMU rate gyros, in contrast, look bad. That's best illustrated by comparing the magnetic and inertial yaw data:

yaw.png

While there is agreement during some of the maneuvers, the inertial solution looks unphysical. I think this is probably an IMU problem.
 
Not sure I agree. The compass looks good, as evidenced by the consistent magnetic modulus and the appropriate responses of the magnetometers to attitude changes. It's also consistent with the flight path.

View attachment 95635

The IMU rate gyros, in contrast, look bad. That's best illustrated by comparing the magnetic and inertial yaw data:

View attachment 95637

While there is agreement during some of the maneuvers, the inertial solution looks unphysical. I think this is probably an IMU problem.
Aha ... first I didn't understand what I got wrong, I clearly see that the magYaw start to disagree from Yaw & that the AC doesn't rotates but instead spirals down with a constant heading. Then I perhaps saw "The light" ... I wrongly have thought that magYaw IS kind of the compass but instead it is results coming from the IMU.

Am I on the right way?
 
Aha ... first I didn't understand what I got wrong, I clearly see that the magYaw start to disagree from Yaw & that the AC doesn't rotates but instead spirals down with a constant heading. Then I perhaps I saw 2The light" ... I wrongly have thought that magYaw IS kind of the compass but instead it is results coming from the IMU.

Am I on the right way?

MagYaw is the magnetic heading calculated by converting the 3-axis magnetometer data to the earth frame of reference, so in that sense it is the compass reading. I think it was rotating as well as moving in a circle.
 
Not sure I agree. The compass looks good, as evidenced by the consistent magnetic modulus and the appropriate responses of the magnetometers to attitude changes. It's also consistent with the flight path.

View attachment 95635

The IMU rate gyros, in contrast, look bad. That's best illustrated by comparing the magnetic and inertial yaw data:

View attachment 95637

While there is agreement during some of the maneuvers, the inertial solution looks unphysical. I think this is probably an IMU problem.

The compass looks not OK to me at this part :
1583184662099.png

The reason is that there was no rudder input. The magnetic yaw should not have changed by so much :

1583184746594.png

When I looked at it, I thought the gyro was not working well because of this part. There was no rudder input in this time period :

1583184804656.png

But then when I checked the flight data of my Mini ( before the recent crash due to yaw initialization error ) . It seems that gyro yaw drifting may be something normal ? The Mini flew very well despite the drift :

1583184980260.png
 
@sar104 ... sorry to nag you, but trying to grip this with the inertial Yaw vs. magYaw vs. IMU Yaw according to your graph (copied it in below for convenience...)
In a fault free situation all three should agree I imagine ... but none of them does that here? How do you pinpoint which one that's abnormal ?

1583188723584.png

Then a question to clarify what to look at in CsvView & how to interpret the given value when it comes to the inertial yaw (IMU rate gyro) ...

Here below is a part of a flight with my Air ... outside the chart the flight started in pretty much westerly heading so magYaw & Yaw showed -90 degrees, but the totalGyroZ (which I assume correspond to the 2 other yaw angles) started on 0 degrees.

Here below a later portion of the same flight that was pretty much in heading north ... magYaw & Yaw values is logical but totalGyroZ is -613 degrees ... how come?

1583189255213.png
 
Overwhelmed by the responses. Thank you!!

I should change the IMU and Compas?

I'm not sure, but the MP has 2 compasses? If yes, which one i should replace?
 
Sorry not a clue ... perhaps some of the others have a lead.
 
@sar104 ... sorry to nag you, but trying to grip this with the inertial Yaw vs. magYaw vs. IMU Yaw according to your graph (copied it in below for convenience...)
In a fault free situation all three should agree I imagine ... but none of them does that here? How do you pinpoint which one that's abnormal ?

View attachment 95650

Then a question to clarify what to look at in CsvView & how to interpret the given value when it comes to the inertial yaw (IMU rate gyro) ...

Here below is a part of a flight with my Air ... outside the chart the flight started in pretty much westerly heading so magYaw & Yaw showed -90 degrees, but the totalGyroZ (which I assume correspond to the 2 other yaw angles) started on 0 degrees.

Here below a later portion of the same flight that was pretty much in heading north ... magYaw & Yaw values is logical but totalGyroZ is -613 degrees ... how come?

View attachment 95651
totalGyroZ is computed by DatCon. It's initialized to 0.0 and is the integration/summation of GyroZ. So if the AC were to start at 0° and then turn CW 450° totalGyroZ would be 450° but the Yaw would be 90° . I.e. Yaw "wraps" around 360° but totalGyroZ is unwrapped.
 
  • Like
Reactions: slup
The compass looks not OK to me at this part :
View attachment 95644

The reason is that there was no rudder input. The magnetic yaw should not have changed by so much :

View attachment 95645

When I looked at it, I thought the gyro was not working well because of this part. There was no rudder input in this time period :

View attachment 95646

But then when I checked the flight data of my Mini ( before the recent crash due to yaw initialization error ) . It seems that gyro yaw drifting may be something normal ? The Mini flew very well despite the drift :

View attachment 95648
All the DJI platforms have some gyro bias error. That translates into the integrated gyro values "drifting" like what you've observed here.

Edit: Eyeballing your plot it looks like drift rate is about 0.168 degrees/sec. That's not too bad. MM drifts about 0.19 degrees/sec
 
Last edited:
totalGyroZ is computed by DatCon. It's initialized to 0.0 and is the integration/summation of GyroZ. So if the AC were to start at 0° and then turn CW 450° totalGyroZ would be 450° but the Yaw would be 90° . I.e. Yaw "wraps" around 360° but totalGyroZ is unwrapped.

Right, but the gyro_Z axis varies with the attitude of the aircraft, and so integrating gyro-Z only gives the yaw as a function of time if the aircraft remains horizontal. Total inertial yaw requires the from all three rate gyros to construct the interval update quaternions.
 
Right, but the gyro_Z axis varies with the attitude of the aircraft, and so integrating gyro-Z only gives the yaw as a function of time if the aircraft remains horizontal. Total inertial yaw requires the from all three rate gyros to construct the interval update quaternions.
That's correct but the totalGyroZ is usually adequate to determine if the AC has actually rotated and by roughly how much. It was created for cases where Yaw and magYaw don't agree and there needs to be a way to choose which is correct. For that it's been pretty effective.
 
  • Like
Reactions: sar104
That's correct but the totalGyroZ is usually adequate to determine if the AC has actually rotated and by roughly how much. It was created for cases where Yaw and magYaw don't agree and there needs to be a way to choose which is correct. For that it's been pretty effective.

Agreed - I should have been more specific that I was explaining the discrepancy in @slup's last graph in post #11.
 
  • Like
Reactions: BudWalker
The compass looks not OK to me at this part :
View attachment 95644

The reason is that there was no rudder input. The magnetic yaw should not have changed by so much :

View attachment 95645

Right - but the point is that if the rate gyros are not correct then the aircraft will rotate without stick input.

When I looked at it, I thought the gyro was not working well because of this part. There was no rudder input in this time period :

View attachment 95646

The rate gyro data looks bad, agreed.

But then when I checked the flight data of my Mini ( before the recent crash due to yaw initialization error ) . It seems that gyro yaw drifting may be something normal ? The Mini flew very well despite the drift :

View attachment 95648

That's a different issue - it's non-zero bias and easily identified by a constant slope. You have to zero that out before doing any calculations with those data. I've done that in the calculations I presented above.
 
  • Like
Reactions: new2mavic
Agreed - I should have been more specific that I was explaining the discrepancy in @slup's last graph in post #11.
Hmmm... I would have thought he was wondering why the totalGyroZ and Yaw were different by 600°. That's probably because Yaw is wrapped and totalGyroZ isn't.
 
  • Like
Reactions: slup
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,084
Messages
1,559,651
Members
160,066
Latest member
biggej