Slight Flyaway problem

I was flying my drone earlier today. It was sitting at a hover taking pictures, when suddenly it turned 90 degrees and flew off about 80ft. Then, it turned around and flew back close to where it flew away from. Luckily I had a flyaway failsafe that brought it back to its home position.

Looking through my logs I don’t see any excessive vibration, but I do see an increase in the norm of the magnetic field right at the time of the “flyway”. It does not correlate with the thrust, but could it still be EMI?

https://logs.px4.io/plot_app?log=9e8b3edf-3238-4fc4-bf4a-9a1aaf83523f

I see you are in offboard mode, what are you using to send commands to our device?

I use a companion computer. We log all software commands. We verified that no commands were given to the flight controller over the duration of this anomaly. I’ve experienced actual fly-aways before and this acted similar, except there was no toilet bowling. The uav changed heading and flew straight, stopped and hovered, then changed heading once more, flew straight and hovered again.

Something seem to happen with the ground distance sensor but I’m not sure how it’s related to the flyaway.

I have the lidar using PWM, and HMAX is set to 10m. The uav was above that height so it wasnt fused anyways. Did you see what i was talking about with the increase of the Norm of the Mag Field? It seems to be either causing part of that or the flyaway was causing the increase. I’ve never seen it happen like that before, graphically or while flying

Yeah, the Norm of the Mag switch weirdly

Have you ever seen anything happen like this?

No but I don’t have enough experience to speculate to much.
I would try to figure out what was going on with the distance sensor as it act up around the same time your issue happened.