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

Mavic Pro - Compass Error. Exit P-GPS Mode

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?

The MP does have two compasses. I'm not sure why only one is showing up in the DAT file conversion. @BudWalker - any ideas?
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.

Oh - maybe. I assumed he had seen that the deltas were different.
 
The MP does have two compasses. I'm not sure why only one is showing up in the DAT file conversion. @BudWalker - any ideas?


Oh - maybe. I assumed he had seen that the deltas were different.
The mobile device .DAT just has one magnetometer.
 
The mobile device .DAT just has one magnetometer.

Right - I was confusing the mobile and aircraft DAT files. The aircraft DAT file has data from both compasses:

Mag(0):X
Mag(0):Y
Mag(0):Z
Mag(0):Mod
Mag(0):magYaw
Mag(0):Yaw-magYaw
Mag(1):X
Mag(1):Y
Mag(1):Z
Mag(1):Mod
Mag(1):magYaw
Mag(1):Yaw-magYaw
Mag(0):rawX
Mag(0):rawY
Mag(0):rawZ
Mag(0):rawMod
Mag(1):rawX
Mag(1):rawY
Mag(1):rawZ
Mag(1):rawMod
 
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

I have checked more .DAT files of my Mini and found that the slope of totalGyro:Z is sometimes negative and sometimes positive for the same craft. Is this something known and expected ?

positive slope.JPG

negative.JPG
 
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.

Thank's @BudWalker for clarifying ... this was what I suspected.

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.

So @BudWalker & @sar104 ... based on above quote, which is wrong based on what ...

The gyro ... due to this? (Nothing goes wrong with the AC)

1583238329930.png

Or the compass due to this? (The AC clearly starts to behave)

1583238404745.png

Or both ..? Or is it more parameters that need to be added to see the full picture?
 
Thank's @BudWalker for clarifying ... this was what I suspected.



So @BudWalker & @sar104 ... based on above quote, which is wrong based on what ...

The gyro ... due to this? (Nothing goes wrong with the AC)

View attachment 95704

Or the compass due to this? (The AC clearly starts to behave)

View attachment 95705

Or both ..? Or is it more parameters that need to be added to see the full picture?

It's difficult to be definitive when there are only one each of two sensors that disagree. For example, in the recent case on the frozen lake we had video and VIO data to compare with. Sensor redundancy is good. If we could take a look at the aircraft DAT file then we would have a second compass to compare with. That said, the outward flight path here was smooth and steady (based on GPS), and that is completely inconsistent with either the totalGyroZ or the full inertial rate gyro calculation that I put in post #7.

The late-time rotations indicated by the compass look more possible to me, especially since they coincide with the circling in the flight path and because the compass magnetic modulus is good, but that's obviously not conclusive.

I also attempted a full inertial reconstruction of the flight path using just the accelerometer data together with the different yaw records from the compass, gyros (full inertial) and IMU. That failed miserably - none of them look like the actual track. I would have expected at least qualitative agreement on the first part of the flight, and I'm still running some tests to see why that is since I use that method successfully for other (unrelated) purposes.
 
  • Like
Reactions: BudWalker and slup
It's difficult to be definitive when there are only one each of two sensors that disagree. For example, in the recent case on the frozen lake we had video and VIO data to compare with. Sensor redundancy is good. If we could take a look at the aircraft DAT file then we would have a second compass to compare with. That said, the outward flight path here was smooth and steady (based on GPS), and that is completely inconsistent with either the totalGyroZ or the full inertial rate gyro calculation that I put in post #7.

The late-time rotations indicated by the compass look more possible to me, especially since they coincide with the circling in the flight path and because the compass magnetic modulus is good, but that's obviously not conclusive.

I also attempted a full inertial reconstruction of the flight path using just the accelerometer data together with the different yaw records from the compass, gyros (full inertial) and IMU. That failed miserably - none of them look like the actual track. I would have expected at least qualitative agreement on the first part of the flight, and I'm still running some tests to see why that is since I use that method successfully for other (unrelated) purposes.
Great @sar104 ... did for a while think that I couldn't get something obvious to you guys into my thick skull ;)

