Imu 0,1&2 switch to compass 1

Hello

So we were doing endurance test in loiter mode and we faced an issue should I be worried ?

Imu 0,1 &2 switch to compass 1 at the start of the flight.

What would be the reason for this switch if anyone could shed some light on this

Log - quad 4 battery set endurance test - Google Drive

The problem is compass calibration, only Compass 1 is close for X and Y axis, and Compass 2 (which is disabled) for Z axis.

Set these to fix mistakes and reduce unnecessary logging:

BATT_FS_CRT_ACT,1
INS_HNTCH_BW,10
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
LOG_BITMASK,180222

Motor imbalance - clockwise motors are working much harder than counter-clockwise motors indicating a physical issue like twisted motor mounts. Check all the motor mounts are perfectly aligned and see if you can better balance the weight.

GPS1 is having a hard time doing the required update rate, maybe try a value of 5 for both GPS_GNSS_MODE and GPS_GNSS_MODE2 and see if that gives a better result, less switching of primary GPS unit.

Since that log is so huge, I would suggest you do another short flight with those changes, and just do yaw, circles and ascent/descent for a couple of minutes, then provide that log.
With that log Magfit should be able to come up with the correct calibrations.

I have 2 here3 gps as priority 1 and 2 and the internal compass is deselected to be used.

We did try to level it in this flight hope it has improved

These changes are done

Did a auto flight with 15kgs payload
Findings -
Every way point compass variance was high
During rtl below some 50meters the drone started oscillating and kept increasing and had to take over in alt mode and do the landing.

What would be the reason for this oscillation ?

Log- 22-04-2024 drone 2 auto test - Google Drive

Magfit warns:
Mag 3 possible incorrect orientation: 0:None
Should be: 6:Yaw270
Probably best to set COMPASS_ORIENT3,6 even if you dont use it.

Set these to fix the external compasses:

COMPASS_OFS_X,-13.583996
COMPASS_OFS_Y,1.4825662
COMPASS_OFS_Z,2.8362975
COMPASS_DIA_X,1.0407653
COMPASS_DIA_Y,0.99428064
COMPASS_DIA_Z,0.964954
COMPASS_ODI_X,-0.014383806
COMPASS_ODI_Y,0.056800425
COMPASS_ODI_Z,0.016240096
COMPASS_MOT_X,-1.0856662
COMPASS_MOT_Y,0.10139304
COMPASS_MOT_Z,-2.4532752
COMPASS_SCALE,1.0455141
COMPASS_ORIENT,0
COMPASS_OFS2_X,-110.2888
COMPASS_OFS2_Y,-192.10757
COMPASS_OFS2_Z,218.39388
COMPASS_DIA2_X,1.0006678
COMPASS_DIA2_Y,1.0588034
COMPASS_DIA2_Z,0.94052875
COMPASS_ODI2_X,0.002116704
COMPASS_ODI2_Y,-0.0119819
COMPASS_ODI2_Z,-0.024602534
COMPASS_MOT2_X,-0.05472348
COMPASS_MOT2_Y,0.34939402
COMPASS_MOT2_Z,0.03605343
COMPASS_SCALE2,0.9969238
COMPASS_ORIENT2,0
COMPASS_MOTCT,2

The copter was a bit unstable during all of the descent and eventually it became too much. I would say MOT_THST_EXPO might need adjustment, and tuning will need some improvement.
What motors, props and ESCs do you have?

The issue is still there with the motor imbalance, probably affecting yaw and slightly affecting attitude control in general.
If you motor mounts are connected to round tube arms, then they are not perfectly aligned, or the frame is twisting slightly during flight.

X11plus hobbywing combo with esc, 43inch prop

Ok so I wil update these prams to my copter.

It’s alligned at 0* for all 4 motors and frame using the level meter of iPhone

This would be the autotune or input shaping prams ?

It’s about 0.7 right now, previous similar specs drone it was set to .8

Only our pixhawk is 270* and rest two here3 plus gps is facing forward

The props have to spin on the same plane as each other, check them all from the side view for a start:
image

I use a straight-edge from one motor mount to the next, but that usually means the motors cant be in place.

1 Like

So should I change mot thst expo to 0.80?

And do I need to run an autotune again ?

Yes, you need to redo autotune if you change the EXPO value.

Did you manage to install the software 0.2.4 now? Can you provide the .zip file?

Ok so will change expo to 0.8 and then redo the auto tune in roll and pitch axis and not yaw confirm ?

I did install the older version update one just couldn’t install because a friend of mine actually installed it on my laptop it was not easy for me to install .

since a week or so there is a windows installer. All you need to do is download and execute.

When you change the expo, also recheck and set the MOT_SPIN_ARM and MOT_SPIN_MIN

So we re did the motors angles and we changed the expo to 0.80 and did autotune foloweee by input shaping

There after a similar auto mission

There was no oscillations during descent

Only issue is ekf compass variance is going high at times which wasn’t happening before

@xfacta @amilcarlucas

Log 23-04-2024 drone 2 - Google Drive

Oh dayum I missed it out. Will be using it next time

ARMING_CHECK,1
BATT_FS_CRT_ACT,1

also probably good to set INS_ACCEL_FILTER,10

This should finalise the compass calibration:

COMPASS_OFS_X,-32.212845
COMPASS_OFS_Y,-11.973111
COMPASS_OFS_Z,13.195703
COMPASS_DIA_X,1.0489197
COMPASS_DIA_Y,0.99144685
COMPASS_DIA_Z,0.9596335
COMPASS_ODI_X,-0.014440502
COMPASS_ODI_Y,0.06971053
COMPASS_ODI_Z,0.022362618
COMPASS_MOT_X,-0.10498904
COMPASS_MOT_Y,-0.121939115
COMPASS_MOT_Z,0.022542818
COMPASS_SCALE,1.0416497
COMPASS_ORIENT,0
COMPASS_OFS2_X,-133.41267
COMPASS_OFS2_Y,-203.38217
COMPASS_OFS2_Z,191.48943
COMPASS_DIA2_X,0.99115646
COMPASS_DIA2_Y,1.04775
COMPASS_DIA2_Z,0.96109354
COMPASS_ODI2_X,-0.0010830858
COMPASS_ODI2_Y,-0.0060595134
COMPASS_ODI2_Z,-0.010829056
COMPASS_MOT2_X,-1.5839652
COMPASS_MOT2_Y,1.0711657
COMPASS_MOT2_Z,-2.4676852
COMPASS_SCALE2,1.0019095
COMPASS_ORIENT2,0
COMPASS_MOTCT,2

There is still some instability during descent, but it didnt get almost out of control like last time.

What “Input shaping” did you do after Autotune?

ATC-accel-p-max=……. * (45kg/30kg)

ATC-accel-r-max=………* (45kg/30kg)

ATC-accel-y-max=……… * (45kg/30kg)

So we made the changes and did a auto mission with 15kgs payload

Flight went well and I guess tunning has also improved if you could see the log

Log 27-04-2024 drone 2 - Google Drive