# Too much compass varience

**URL:** <https://discuss.cubepilot.org/t/too-much-compass-varience/11805>\
**Category:** Cube Autopilot\
**Created:** [4 September 2023 05:50 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805 "2023-09-04T05:50:03Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [19 September 2023 10:48 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/24 "2023-09-19T10:48:49Z")

</div>

another flight done with suggested parameter

> **[2023-09-19 15-03-20.bin](https://drive.google.com/file/d/1zidlwocR_7Jdrd4ZJDTxcAI_eHbJpaoZ/view?usp=sharing)**
>
> Google Drive file.

if mu drone require compass calibration before flight do i have to burn these listed parameter again since the value goes to default .  
COMPASS\_DIA\_X 0.962  
COMPASS\_DIA\_Y 1.046  
COMPASS\_DIA\_Z 0.800  
COMPASS\_ODI\_X -0.003  
COMPASS\_ODI\_Y 0.023  
COMPASS\_ODI\_Z 0.044  
COMPASS\_OFS\_X 92  
COMPASS\_OFS\_Y 280  
COMPASS\_OFS\_Z 175  
COMPASS\_MOT\_X 7.994  
COMPASS\_MOT\_Y -10.000  
COMPASS\_MOT\_Z 0.449  
COMPASS\_DIA2\_X 1.002  
COMPASS\_DIA2\_Y 1.038  
COMPASS\_DIA2\_Z 0.800  
COMPASS\_ODI2\_X -0.004  
COMPASS\_ODI2\_Y -0.023  
COMPASS\_ODI2\_Z 0.024  
COMPASS\_OFS2\_X 45  
COMPASS\_OFS2\_Y -231  
COMPASS\_OFS2\_Z 388  
COMPASS\_MOT2\_X 0.436  
COMPASS\_MOT2\_Y 0.336  
COMPASS\_MOT2\_Z 0.165  
COMPASS\_SCALE2 1.00  
COMPASS\_SCALE 1.00  
COMPASS\_MOTCT 2  
INS\_ACCEL\_FILTER,10  
INS\_HNTCH\_ENABLE,1  
INS\_LOG\_BAT\_MASK,1  
INS\_LOG\_BAT\_OPT,4  
PSC\_ACCZ\_I,0.6  
PSC\_ACCZ\_P,0.3  
INS\_HNTCH\_BW,20  
INS\_HNTCH\_REF,0.35  
INS\_HNTCH\_FM\_RAT,0.7  
ATC\_THR\_MIX\_MAN,0.5  
INS\_HNTCH\_FREQ,83  
INS\_HNTCH\_BW,30

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [19 September 2023 22:50 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/25 "2023-09-19T22:50:44Z")

</div>

There should be no calibration of compasses required, that would be a step backwards.  
Even if you travel a long way from home compass calibration will NOT be needed - recalibrating the compass for every flight or location is an outdated concept tied to early DJIs.

I didnt notice anything different in that log - are you going to try Autotune on pitch and roll axis?

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [20 September 2023 09:47 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/26 "2023-09-20T09:47:27Z")

</div>

should i proceed with auto tune my drone, which flight mode to set for auto tune.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [20 September 2023 09:47 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/27 "2023-09-20T09:47:49Z")

</div>

which flight mode to set for auto tune& should i proceed with auto tune my drone

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [21 September 2023 00:36 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/28 "2023-09-21T00:36:05Z")

</div>

You set your flight mode switch to have Autotune as one of the modes, so if it’s a 3 position switch you might have Stabilise, AltHold and Loiter. Then change Loiter to be Autotune in the arducopter parameters.  
Select the pitch and roll axis using the AUTOTUNE\_AXES parameter.

Make sure you have lots of open space, the copter will drift around a lot during autotune, and you can reposition it periodically.  
Take off and fly around to check everything is working OK in AltHold.  
Switch to Autotune mode and wait until it completely finishes twitching. DO NOT switch OUT of Autotune mode, just reposition and land with the sticks and throttle as per normal.  
Wait a few seconds after the copter disarms, then you can change flight modes and test fly.  
Remember to put back Loiter instead of Autotune once you’ve done all axis.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [21 September 2023 08:58 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/29 "2023-09-21T08:58:16Z")

</div>

done with auto tune sharing bin file of auto tune process and another flight in loiter mode

> **[1.rar](https://drive.google.com/file/d/1pETMvEox2URJwnYvammdD-SWJ8TljjSv/view?usp=sharing)**
>
> Google Drive file.

note: i have notices values were same before and after auto tune in PID setting

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [21 September 2023 08:58 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/30 "2023-09-21T08:58:51Z")

</div>

> **[1.rar](https://drive.google.com/file/d/1pETMvEox2URJwnYvammdD-SWJ8TljjSv/view?usp=sharing)**
>
> Google Drive file.

done with auto tune sharing bin file of auto tune process and another flight in loiter mode  
Note: I have notices values were same before and after auto tune in PID setting

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [25 September 2023 20:52 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/31 "2023-09-25T20:52:01Z")

</div>

That’s because Roll autotune was started and never completed, you stopped Autotune before it finished.  
Keep in mind Autotune will move the copter around a LOT like drifting, make sure you have a big enough clear area so you dont have to reposition much, and no wind.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [29 September 2023 07:56 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/32 "2023-09-29T07:56:34Z")

</div>

thank you for your help after successful auto tune drone was working fine  
we have integrated lidar system on our drone with its external antenna(lidar) but after integrating our gps is not locking and continuously showing inconsistent compass variance  
sending bin file for observation

> **[1.rar](https://drive.google.com/file/d/1ih-nBrNBEitjMoL65jbycCNfxObPSBsM/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [29 September 2023 07:57 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/33 "2023-09-29T07:57:15Z")

</div>

> **[1.rar](https://drive.google.com/file/d/1ih-nBrNBEitjMoL65jbycCNfxObPSBsM/view?usp=sharing)**
>
> Google Drive file.

thank you for your help after successful auto tune drone was working fine  
we have integrated lidar system on our drone with its external antenna(lidar) but after integrating our gps is not locking and continuously showing inconsistent compass variance  
sending bin file for observation  
need suggestions

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [29 September 2023 09:14 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/34 "2023-09-29T09:14:18Z")

</div>

Have you powered the LIDAR from a separate BEC (with common ground) ?  
Also set `BRD_BOOT_DELAY,3000` to ensure CAN-connected devices can sort themselves out before the flight controller completes booting.  
If the LIDAR is CAN-connected you might need to look up the doco to see how to change its address, or change the GNSS units address.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [29 September 2023 09:21 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/35 "2023-09-29T09:21:29Z")

</div>

our lidar is getting power from distribution board it is externally connected i.e. plug and play  
we are using pixhawk kore board and supplying power from the power output port.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [29 September 2023 09:22 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/36 "2023-09-29T09:22:12Z")

</div>

we are using pixhawk kore board and supplying power from the power output port.  
Our lidar is getting power from distribution board it is externally connected i.e. plug and play

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [29 September 2023 09:24 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/37 "2023-09-29T09:24:52Z")

</div>

moreover when the lidar is switched off drone gps is locked and when we power on the lidar it continuously shows compass inconsistent

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [29 September 2023 21:15 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/38 "2023-09-29T21:15:16Z")

</div>

The might need more separation - does the LIDAR have a motor for spinning or is it fixed?

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [2 October 2023 10:18 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/39 "2023-10-02T10:18:40Z")

</div>

got the solution, drone is working fine  
I’m sending file for improvement, have done flight with lidar(payload)

> **[2023-10-02 10-26-53.bin](https://drive.google.com/file/d/1TOl4tMU3McmfAELj9gLTRFFbCobQjWlf/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [2 October 2023 10:18 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/40 "2023-10-02T10:18:54Z")

</div>

> **[2023-10-02 10-26-53.bin](https://drive.google.com/file/d/1TOl4tMU3McmfAELj9gLTRFFbCobQjWlf/view?usp=sharing)**
>
> Google Drive file.

got the solution drone is working fine  
I’m sending file for improvement, have done flight with lidar(payload)

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [3 October 2023 08:06 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/41 "2023-10-03T08:06:54Z")

</div>

Seems good. You could probably do a bit more tuning but it’s Ok and we’ve all seen a lot worse.

No need to make two replies - everyone can see everything in the whole thread.

---

<div class="post-metadata">

**Author:** ![shivam](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/shivam/32/7043_2.png) [@shivam](https://discuss.cubepilot.org/u/shivam)\
**Post date:** [9 November 2023 06:13 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/42 "2023-11-09T06:13:22Z")

</div>

Hey,  
I have recently build an agriculture drone/HEXACOPTER conf. as follow:  
pixhawk cube orange  
here 3 gps  
motor X6 plus motors  
software :qgc(skydriod H12 REMOTE)  
sending bin file to review

> **[2023-11-09 10-11-47.bin](https://drive.google.com/file/d/1-R7Pck-g6FXUKjSVdAGmwiSmkCM5eIkw/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![xfacta](https://discuss.cubepilot.org/letter_avatar_proxy/v4/letter/x/5f8ce5/32.png) [@xfacta](https://discuss.cubepilot.org/u/xfacta)\
**Post date:** [9 November 2023 07:42 UTC](https://discuss.cubepilot.org/t/too-much-compass-varience/11805/43 "2023-11-09T07:42:57Z")

</div>

The hex went to maximum output to get airborne, causing a thrust loss warning, then it seemed to be fine after that. Any reason you noticed?

 ![image](https://discuss.cubepilot.org/uploads/default/original/2X/6/60cd5f0141da96954f88b440d7fca81e15885cac.png)

Stability looks quite good for early stages of this type of build.  
Vibrations are nice and low.

Your battery monitor seems configured wrong:  
`BATT_VOLT_MULT,936.0623`  
should probably be:  
`BATT_VOLT_MULT,12.02`  
and the current is rising with time even while the copter is landed, as if the Current and Voltage sense wires are swapped around.  
Definitely fix this before anything else.

You could have used the Initial Parmaters calculator in MissionPlanner, but set all these since I worked them out for you:

```auto
ATC_ACCEL_P_MAX,40000
ATC_ACCEL_R_MAX,40000
ATC_ACCEL_Y_MAX,16000
BATT_FS_CRT_ACT,1
BRD_BOOT_DELAY,3000
BRD_SAFETY_DEFLT,0 // disable the safety switch if you need to
FENCE_ENABLE,1 // check the fence radius and altitude
GPS_GNSS_MODE,65
INS_ACCEL_FILTER,10
INS_HNTCH_ENABLE,1 // write this then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_BW,20
INS_HNTCH_FREQ,40
INS_HNTCH_FM_RAT,0.7
INS_HNTCH_HMNCS,3
INS_HNTCH_REF,0.24
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
MOT_BAT_VOLT_MAX,50.40
MOT_BAT_VOLT_MIN,39.60
MOT_PWM_MIN,1050
MOT_PWM_MAX,1950
MOT_THST_EXPO,0.74
PILOT_THR_BHV,7
PSC_ACCZ_I,0.52
PSC_ACCZ_P,0.26

```

You will **need** to use MissionPlanner Motor Test to recheck your `MOT_SPIN_ARM` is as low as it can reliably go, and `MOT_SPIN_MIN` is just +0.03 higher.

Now just do a flight in AltHold and Loiter, mostly hovering and some gentle pitch, roll and yaw - no special aerobatics, barrel rolls or missions.  
Let’s see that log.

[Previous page](https://discuss.cubepilot.org/t/too-much-compass-varience/11805.md?page=1)

[Next page](https://discuss.cubepilot.org/t/too-much-compass-varience/11805.md?page=3)
