Request advice: Compass error, Yaw error, Weak GPS signal

Vel:GPS-H is a signal computed by DatCon that is GPS derived speed - the horizontal speed from the FC. Usually, it's close to 0.0. But, here it's not
View attachment 88072

I think this makes your conclusion more likely.

I'm puzzled:

Firstly, in my DatCon conversion of FLY071.DAT, the parameter Vel:GPS-H is all over the place, with many entries reading "Infinity".

Secondly, in the video of the flight replay the aircraft location and home distance appears to jump completely discontinuously at 31 seconds. In both the device log and the DAT file, the transition to the distant location is more gradual, taking around 48 seconds. And the distance from home goes out to 311 m (1020 ft) whereas the display shows 913 ft. I do not understand those inconsistencies at all.

FLYO71_01.png


Also, mag1 raw mod seems unusually noisy, but I'm not sure what to make of it.

FLYO71_02.png
 
  • Like
Reactions: JJErrico
I'm puzzled:
.....
Me too. I don't get infinity values in Vel:GPS-H. What sampling rate are you using? There may be a difference between the PC JVM and the Mac JVM.... Could you run it at 200 Hz and provide the .csv and I'll compare against mine.

I'm looking at the magMod thing. The AC is using Mag1 and it's noisy. Theoretically, it should be a constant value.. Unfortunately, DatCon doesn't extract battery info for the P4. But, looking at control inputs vs MagRaw:Mod(1) it appears that at max current is when the MagRaw:Mod(1) hits the maximum error.

upload_2017-9-11_19-56-57.png

upload_2017-9-11_19-57-7.png


Kinda reminds me of the motor cabling problem that some Mavics had. The cable wasn't twisted enough and it was close to the back compass. At high current the back compass would get noisy and ultimately cause a compass error. Also, on the Mavic the back compass was on the same PCB with the GPS. If the same is true of the P4.....
 
  • Like
Reactions: JJErrico
Me too. I don't get infinity values in Vel:GPS-H. What sampling rate are you using? There may be a difference between the PC JVM and the Mac JVM.... Could you run it at 200 Hz and provide the .csv and I'll compare against mine.

I'm looking at the magMod thing. The AC is using Mag1 and it's noisy. Theoretically, it should be a constant value.. Unfortunately, DatCon doesn't extract battery info for the P4. But, looking at control inputs vs MagRaw:Mod(1) it appears that at max current is when the MagRaw:Mod(1) hits the maximum error.

View attachment 88079
View attachment 88080

Kinda reminds me of the motor cabling problem that some Mavics had. The cable wasn't twisted enough and it was close to the back compass. At high current the back compass would get noisy and ultimately cause a compass error. Also, on the Mavic the back compass was on the same PCB with the GPS. If the same is true of the P4.....

I wondered about the sampling rate, and I guessed that you were using 200 Hz. It has infinity entries at all sample rates, but the values vary wildly with sample rate. Here's 0 - 100 seconds of the flight at 20 Hz and 200 Hz:

Dropbox - FLY071_20Hz.csv

Dropbox - FLY071.csv

Interesting observation on the elevator input related to mag1. The motor current data are in the file so you can add those to get approximate battery drain, and they clearly relate to the variations in mag1, but perhaps not as closely as pitch:

FLYO71_03.png
 
  • Like
Reactions: JJErrico
....
Secondly, in the video of the flight replay the aircraft location and home distance appears to jump completely discontinuously at 31 seconds. In both the device log and the DAT file, the transition to the distant location is more gradual, taking around 48 seconds. And the distance from home goes out to 311 m (1020 ft) whereas the display shows 913 ft. I do not understand those inconsistencies at all.
.....[/ATTACH]
When gpsHealth is 0 the Go App playback uses the next GPS coords. where gpsHealth is OK (probably 4 or 5). I.e., it doesn't interpolate in intervals where gpsHealth == 0
 
  • Like
Reactions: JJErrico
When gpsHealth is 0 the Go App playback uses the next GPS coords. where gpsHealth is OK (probably 4 or 5). I.e., it doesn't interpolate in intervals where gpsHealth == 0

OK - so it does that retrospectively. That makes sense now.
 
  • Like
Reactions: JJErrico
OK, got some new results. See data logs FLY081.DAT and FLY082.DAT at the link below.

P4A data files - Google Drive

FLY081 was a short 3:34 min flight after calibrating IMUs only. I terminated the flight after receiving "compass error", and "weak GPS signal" messages at 1:33 min. I also got a couple of "Current RTH route will pass a No-Fly zone. Pay attention to the aircraft's position to avoid RTH failure". I never initiated RTH and there was no other indication that the AC self-initiated it. Just alot of confusing disconnected pieces of info.

Then calibrated the compass out in the middle of the soccer field. After calibration, the compass interference values were as shown in the pic below. Sorry I didn't think to take a picture before calibrating, but I recall the bars were green but somewhat larger than shown here. The point is, relying on the app to judge compass health ain't no good.
20170912_121743.jpg

bEb1YWCZhtvU24iJ3

While preparing to take off, I got this warning on the Aircraft Status screen. I figured, oh oh, now I'm getting the error before takeoff, and contemplated not even conducting another test, but then realized this might be a hangover message from the previous flight. So...cautiously, I took off.
0mGyh1nTXyWRpACp2

20170912_121757.jpg


FLY082 went uneventfully, staying in GPS mode all the time for a 12:48m flight, with none of the aforementioned errors. Continued with VLOS and low level (up to 100 ft) with no issues. Contemplated doing a POI circle as a test (it makes better circles than I do) but didn't want to push my luck until having had a chance to confirm the data is clean.

I'm now a believer in calibrating and not trusting to the app for guidance. I'm very grateful for all the advice and analysis the dedicated individuals on this thread have provided. Before I celebrate, I'll wait until the experts have weighed in and confirm that FLY082 is "normal". :)
 
Last edited:
  • Like
Reactions: Mark The Droner
OK, got some new results. See data logs FLY081.DAT and FLY082.DAT at the link below.

P4A data files - Google Drive

FLY081 was a short 3:34 min flight after calibrating IMUs only. I terminated the flight after receiving "compass error", and "weak GPS signal" messages at 1:33 min. I also got a couple of "Current RTH route will pass a No-Fly zone. Pay attention to the aircraft's position to avoid RTH failure". I never initiated RTH and there was no other indication that the AC self-initiated it. Just alot of confusing disconnected pieces of info.

Then calibrated the compass out in the middle of the soccer field. After calibration, the compass interference values were as shown in the pic below. Sorry I didn't think to take a picture before calibrating, but I recall the bars were green but somewhat larger than shown here. The point is, relying on the app to judge compass health ain't no good.
20170912_121743.jpg

bEb1YWCZhtvU24iJ3

While preparing to take off, I got this warning on the Aircraft Status screen. I figured, oh oh, now I'm getting the error before takeoff, and contemplated not even conducting another test, but then realized this might be a hangover message from the previous flight. So...cautiously, I took off.
0mGyh1nTXyWRpACp2

20170912_121757.jpg


FLY082 went uneventfully, staying in GPS mode all the time for a 12:48m flight, with none of the aforementioned errors. Continued with VLOS and low level (up to 100 ft) with no issues. Contemplated doing a POI circle as a test (it makes better circles than I do) but didn't want to push my luck until having had a chance to confirm the data is clean.

I'm now a believer in calibrating and not trusting to the app for guidance. I'm very grateful for all the advice and analysis the dedicated individuals on this thread have provided. Before I celebrate, I'll wait until the experts have weighed in and confirm that FLY082 is "normal". :)
FLY081 seems to have the same issues as FLY071 and FLY074. With FLY082 it would seem that the compass calibration made a big difference. The magMod issue is gone.
upload_2017-9-12_14-11-20.png

And the Vel:GPS-H issue is gone.
upload_2017-9-12_14-12-49.png


I should have asked you if there is some external equipment installed on the P4 such as a tracker.
 
FLY081 seems to have the same issues as FLY071 and FLY074. With FLY082 it would seem that the compass calibration made a big difference. The magMod issue is gone.
View attachment 88123
And the Vel:GPS-H issue is gone.
View attachment 88124

I should have asked you if there is some external equipment installed on the P4 such as a tracker.

There is no tracker on this aircraft.

Thanks again for the analysis! I owe you a beer or two.
 
There is no tracker on this aircraft.

