Crash when switching from RTL to Loiter

Hi Shawn.

Many thanks for all the help. In my opinion it now flies like a dream. I am sending some pictures and the latest log.




Regards //YB

You are right - the attitude control is great.
I would not change anything related to tuning now.

You can see on the picture down below the red and blue lines dont quite line up at all times. Vibrations can be the cause of that too, but your vibes are quite OK and that GPS position is never too far from the IMU-calculated position.
Hopefully this can improve the position and GPS tracking a bit.
GPS_GNSS_MODE,5
If your GNSS unit is a bit old it might not do Galileo well or at all, so if you have a long wait for 3D Fix or poor HDOP when using 5, try this alternative:
GPS_GNSS_MODE,65

I used your flight and magfit to get these values, so compass calibrations should be as good as they can get if you plug these in:

COMPASS_DIA_X,1.020
COMPASS_DIA_Y,1.112
COMPASS_DIA_Z,0.800
COMPASS_MOT_X,-3.832
COMPASS_MOT_Y,3.066
COMPASS_MOT_Z,4.459
COMPASS_ODI_X,-0.073
COMPASS_ODI_Y,-0.114
COMPASS_ODI_Z,0.103
COMPASS_OFS_X,-698
COMPASS_OFS_Y,545
COMPASS_OFS_Z,1411
COMPASS_SCALE,1.00
COMPASS_DIA2_X,1.037
COMPASS_DIA2_Y,1.032
COMPASS_DIA2_Z,0.800
COMPASS_MOT2_X,0.529
COMPASS_MOT2_Y,-0.038
COMPASS_MOT2_Z,1.571
COMPASS_ODI2_X,0.005
COMPASS_ODI2_Y,0.053
COMPASS_ODI2_Z,-0.007
COMPASS_OFS2_X,8
COMPASS_OFS2_Y,4
COMPASS_OFS2_Z,199
COMPASS_SCALE2,1.00
COMPASS_MOTCT,2

Hi Shawn.

I have rebuilt my Hexa with Tekko32 with esc telemetry.
I tried to analyze the test flight with PID and filter Tool and
in my opinion the machine flies well.
I am attaching the bin file and I would like you to look at it.

Regards //YB

Hi Yrjö,
Good to hear from you - I’ll check the log soon :slight_smile:

Exactly what motors do you have?
We will need to adjust this:
SERVO_BLH_POLES

Hi Shawn

My hardware configuration is:

Pixhawk 6C
Tekko32 F4 45A
GARTT ML4108 500KV
13.45 CF propeller
6S4P Li-ion battery

//YB

OK, set
SERVO_BLH_POLES,22
which will fix the RPM and harmonic notch filter (mostly)
Also set these:

INS_ACCEL_FILTER,10
INS_HNTCH_FREQ,50
INS_HNTCH_BW,15
INS_HNTCH_FM_RAT,1
INS_HNTCH_HMNCS,7
MOT_THST_EXPO,0.64

That is some adjustment to the notch filter, and a minor thrust expo change.
I’ve been working on an updated thrust expo formula (over a long time) and I think this value will suit better. It’s not a major change so we dont expect to see significant changes to stability or anything like that.
I’ve lowered the base harmonic notch filter frequency because the ESC RPM will scale that (and the bandwidth) upwards as required, but wont scale it lower than this value. Having this value too high can mean you miss out on some important filtering.

Then do another test flight with AltHold and Loiter when you get a chance.

Still no more rain and I was able to perform a new test flight. Here comes
the bIN file

Regards //YB

Harmonic notch filter is working perfectly now - just need to cut down on the number of harmonics:
INS_HNTCH_HMNCS,3

Refine the GPS constellations since the update rate is sometimes poor.
GPS_GNSS_MODE,5 (or 65)
whichever of these two values gives you the lowest reliable HDOP, or time to 3D fix.

Attitude control is good but a bit over-active
You could lowering all the PIDs a bit, -10% , which should be very safe since this is only a slight change:

ATC_ANG_PIT_P,9
ATC_ANG_RLL_P,9
ATC_RAT_PIT_D,0.0056
ATC_RAT_PIT_I,0.142
ATC_RAT_PIT_P,0.142
ATC_RAT_RLL_D,0.0056
ATC_RAT_RLL_I,0.142
ATC_RAT_RLL_P,0.142

or just run Autotune on pitch and roll axis
AUTOTUNE_AXES,3

Hi Shawn and thank you very much for your support, now I’m waiting for it to stop raining, snowing and blowing.
Do you have any experience replace SIK radio with ExpressLRS Airport?.

Regards //YB

Hi Shawn.

According to the Filter tool, the values ​​were improved. But when I downloaded the log, I discovered that there were also 500 empty log files on the SD card. Screenshot can be found on PP page 4 ??.

Regards //YB

I couldnt see any reason for the empty log files, maybe just delete them all.
Probably update to v4.5.0-beta2 firmware.

Attitude control is quite good but not perfect, nothing critical and PIDs can be left how they are if you like the way this copter flies - depends if you feel like doing another Autotune or not.
There was a small amount of instability during that big descent, but it didnt seem too concerning although an Autotune might fix PIDs to bring that under control.
I didnt notice anything else wrong.

I havent used ELRS at all :frowning: