Lean to left on first forward flight - please review log

I now have the PIXHAWK4 mini, from Holybro installed.

The issue that I have, is that on first forward fligh with only pitch forward, the copter will lean toward the left.

After a few seconds and one turn, it seems to learn the correction automatically and then will fly perfectly straight for the remainder of the battery.

Once I re-boot craft, the same problem presents and te goes away after a few seconds.

It looks like the FC could be pointing to the left by maybe 3 degree?

Does arducopter record that there is no ROLL input, but senses a roll, due to FC slightly left and hence will apply a correction during the flight.

The MAG values appear to be in good limits.

I have no experience in reading the LOGS, i have no idea of what is possibly causing the problem.

Your help will go a long wat to curing my frustration.


Thanks kindly.


How does one load a log?
The system tells me my log file exceeds 4500kb, but it is only 1500kb?

Help please.



Upload the log to a public sharing service (Google Drive, Dropbox, etc.) - then post the link here. Make sure the link is accessible by everyone and not restricted.


Here is the log file.


This issue is still persisting, here is more detail.

  1. Craft leans hard to north on first forward flight. That is, if heading is left of north, then the lean will be right towards north. If heading is right of north, then leam will be to left.

  2. After about 30m and one turn, craft seems to self learn and then everything is perfect. Like never before in 10 years of drone building.

  3. After landing, problem resets and persist s with same auto learn situation.

  4. Vibration is in green in all axes. Mag variance on launch in acceptable levels.

What I can’t understand is that if mag interference levels and vibration are a problem, why does the situation self correct after 10 seconds of flight.?

One would expect the problem to persist if there really is a vibration or mah problem, but no, the problem inexplicably vanishes with no obvious reason why.

My issue is that after landing the damn thing flies skew again when I need it to fly straight.

Anyone had this before and did you solve it.?

Yes and No

I wish I could tell you more. I’ve focused on magnetometer. Focused on vibrations. Realized it could be multiple things causing the same symptoms, such as IMU heating up. Changing the mounting of my flight controller usually seems to make a difference, which leads me to vibrations. But like you, if I switch directions, the lean switches to the other side… Sometimes. Which seems like magnetometer.
I don’t know…

The problem comes and goes for me. The better my GPS signal, the less it leans. So maybe that’s making a difference for you… When you get higher, you get a good GPS lock, so it leans less.

I think you can see in the attached graph what you are describing. At the time forward speed is initiated (~63s) there is a few degree roll with no roll RC input. But you can also see the FC is commanding it because actual and desired roll match. But, I don’t see an obvious cause. Wind maybe but you are not describing that. I suppose your vehicle is level in the HUD when placed level?

As wicked1 hints at “the leans” have been prevalent for awhile.

You have a bad case of the leans. It’s easy to see, because when you disarm you still have a 1m/s/s AccX offset. In your case I think its simply vibration:

Maybe remount the FC or look for something knocking.

For those wondering, the reason a good GPS lock makes this better is because the EKF can use that data to know that the Accel data is bad. If all it has to go on is the Accel data it instead learns a bias on the basis that its something inherent to the sensor rather than vibration.

Hi All

Thanks for the input.

I will look for what could be some knocking.

What i cant understand, is why does the situation disappear after 10 secs or so of flight?

Also, when using any other FC like NAZA and TAROT there is absolutely no LEANS at all?

Thanks again. Will reply with good news soon hopefully.



Maybe its the 20689. This is one of the common factors. Can you try disabling the first IMU and just running with the BMI088 and see if that makes any difference?

I think this idea of disabling one imu is best suggestion yet.

I will try this tomorrow and give feedback.

I really appreciate the effort being made to try resolve this.



Was there ever a solution to this problem Gary?