Yaw issues using indoor navigation

Hi everyone,

I recently adapted the arducopter code to use an indoor RF-based navigation technique for positioning for my drone instead of outdoor GPS. I have a few problems with navigating my drone, more specifically, the yaw has a lot of inaccuracies during flight. It seems to get thrown off and settle at an incorrect value as I make movements, especially sharp ones. I checked the compass readings and they are always correct, but do not play a major role in the output yaw of the EKF. I have also calibrated the compass yielding low compass offsets.

The indoor GPS solution does not provide velocity so I have turned this part of the EKF fusion code off (fuseVelData = false). However, I do calculate instantaneous velocity using position and feed this into the EKF, however, this does not improve the errors I observe in yaw values.

I also observed that the code skips magnetometer fusion (FuseMagnetometer()) because inhibitMagStates is set to true, i.e. its using the algebraic method for yaw fusion (fuseEulerYaw()). However, when I set inhibitMagStates false the yaw just spins counterclockwise continuously.
Does anyone have tips on how to correct the yaw for this application?


i believe you have to elaborate a little more on your rf-based navigation technique to understand what changes you made…i believe compass should be the main yaw source if gps is turned off; what flight modeshave u tried?
can u explain what fuseVelData does - sorry don’t know that…
did you turn off gps completely? (GPS_TYPE=0)
you might have a better chance on the ardupilot’s topic you opened
(Yaw issues using indoor GPS navigation - Copter 3.4 - ArduPilot Discourse)
but if you post some logs, at least that would help;

Could you explain how you configured RF based sensor inplace of GPS as I am trying to accomplish a similar task to interface Decawave DWM 1001 indoor navigation sensor instead of GPS. It provides data by UART. Independently obtaining coordinate data is not issue but how to replace the GPS fail safe etc to RFID sensor ?