We’re quite new to ArduPilot, so we may be missing something obvious here…
The other day we were doing a fairly simple test with our tricopter. The test area was right next to a river — probably not the best choice in hindsight! The mission was to fly to a few waypoints in a fairly small area (all on the near side of the river), and then RTL.
The first flight went fine. However, during the second flight, we got a “GPS Glitch” and the drone suddenly started flying across the river. At the time, we observed that it was flying on its side, and appeared to be gradually descending. We tried to gain control using the RC, but were unable to. We then lost sight of the drone, and were unsure whether it had landed in the river or on the far side of it.
A few days later, we managed to get access to the property on the other side of the river and found our drone — remarkably almost completely unharmed! We were able to access the dataflash logs, but we’re having trouble figuring out exactly what happened.
Here’s our interpretation of the log file.
- The first flight (from about timestamp 16:54:00 to 16:56:30) was fairly uneventful.
- After that, we tried the same mission again (starting at about timestamp 16:59:00), and fairly shortly after takeoff we got a GPS Glitch which caused the drone to go into Land mode.
- The GPS Glitch seemed to be caused by a variance between the “GPS” and “POS” positions. (As seen plotted on the map while viewing the log in Mission Planner.)
- That variance disappeared very suddenly at the same time as the “EKF primary changed” message appeared, which we assume means that switching to a different IMU fixed the incorrect position reading. Our guess is that the EKF position was incorrect (as a result of an IMU problem) while the GPS position was correct.
- At this point, the drone was still on the near side of the river, although not where it should have been. However, it suddenly started going across the river while still apparently in Land mode.
The altitude readings in the log show that the drone was indeed descending (as was appropriate for Land mode) while crossing the river. What we don’t understand is why it wasn’t staying in the same spot while doing so. Could this be related to the fact that the drone was flying on its side?
The log analysis shows the following. Could the compass issues raised by the analysis be the problem here?
Size (kb) 6104.32421875
No of lines 70675
Duration 0:05:49
Vehicletype ArduCopter
Firmware Version V3.5.4
Firmware Hash 284349c3
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = FAIL - WARN: Large compass offset params (X:37.00, Y:-316.00, Z:27.00)
WARN: Large compass offset in MAG data (X:37.00, Y:-316.00, Z:27.00)
Large change in mag_field (294.88%)
Max mag field length (1792.30) > recommended (550.00)
Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = FAIL - ERRs found: CRASH GPS_GLITCH
Test: GPS = UNKNOWN - join() takes exactly one argument (2 given)
Test: IMU Mismatch = GOOD - (Mismatch: 0.51, WARN: 0.75, FAIL: 1.50)
Test: Motor Balance = GOOD - Motor channel averages = [1544, 1538, 1591]
Average motor output = 1557
Difference between min and max motor averages = 53
Test: NaNs = GOOD -
Test: OpticalFlow = FAIL - FAIL: no optical flow data
Test: Parameters = FAIL - 'THR_MIN' not found
Test: PM = WARN - 2 slow loop lines found, max 8.38% on line 56193
Test: Pitch/Roll = UNKNOWN - 'BarAlt'
Test: Thrust = GOOD -
Test: VCC = UNKNOWN - No CURR log data