# Flight Log Analysis

**URL:** <https://discuss.cubepilot.org/t/flight-log-analysis/5022>\
**Category:** Cube Autopilot\
**Created:** [6 November 2020 14:49 UTC](https://discuss.cubepilot.org/t/flight-log-analysis/5022 "2020-11-06T14:49:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brennan\_Hitchcock](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/brennan_hitchcock/32/253_2.png) [@Brennan\_Hitchcock](https://discuss.cubepilot.org/u/Brennan_Hitchcock)\
**Post date:** [6 November 2020 14:49 UTC](https://discuss.cubepilot.org/t/flight-log-analysis/5022/1 "2020-11-06T14:49:58Z")

</div>

Hi all,

I got my cube black / f450 clone out of storage recently and finally got out to the field. Can someone take a look and tell me what next steps for making this quad more solid are?

Bin: [https://drive.google.com/file/d/1VQjmtdzpCWPrSr2YEJzOIA5MbFWyoV1M/view?usp=sharing](https://drive.google.com/file/d/1VQjmtdzpCWPrSr2YEJzOIA5MbFWyoV1M/view?usp=sharing)

Log File C:\Users\brennan\AppData\Local\Temp\tmp2DAE.tmp.log  
Size (kb) 31446.107421875  
No of lines 357076  
Duration 0:15:50  
Vehicletype ArduCopter  
Firmware Version V4.0.5  
Firmware Hash 3f6b43e3  
Hardware Type  
Free Mem 0  
Skipped Lines 0  
Test: Autotune = UNKNOWN - No ATUN log data  
Test: Brownout = GOOD -  
Test: Compass = FAIL - Large change in mag\_field (129.69%)  
Max mag field length (1133.72) \> recommended (550.00)

Test: Dupe Log Data = GOOD -  
Test: Empty = GOOD -  
Test: Event/Failsafe = GOOD -  
Test: GPS = GOOD -  
Test: IMU Mismatch = GOOD - (Mismatch: 0.30, WARN: 0.75, FAIL: 1.50)  
Test: Motor Balance = WARN - Motor channel averages = [1446, 1497, 1506, 1538]  
Average motor output = 1496  
Difference between min and max motor averages = 92  
Test: NaNs = FAIL - Found NaN in CTUN.DSAlt

Test: OpticalFlow = FAIL - FAIL: no optical flow data

Test: Parameters = FAIL - ‘MAG\_ENABLE’ not found  
Test: PM = FAIL - 68 slow loop lines found, max 7.80% on line 173641  
Test: Pitch/Roll = GOOD -  
Test: Thrust = GOOD -  
Test: VCC = UNKNOWN - No CURR log data

---

<div class="post-metadata">

**Author:** ![Anubis](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/anubis/32/334_2.png) [@Anubis](https://discuss.cubepilot.org/u/Anubis)\
**Post date:** [6 November 2020 22:19 UTC](https://discuss.cubepilot.org/t/flight-log-analysis/5022/2 "2020-11-06T22:19:32Z")

</div>

Your compass is strongly affected by your motors.

 ![image](https://discuss.cubepilot.org/uploads/default/original/2X/8/855f95218b9d9d8429233b65d8f74b156bc0db50.png)  
The red line is the total mag field strength. It shouldn’t change much. You can see that it follows your throttle output (green). This is what is generating this error: `Test: Compass = FAIL - Large change in mag_field (129.69%) Max mag field length (1133.72) > recommended (550.00)`

This is affecting the EKF’s position estimate (the red and blue lines on the map should match), and it sometimes gets close to triggering a failsafe. The graph is the EKF’s magnetic consistency check. If it exceeds 2.0 for long enough, it will trigger a failsafe.

 ![image](https://discuss.cubepilot.org/uploads/default/original/2X/f/fda6c410b38dc6260056338c9b65f109a5ed4fbd.jpeg)

You need to do a compass-mot calibration (ideally with a working current sensor), or get your compass away from your power wires. Also make sure your power wires are twisted or tied together.

---

<div class="post-metadata">

**Author:** ![Michael\_Oborne](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/michael_oborne/32/13_2.png) [@Michael\_Oborne](https://discuss.cubepilot.org/u/Michael_Oborne)\
**Post date:** [7 November 2020 07:54 UTC](https://discuss.cubepilot.org/t/flight-log-analysis/5022/3 "2020-11-07T07:54:30Z")

</div>

100% what @Anubis said  
move your compass away should be prio no1.  
second is compass-mot.

---

<div class="post-metadata">

**Author:** ![Brennan\_Hitchcock](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/brennan_hitchcock/32/253_2.png) [@Brennan\_Hitchcock](https://discuss.cubepilot.org/u/Brennan_Hitchcock)\
**Post date:** [9 November 2020 13:35 UTC](https://discuss.cubepilot.org/t/flight-log-analysis/5022/4 "2020-11-09T13:35:20Z")

</div>

I’ve got the compass mounted up about 4-5 inches now on a GPS mast and will test fly later this week to verify that the distance is enough to counteract the interference. I realized that my main power wires were directly under the compass and it was flush mounted on the top of my F450 top plate.
