Massive position estimation gps variance

Hi,
I had two near crashes due to a very strange behavior of the position estimation.
Both times at Autotakeoff (around 14:28:30 and 14:51:30) GPS1 and GPS2 seem to be accurate, but POS and AHR2 Lat and Long values show very strange behavior!
This resulted in the Plane turning sharply to the left during takeoff rotation. By immidiate switching to manual and handflying, the plane could be saved from hitting an obstacle.

Logs: https://drive.google.com/file/d/1on1yK5mEIjGNO5UEbFqbn8ynb1cuRxH1/view?usp=sharing

Any idea what could have caused this?


it’s your yaw diverging by ~180° until it converges on GPS vel vec at ~ 7 s into the flight

Ok, is there any way of fixing this apart from installing a compass?
Autotakeoff is pretty pointless if those things happen…
I assumed (as the gyro based heading hold during takeoff worked beautifully before) that such offsets would be compensated for during takeoff phase? (It obviously would have been enough to just continue climbing based on gyro yaw estimate until the takeoff mission item has completed.)

imho you should first check your setup again carefully. you’ve got mags enabled and set to use =1. you have essential arming checks disabled (why?). and you’re running marginal GPS hardware, two of them to be exact, which imho doesn’t really add any performance value.

current plane code basically allows pretty good performance with yaw from GPS. maybe check the docs too on how to set things up for best performance: https://ardupilot.org/plane/docs/common-compassless.html

Ok, thanks, I had to reset my params to default a couple of times now (the fc got unresponsive via usb, and both serial telemetry links) and I must have forgotten to disable the compass again. Arming checks are set as they are, as I usually fly in manual and want to be able to arm regardless if the fc is unhappy :wink:
Two GPS are there only for redundancy (necessary for my usecase) and I found that blend gives bettter performance than use-best.
Thanks for the link, I have already read this some time ago. I will correct my parameters (concerning compass) and see, if that fixes my problem. thanks for now!

np. mind that setting arming checks away from recommended default only mutes relevant notifications. so while it might allow arming, it will not make your FC any happier. you just can’t expect good nav performance when launching with your EKF unhappy. only resolving respective arming issues will allow flying with your FC fully functional.

there‘s various budget M8N-type GPS receivers available that will likely add a lot of precision at limited cost.