Thanks again for the analysis! I owe you a beer or two.
Instead of the beer or two could I get you to retrieve and post the flight before FLY071 (an actual flight, not just a battery turn on). And also the oldest flight you have. Thanks.
 
Sure...just posted.

FLY068 was the last actual flight before FLY071.

FLY011 is the oldest actual flight I have.
 
Sure...just posted.

FLY068 was the last actual flight before FLY071.

FLY011 is the oldest actual flight I have.
From looking at these two .DATs it's evident that the problem started with the incident flight FLY071 and was then fixed (hopefully) with the compass calibration done in FLY082. Since FLY011 there were no compass calibrations until FLY082; i.e. the problem wasn't due to a flawed compass calibration.

This situation is very similar to another incident that occurred recently. Look here

Fly Away

That was a P4 also. That OP also provided several .DATs surrounding the incident flight.The similarities are:
1) The same compass calibration had been in effect for several flights before and during the incident flight.
2) No evident problems before the incident flight, in particular the magMod and Vel:GPS-H issues were not evident.
3) During, and after the incident flight both P4s exhibited the magMod and Vel:GPS-H issues
4) A compass calibration seems to have fixed those problems

There are differences, however. That incident flight did not enter ATTI mode.

For that incident I had supposed that there might have been an abrupt hardware change. Was the P4 dropped, banged, etc prior to FLY071

@brianmcg
 
From looking at these two .DATs it's evident that the problem started with the incident flight FLY071 and was then fixed (hopefully) with the compass calibration done in FLY082. Since FLY011 there were no compass calibrations until FLY082; i.e. the problem wasn't due to a flawed compass calibration.

This situation is very similar to another incident that occurred recently. Look here

Fly Away

That was a P4 also. That OP also provided several .DATs surrounding the incident flight.The similarities are:
1) The same compass calibration had been in effect for several flights before and during the incident flight.
2) No evident problems before the incident flight, in particular the magMod and Vel:GPS-H issues were not evident.
3) During, and after the incident flight both P4s exhibited the magMod and Vel:GPS-H issues
4) A compass calibration seems to have fixed those problems

There are differences, however. That incident flight did not enter ATTI mode.

For that incident I had supposed that there might have been an abrupt hardware change. Was the P4 dropped, banged, etc prior to FLY071

@brianmcg

Thank you again for the further analysis. To my knowledge, the P4 has never been dropped or banged. It's a pampered drone.

Assuming the calibration fixed the problem, I'm now considering what best practice is. Calibrate before every flight ? Every nth flight ? Waiting until compass/yaw/gps errors are encountered seems risky. I guess there's inherent risks in frequent calibration too, correct ?
 
Thank you again for the further analysis. To my knowledge, the P4 has never been dropped or banged. It's a pampered drone.

Assuming the calibration fixed the problem, I'm now considering what best practice is. Calibrate before every flight ? Every nth flight ? Waiting until compass/yaw/gps errors are encountered seems risky. I guess there's inherent risks in frequent calibration too, correct ?
IMHO, the risk of getting a bad calibration is way, way overstated. It's almost impossible to get a bad calibration; if there is a problem then the calibration will rejected. I've looked at a lot of data associated with compass issues and I've never seen any evidence of a flawed calibration. And, I'm always looking; that's why I asked for your previous flights as well as @brianmcg 's.

I have a theory that the commonly held belief that a calibration be performed in such a way that it is flawed stems from the P2 days (I wasn't around then). Apparently, the compass mounting was adjustable and needed to set per the geomagnetic declination. And, yes that could be screwed up. The P3 and after all determine the declination from the GPS coords.

I don't know how to answer your question. Re-calibrating at regular intervals will address a compass that drifts with time. My Mavic's compass drifted. (A compass that has drifted isn't so bad; the errors presented are almost like those that occur with a cross wind.) But, for a situation like yours or @brianmcg 's the change was abrupt so you'd need to calibrate before every flight. In addition, it's not clear that the change didn't occur during the flight.
 
Thanks again BudWalker. There must be 1000's of P4's out there. Gotta wonder how many are experiencing this.

Thanks to all who contributed their ideas and experience to this thread.
 
IMHO, the risk of getting a bad calibration is way, way overstated. It's almost impossible to get a bad calibration; if there is a problem then the calibration will rejected. I've looked at a lot of data associated with compass issues and I've never seen any evidence of a flawed calibration. And, I'm always looking; that's why I asked for your previous flights as well as @brianmcg 's.

I have a theory that the commonly held belief that a calibration be performed in such a way that it is flawed stems from the P2 days (I wasn't around then). Apparently, the compass mounting was adjustable and needed to set per the geomagnetic declination. And, yes that could be screwed up. The P3 and after all determine the declination from the GPS coords.

I don't know how to answer your question. Re-calibrating at regular intervals will address a compass that drifts with time. My Mavic's compass drifted. (A compass that has drifted isn't so bad; the errors presented are almost like those that occur with a cross wind.) But, for a situation like yours or @brianmcg 's the change was abrupt so you'd need to calibrate before every flight. In addition, it's not clear that the change didn't occur during the flight.

The P2 compass problems, that I was involved with testing, appeared to be due to firmware issues with interpretation of the declination, leading the FC to see a mismatch between heading and track and producing the infamous j-hook flight paths. The compass mounting was not itself adjustable, but DJI did state that calibration was required when changing location by any significant distance. That never made much sense to me since the IMU could, in theory, determine inclination from the accelerometer data during compass calibration, but it could not determine declination in the absence of a rotational reference direction.

However - bad calibrations were likely much easier to do back then since the IMU was far less sophisticated.
 
The P2 compass problems, that I was involved with testing, appeared to be due to firmware issues with interpretation of the declination, leading the FC to see a mismatch between heading and track and producing the infamous j-hook flight paths. The compass mounting was not itself adjustable, but DJI did state that calibration was required when changing location by any significant distance. That never made much sense to me since the IMU could, in theory, determine inclination from the accelerometer data during compass calibration, but it could not determine declination in the absence of a rotational reference direction.

However - bad calibrations were likely much easier to do back then since the IMU was far less sophisticated.
Took me a while to remember why I thought that the compass was mechanically adjustable, but here it is
Compass Calibration, A Complete Primer

But, you were there, I wasn't.

Isn't it the case that the following are equivalent in the sense that Yaw will be biased with respect to magYaw
1) mechanically mis-adjusted compass like above
2) incorrect declination
3) hard iron that isn't compensated for
4) initial part of the flight after launching from a geomagnetically distorted site

@N017RW
 
Took me a while to remember why I thought that the compass was mechanically adjustable, but here it is
Compass Calibration, A Complete Primer

But, you were there, I wasn't.

Isn't it the case that the following are equivalent in the sense that Yaw will be biased with respect to magYaw
1) mechanically mis-adjusted compass like above
2) incorrect declination
3) hard iron that isn't compensated for
4) initial part of the flight after launching from a geomagnetically distorted site

@N017RW

On the P2 it was physically possible to rotate but the compass, and some people did try that to fix the declination issue, but it was not intended to rotate and needed modification to make it stay in any other than the original orientation due to the clamping mechanism and the leg cross-sectional profile.

fullsizeoutput_b17.jpeg


I agree that the four cases that you listed all cause yaw bias.
 
  • Like
Reactions: BudWalker
We had this exact same yaw error on are fly away and the end result was the DJI after 30 days and 25 emails , gave us a 100% cupon for a new one.
So they are aware of the problem in the aircraft switching out of GPS to ATTI mode.

Is there any hack to disable that ATTI mode all together ?
We have never had a need for it and would rather rely on the GPS to come back as once you get into ATTI mode there is no recovery it seems.
 
Is there any hack to disable that ATTI mode all together ?
We have never had a need for it and would rather rely on the GPS to come back as once you get into ATTI mode there is no recovery it seems.
No ... you can't disable Atti mode altogether.
Atti mode is what you have if you have no GPS reception GPS either through flying in a canyon or under cover which reduces your Phantom's skyview.
Or you can get there by selecting the A position on the mode switch or be unfortunate enough to suffer a compass error or yaw error, in which case the flight controller can't handle the conflicting data it's getting from the compass and GPS - so it ignores the GPS data which puts you in Atti mode.
 

Recent Posts

Members online

Forum statistics

Threads
143,099
Messages
1,467,641
Members
104,988
Latest member
jadabyanza24