Crash after successful auto-take off (Attitude/Heading misalignment?)

Setup:
Plane (WING): AR Wing pro.
FC: Omnibus F4 Pro
GPS: 2xUblox M8N (HOLRC) (GPS use best).
ArduPlane V4.2.0dev (c49fd7e9)

I have previous had many successful missions with this setup.

Issue:
I had a crash today after a successful auto take off (WP1 to 50m altitude). Then the plane turned left heading for WP2 (Target Altitude 100m) however instead of climbing it went into a steep descent and I was not able to recover before impact (I managed to switch to FBWA just a couple of seconds before impact).

I have analysed the LOG and so fare I can’t find anything wrong. Initial climb to 50m(BARO) 80m(AHRS2) 80m(NTUN_Talt) is ok, then next target altitude is 130m(NTUNE_TAlt), and the FC is asking for positive pitch.
https://lagoni.org/modelflyvning/crashed_log.png

This is the LOG:
https://lagoni.org/modelflyvning/00000007.BIN

This is the video streamed (the OSD is 10sec ahead of the video):

Anyone have any input to why this happened?
Thanks.

I see two possibilities. First is some kind of mechanical failure. Either Servo failure or C of G shift. As you pointed out, the FC is commanding higher pitch but it clearly doesn’t happen.

The second thing I noticed is a GPS issue.

Here is a link to a discussion of this issue:

Interesting.

I have had some issues with the main GPS (GPS1) and I have moved it to the wing so GPS 1 and 2 are both placed symmetrically on each wing.
Both GPS’s are M8N not M9. They are the same HoleRC GPS, however I have seen some bad results on GPS1 however GPS2 has always been very happy, and in the log it does has 11-14SAT.
I use the settings GPS_AUTO_SWITCH=1 (useBEST).

The servos are working after the crash and the Battery is so large it can’t move in the bay.

There was a bit of wind (take-off into the wind) perhaps a gust of wind when turning could have done this?

If I replay the LOG in the UAV Log Viewer, it is clear that there is some sort of heading misalignment?.
It looks like the plane is flying backwards?

UPDATE:
I’m taking off in the VestNorthVest direction ~300 degrees.
It looks like the AHR2.Yaw (Heading) is wrong during the auto-take-off, but the GPS’s and the ATT.Yaw is correct. When the take-off is complete it then looks like the FC runs some sort of alignment: “EFK3 IMU is aligned using GPS”. At this point the AHR2.YAW is corrected but the ATT.YAW is now incorrect? and from this point on the problems seems to start.
I don’t see any bad GPS data, both GPS’s are correct in the GCrs estimate.

https://lagoni.org/modelflyvning/Takeoff_crash_Heading_plot.jpg

Do you have a compass? If not, then the system has to wait until it can determine a direction of flight from the GPS, then align its yaw with that direction of flight.

If you do have a compass, is it calibrated correctly?

No the compass is disabled.
Also EK3_SRC1_YAW=1 (Compass).

I can see on previous flights that the alignment also happens after take-off, and in some cases (with bad GPS data) it flies for 3-6 min before aligning (backwards like in this crash).

From the Manual:
“On Plane, a steady GPS heading is used after takeoff to align the /attitude/velocity/position/heading estimation filters (EKFs) for yaw. This usually occurs a few seconds after takeoff on Planes without compass…”.

Perhaps this is not related to the crash at all.

After some more research I found this thread and I believe this to be the root cause of my problem.
I have no compass and no airspeed sensor, also I have disabled all arming checks and it simply looks like the EKF failed to do the inflight alignment correctly as @tridge is explaining:
Crash after “EKF2 IMU0 is using GPS” and different AHR2 and ATT Attitude Estimationes - ArduPlane - ArduPilot Discourse

1 Like