Pixhawk4 flies sideways, up and down when it should not

Hello, I am a newbie in drones and building a DIY quadcopter with Pixhawk4 flight controller.
It had several crushes but now it seems fine and drone can fly. My issues now are: 1) when testing I just plan a mission of Take Off, holding for 5 secs and RTL (mission planner) and drone moves weirdly to sideways when taking off, while holding in the air it moves sideways and sometimes up and down. When descending it sometimes jerks up and then descends again. All this is done in Auto Mode. It bothers me the Quick menu of mission planner altitude and GroundSpeed vary all the time even when a drone at the ground and does not move. Altitude sometimes goes negative. After each flight it warns with the message of EKF yaw inconsistent by 29 degrees, and sometimes even before the flight it gives EKF warnings but still arms. GPS seems to be working fine but the drone icon is moving all over the place within certain spot. Before the crushes I saw that it had EKF imbalance when flying. I have calibrated compasses and accelerometer several times.
2) Now my motors do not spin when ARMED even though they spin at motor test and Spin Apm was set according to Motor Test.
I used this guide for tuning after some crushes Tuning Process Instructions — Copter documentation

My hardware and software are:

  • ArduCopter latest version (4.0.6 I think)
    -Pixhawk 4 but not Holybro version (bought on AliExpress)
  • YRRC power distribution board that came with the Pixhawk 4
    -SiK Telemetry
    -F450 frame
  • Readytosky 2212 920kv motors
  • hobbywing platinum pro 30a esc

I do not see issues with on the hardware side (except maybe that some parts are not “original”), probably somthing is wrong in configuration/calibration. Vibration levels seem to be acceptable.

Also what is the best position for calibrating compasses and accelerometer? Mounted on the copter with GPS being on the elevation stick or both GPS and Pixhawk being fixed to some cardboard and calibrated via USB?
Do I need to use both compasses or only on GPS module? It seems it gives error with both.
Here are some log files of latest flight and crush flight: https://drive.google.com/file/d/1fdvQ5D2D8X1jfrNZISRoLmcnSV7kvzwb/view?usp=sharing

Thank you in advance!

Interesting and common while new, the issue like this only comes when u change some parameters or tune something u shouldn’t, but it can also be a simple calibration issue, I am no expert, but I always use the cheapest equipment available, and everything just works fine but not at its best.

Just resent the flight controller, re flash the firmware, then the GPS should always be mounted higher use both the compass calibrat both the compass at the same time.

If the issue percites let’s try the PID tuning, these new generation flight controllers do not need such fine tuning but let’s see.

Oh and u mentioned the crashes, the calibration does get messed up after a crash I had this issue a lot of times as my drones are normally not in the proper geometry and are large.

Give it one last try with everything u got, we will help u out if it doesn’t work.

hello …check your calibration/baro direction/vibration /firmware update/ remote calibration end point and below point …this basic needs for for the the done to fly stable

Thank you for the reply and sorry for delayed answer. I reinstalled the firmware so I have “fresh” params. I did all the calibrations again but compass seems to be off every time.
Here are params and last log file.

By the way I bought RC control and gave it a go. Sadly the quad drifts away even when I apply no throttle.
pixhawk4 params.param (18.0 KB)