Using IMU as yaw source in EKF3

I am testing indoor positioning in ArduCopter, when using positioning system like UWB,there is not yaw data, and it’s not stable using compass indoor, so it seems possible to use original IMU heading as north and input xyz via fake gps

First Testing in SITL with Airsim

params change, still use compass

  • EK3_ENABLE=1
  • EK2_ENABLE=0
  • AHRS_EKF_TYPE=3
  • EK3_GPS_TYPE=0
  • EK3_ALT_SOURCE=2
  • GPS_TYPE=14
  • GPS_DELAY_MS=50

Then drone can hover for 1 minute, then make a circle and crash, maybe the compass offset problem?
log link https://drive.google.com/open?id=1sYlc6kLVrT2E_rLW_zkU5bzcw0LftKHF

disable compass

  • COMPASS_USE=0
  • COMPASS_USE2=0
  • COMPASS_USE3=0
  • EK3_MAG_CAL=5

Now it always show Need 3D fix that I can not arm the drone, what should I do to fix this?

log link https://drive.google.com/open?id=1Yr14ZuDEyh_cH18Zxsj5-fQVjs3oF90C