And yeah ... it's certainly so that some cases never will be fully conclusive, so long solid experience is needed to close in on what's most likely. There you (and your more flexible Igor Pro) definitely have the upper hand ... I mean, before June last year drones was only something that I had heard existed for the broad public ... that's hardly called a solid experience :D
 
  • Like
Reactions: sar104
Great @sar104 ... did for a while think that I couldn't get something obvious to you guys into my thick skull ;)

And yeah ... it's certainly so that some cases never will be fully conclusive, so long solid experience is needed to close in on what's most likely. There you (and your more flexible Igor Pro) definitely have the upper hand ... I mean, before June last year drones was only something that I had heard existed for the broad public ... that's hardly called a solid experience :D

In this case the aircraft DAT file should be available - we can read Mavic Pro DATs. @vizi_ionut?
 
I have checked more .DAT files of my Mini and found that the slope of totalGyro:Z is sometimes negative and sometimes positive for the same craft. Is this something known and expected ?

View attachment 95697

View attachment 95698
That's a new one on me. I look at the integrated gyro data in the interval between power up and motorStart. There is usually 10 secs or more where the AC is perfectly still. It would be interesting to see if the drift rate varies from from flight to flight.

You could also try hovering and rotating slowly several turns. Then compare totalGyroZ against what the unwrapped magYaw would be.

BTW you can turn on the grid lines for a particular axis. Doing a right mouse click on the label gets you to this popup
1583252567305.png
 
That's a new one on me. I look at the integrated gyro data in the interval between power up and motorStart. There is usually 10 secs or more where the AC is perfectly still. It would be interesting to see if the drift rate varies from from flight to flight.

You could also try hovering and rotating slowly several turns. Then compare totalGyroZ against what the unwrapped magYaw would be.

BTW you can turn on the grid lines for a particular axis. Doing a right mouse click on the label gets you to this popup
View attachment 95729

I've done numerous tests on rate gyro stability, and even if you zero out the bias at the start of a flight it has often drifted off zero by the end of the flight. It appears to be sensitive to temperature, but not systematically enough to write a correction procedure.
 

Attachments

  • Untitled.png
    Untitled.png
    43.5 KB · Views: 9
  • mavic.png
    mavic.png
    76.8 KB · Views: 9
Last edited:
  • 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.

The DJI_ASSISTANT_EXPORT_FILE_XXX.DAT you provided didn't contain FLY206 - the one we need. Try DropBoxing the DJI_ASSISTANT_EXPORT_FILE_2020-03-01_01-44-24 .DAT

Well ... this is the first time I look into an AC DAT, but think I found the 2 compasses.

So which conclusions do we draw from this ..?

1583315207028.png
 
Looks like sar is right. The compasses are OK as the output of the two agreed with each other. Verdict : bad gyro ?
Yeah I agree that that's the case ... this have been a really solid learning session, just a bit frustrating that the AC DAT is needed to conclude ... a lot of other AC's that don't allow us to peak into those.

The only thing I which for now is the possibility to wrap/unwrap, 180 to 360 adjust graphs to my own liking directly in CsvView to make thing's easier to compare ;) , but I will not whine ... thank's to @BudWalker it's freeware so I'm grateful for what I have :DThumbswayup
 
  • Like
Reactions: GadgetGuy
I have tried to find a brand new IMU but no luck, the only one that i manage to find was from china.


100% Original
Compatible with DJI Mavic Pro

Please note: the IMU is removed from the original Mavic Pro Drone, tested before shipping (curious how they test it).

It was only 10.88 dollars. I hope will be ok after i replace it.

I will post again after i fix it and make some flight tests.

Thank you for the received support !!
 
  • Like
Reactions: slup
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
131,129
Messages
1,560,124
Members
160,100
Latest member
PilotOne