Loiter drift in 3.4rc3

Hi All,

I recently upgraded a working 3.3.3 quad to 3.4rc3 and I’m experiencing heavy loiter drift.

When hit by light wind (6~7km/h) the quad drift for about 5 meters than suddenly recovers itself and goes back to position.

Here is the log file from a test flight. All known parameterse are within acceptable range

Sats: 12~18
HDOP: 0,5~0,9
Vibration < 1

Any advice is welcome.

You may try a compass and level calibration.

Did it many times, using Mission Planner and Tower Beta (Internal calibration)

If you see the logs the GPS is healthy, reporting the actual position (that doesn’t match the desired position (DPosX vs PosX)), like if the loiter pids are crazy or something like this

Hi doritos,

I have been looking at your log to work out what is happening. So far I can see position errors up to 2.5 m. This isn’t good but it also isn’t 5m so I am wondering how accurate the GPS is.

How much wind was there during this flight?

Velocity control didn’t seem to be obviously a problem. Again, not great but not terrible either.
Same with your attitude control.

I don’t see anything that seems to match the description of 5m drift and sudden correction.

Vibrations aren’t great but nothing bad either.

The EKF seems to have high innovations but I am not overly familiar with the new logging of the EKF. The high innovations (when the EKF says the sensor readings don’t make as much sense) also correspond to where the position deviation happens. This suggests that this is some combination of GPS and accelerometer errors.

Can you provide some photos of the frame and the autopilot mounting.

Thanks,
Leonard

Leonard,

Thanks for your time looking my logs.

I’m made another flight on a very calm day and the dift/fly away was there again, maybe worse than the last log I shared.

Check this log file and see the picture below. The quad flew off around 8 to 9 meters… that’s is scaring

Frame is a XJ470 stretched to 540mm and a chinese Pixhawk clone.

In both of your logs, IMU 1 is performing very poorly, IMU 2 is performing ok. ArduPilot perhaps does not switch between IMUs as dynamically as it should, but ultimately there is a hardware issue.

Have more details on the autopilot in use?

Note that the position errors are 2.5 meters, not 5 meters.

EKF2 IMU1 position innovations:

EKF2 IMU2 position innovations:

EKF2 IMU selection:

1 Like

@jschall,

Nice findings. I don’t have much details about this clone, bought a couple months ago from Aliexpress. It’s supposed to be a 2.4.6 board

Until a new board arrives, could I use EK2_IMU_MASK = 2 to use only the IMU2? Will those drifts go away/be less frequent?

Is there anything on the quad I could change to reduce this behaviour? Vibrations are withing the acceptable range on both IMUS (-1 ~ +1 on the worst case/IMU)

Indeed, using the EK2_IMU_MASK = 2 made a very solid Loiter performance.

Going to order another board and let this one for a spare (or antenna tracker).

Could someone forward these logs to the EKF gurus for a check on the IMU switching logic?

The EKF Gurus are notified and looking at the logs. Thank you for your report.