Horrible flight, barely made it back to the field. CoG? Trim? Airspeed Sensor? Compass? Any help interpreting logs appreciated

https://www.icloud.com/iclouddrive/00s2KgW5u9J9kbA6f97sGoYLg#2021-05-06_17-30-56

I have made significant changes to the servo linkage and internal layout of my plane (Volantex Ranger EX). I think I have the CoG correct, and I took off in mission mode with auto-takeoff. it flew horribly. rising and diving every few meters. drifting the left. barely gaining altitude. It was supposed to climb to 50m and loiter but it was flying off into the sunset and would have disappeared before reaching 50m, so I tried FBWA and could barely control it. Changed to RTH and it came back, but was low. FBWA with full up elevator and high throttle and it held it’s altitude. a lucky landing and it was ok. I wish I had video but I would have been embarrassed with how poorly it flew! Any advice is appreciated.

There is something wrong with the pitch tuning. My guess is the D term is too high, but I’m not a tuning expert so maybe others will step up to help there. Either way, your elevator servo was basically slamming back and forth for most of the flight. It settled a bit (but not enough) in FBWA, but RTL and Autotake off were the worst.

If you tuned this with auto tune you may think about resetting the tune to default and trying to manually tune it. I’ve run into that problem with flying wings that auto tune will set the values too high resulting in oscillations.