Hey,
We’re dealing with a long-time issue of EKF variances that sometimes cause failsafe situations.
Almost every flight we see GPS Glitch or Compass error in the messages tab in Mission Planner.
Looking at the EKF innovations window we see high innovations in compass and velocity, and sometimes even in position.
We tried using better sensors, using better placing of sensors (as much as we can with our platform limitations).
Today we tried flying without a compass connected and also disabled GSF operation, and innovations were still high. Received GPS Glitch or Compass error as well (see log).
Some of the error messages we see: GPS GLITCH OR COMPASS ERROR IMU0 EMERGENCY YAW RESET
Is it possible to determine the sensor that cause these errors?
Our IMU is off-board, an ADIS16507 connected to the external SPI bus of our mRoPixracerPro.
We’re suspecting either bad parameter settings, or hardware. Problem is we can figure which one is at fault. How can I determine if we have bad parameters, bad connection to one of the sensors or bad sensor (less likely, since we replaced most of them and the problem repeats)?
I just tried looking at the log Compass-connected, but there’s not a lot of compass data. At least there wasn’t the data points I was expecting. I might be missing something but I’d try to verify the compass is actually connected properly. Re-do the basic compass calibration outside with a good GPS lock. Then fly it around a bit to do a magfit calibration.
It was GPS GLITCH message, but because most cases of GPS glitch errors are caused by incorrect compass settings or compass errors it was rewritten in this form. In your case it has nothing to do with a compass.
@Eosbandi
Thanks, do you recon it has nothing to do with compass due to bad compass connection, or it was actually a GPS glitch?
I out area GPS signal is not optimal but should be OK to work with.
@Allister
Thanks, maybe the lack of compass data in the log is because the compass is a Matek AP_Periph 3100 connected via CAN?
I also just noticed that LOG_BITMASK’s compass field was not checked.
Thanks.
I’m more worried about about bad IMU data since GPS locations are pretty much OK.
I’ve had issue with the same flight controller and other IMUs (though they were lower grade) and lower grade flight controllers with the abovementioned lower grade IMUs.
I’ll do some flights with raw imu logging (was not enabled until now) and we’ll if this helps to understand the issue.
Update -
Tried flying with the magfit values provides, still saw relatively high variances, but this time mostly in the Velocity bar.
We also tried switching to EKF2 following some advice from a friend who used EKF2 to solve an issue in the past (I’m not saying that is best practice). Still the variations were high.
EDIT
Two additional files, where the pilot had to switch from Stabilize to Acro when the drone’s horizon drifted. With EKF2 - first Acro switch was preventive, second was pilot’s decision to avoid a crash. With EKF3
Currently my next step is to shield the external IMU cable. Updates to come. UPDATE 1.0 shielding the IMU SPI cable did not help. UPDATE 2.0 Flying with the original IMU sensors, with the original onboard compass, and we still get errors. log
Please check your vibrations: a vibrating (also a “floppy”) frame would mess up with the IMUs accelerometers and gyros which would lead to high innovations. If you have multiple IMUs, it’s worth checking if one or the other are worse and make the good one primary.
We do have a “floppy” frame - it’s an H frame (not “Ardupilot H-frame”, the cross beam goes from left to right and the motor beams are front to aft, so it is a Quad-X as far as Ardupilot FW concerns).
We have only a single IMU, usually, but as you a see in prior comments I tried flying with more IMUs and had issues.